More accurate guards for WinRT features in CMake.
This commit is contained in:
parent
3d594c70ff
commit
429cd85b46
4
3rdparty/tbb/CMakeLists.txt
vendored
4
3rdparty/tbb/CMakeLists.txt
vendored
@ -123,7 +123,7 @@ file(GLOB lib_hdrs "${tbb_src_dir}/src/tbb/*.h")
|
|||||||
list(APPEND lib_srcs "${tbb_src_dir}/src/rml/client/rml_tbb.cpp")
|
list(APPEND lib_srcs "${tbb_src_dir}/src/rml/client/rml_tbb.cpp")
|
||||||
|
|
||||||
if (WIN32)
|
if (WIN32)
|
||||||
add_definitions(-D__TBB_DYNAMIC_LOAD_ENABLED=0
|
add_definitions(-D__TBB_DYNAMIC_LOAD_ENABLED=0
|
||||||
-D__TBB_BUILD=1
|
-D__TBB_BUILD=1
|
||||||
-D_UNICODE
|
-D_UNICODE
|
||||||
-DUNICODE
|
-DUNICODE
|
||||||
@ -162,7 +162,7 @@ endif()
|
|||||||
|
|
||||||
set(TBB_SOURCE_FILES ${lib_srcs} ${lib_hdrs})
|
set(TBB_SOURCE_FILES ${lib_srcs} ${lib_hdrs})
|
||||||
|
|
||||||
if ((${CMAKE_SYSTEM_PROCESSOR} MATCHES "arm") AND NOT WIN32)
|
if (ARM AND NOT WIN32)
|
||||||
if (NOT ANDROID)
|
if (NOT ANDROID)
|
||||||
set(TBB_SOURCE_FILES ${TBB_SOURCE_FILES} "${CMAKE_CURRENT_SOURCE_DIR}/arm_linux_stub.cpp")
|
set(TBB_SOURCE_FILES ${TBB_SOURCE_FILES} "${CMAKE_CURRENT_SOURCE_DIR}/arm_linux_stub.cpp")
|
||||||
endif()
|
endif()
|
||||||
|
@ -60,11 +60,6 @@ endif()
|
|||||||
|
|
||||||
project(OpenCV CXX C)
|
project(OpenCV CXX C)
|
||||||
|
|
||||||
if ((${CMAKE_SYSTEM_PROCESSOR} MATCHES "arm") AND WIN32)
|
|
||||||
set(CMAKE_REQUIRED_DEFINITIONS -D_ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE)
|
|
||||||
add_definitions(-D_ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
include(cmake/OpenCVUtils.cmake)
|
include(cmake/OpenCVUtils.cmake)
|
||||||
|
|
||||||
# ----------------------------------------------------------------------------
|
# ----------------------------------------------------------------------------
|
||||||
@ -613,7 +608,7 @@ else()
|
|||||||
status(" QT 4.x:" NO)
|
status(" QT 4.x:" NO)
|
||||||
endif()
|
endif()
|
||||||
if(WIN32)
|
if(WIN32)
|
||||||
status(" Win32 UI:" NO)
|
status(" Win32 UI:" ARM THEN NO ELSE YES)
|
||||||
else()
|
else()
|
||||||
if(APPLE)
|
if(APPLE)
|
||||||
if(WITH_CARBON)
|
if(WITH_CARBON)
|
||||||
|
@ -103,4 +103,6 @@ if(CMAKE_SYSTEM_PROCESSOR MATCHES "amd64.*|x86_64.*|AMD64.*" OR CMAKE_GENERATOR
|
|||||||
set(X86_64 1)
|
set(X86_64 1)
|
||||||
elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "i686.*|i386.*|x86.*|amd64.*|AMD64.*")
|
elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "i686.*|i386.*|x86.*|amd64.*|AMD64.*")
|
||||||
set(X86 1)
|
set(X86 1)
|
||||||
|
elseif (CMAKE_SYSTEM_PROCESSOR MATCHES "arm.*|ARM.*")
|
||||||
|
set(ARM 1)
|
||||||
endif()
|
endif()
|
||||||
|
@ -90,7 +90,9 @@ if(HAVE_QT)
|
|||||||
set_source_files_properties(${_RCC_OUTFILES} PROPERTIES COMPILE_FLAGS -Wno-missing-declarations)
|
set_source_files_properties(${_RCC_OUTFILES} PROPERTIES COMPILE_FLAGS -Wno-missing-declarations)
|
||||||
endif()
|
endif()
|
||||||
elseif(WIN32)
|
elseif(WIN32)
|
||||||
#list(APPEND highgui_srcs src/window_w32.cpp)
|
if (NOT ARM)
|
||||||
|
list(APPEND highgui_srcs src/window_w32.cpp)
|
||||||
|
endif()
|
||||||
elseif(HAVE_GTK)
|
elseif(HAVE_GTK)
|
||||||
list(APPEND highgui_srcs src/window_gtk.cpp)
|
list(APPEND highgui_srcs src/window_gtk.cpp)
|
||||||
elseif(APPLE)
|
elseif(APPLE)
|
||||||
@ -105,10 +107,12 @@ elseif(APPLE)
|
|||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
#if(WIN32)
|
if(WIN32)
|
||||||
list(APPEND highgui_srcs src/cap_dshow.cpp)
|
list(APPEND highgui_srcs src/cap_dshow.cpp)
|
||||||
#list(APPEND highgui_srcs src/cap_vfw.cpp src/cap_cmu.cpp)
|
if (NOT ARM)
|
||||||
#endif(WIN32)
|
list(APPEND highgui_srcs src/cap_vfw.cpp src/cap_cmu.cpp)
|
||||||
|
endif()
|
||||||
|
endif(WIN32)
|
||||||
|
|
||||||
if(HAVE_XINE)
|
if(HAVE_XINE)
|
||||||
list(APPEND highgui_srcs src/cap_xine.cpp)
|
list(APPEND highgui_srcs src/cap_xine.cpp)
|
||||||
|
5
platforms/winrt/arm.winrt.toolchain.cmake
Normal file
5
platforms/winrt/arm.winrt.toolchain.cmake
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
set(CMAKE_SYSTEM_NAME Windows) # WindowsRT breaks cmake 2.8.10.2 and earler
|
||||||
|
set(CMAKE_SYSTEM_PROCESSOR "arm")
|
||||||
|
|
||||||
|
set(CMAKE_REQUIRED_DEFINITIONS -D_ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE)
|
||||||
|
add_definitions(-D_ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE)
|
@ -3,6 +3,4 @@ cd build
|
|||||||
|
|
||||||
rem call "C:\Program Files\Microsoft Visual Studio 11.0\VC\bin\x86_arm\vcvarsx86_arm.bat"
|
rem call "C:\Program Files\Microsoft Visual Studio 11.0\VC\bin\x86_arm\vcvarsx86_arm.bat"
|
||||||
|
|
||||||
SET PATH=C:\Program Files\Ninja;%PATH%
|
cmake.exe -GNinja -DWITH_FFMPEG=OFF -DBUILD_opencv_gpu=OFF -DBUILD_opencv_python=OFF -DCMAKE_TOOLCHAIN_FILE=..\..\winrt\arm.winrt.toolchain.cmake ..\..\..
|
||||||
|
|
||||||
"C:\Program Files\CMake 2.8\bin\cmake.exe" -GNinja -DCMAKE_BUILD_TYPE=Release -DWITH_TIFF=OFF -DWITH_FFMPEG=OFF -DBUILD_opencv_gpu=OFF -DENABLE_SSE=OFF -DENABLE_SSE2=OFF ..\..\..
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user