|
|
|
@ -25,19 +25,21 @@ endif() |
|
|
|
|
# Following block can broke build in case of cross-compilng |
|
|
|
|
# but CMAKE_CROSSCOMPILING variable will be set only on project(OpenCV) command |
|
|
|
|
# so we will try to detect crosscompiling by presense of CMAKE_TOOLCHAIN_FILE |
|
|
|
|
if(NOT CMAKE_TOOLCHAIN_FILE) |
|
|
|
|
# it _must_ go before project(OpenCV) in order to work |
|
|
|
|
if(WIN32) |
|
|
|
|
if(NOT DEFINED CMAKE_INSTALL_PREFIX) |
|
|
|
|
if(NOT CMAKE_TOOLCHAIN_FILE) |
|
|
|
|
# it _must_ go before project(OpenCV) in order to work |
|
|
|
|
if(WIN32) |
|
|
|
|
set(CMAKE_INSTALL_PREFIX "${CMAKE_BINARY_DIR}/install" CACHE PATH "Installation Directory") |
|
|
|
|
else() |
|
|
|
|
set(CMAKE_INSTALL_PREFIX "/usr/local" CACHE PATH "Installation Directory") |
|
|
|
|
endif() |
|
|
|
|
else(NOT CMAKE_TOOLCHAIN_FILE) |
|
|
|
|
#Android: set output folder to ${CMAKE_BINARY_DIR} |
|
|
|
|
set( LIBRARY_OUTPUT_PATH_ROOT ${CMAKE_BINARY_DIR} CACHE PATH "root for library output, set this to change where android libs are compiled to" ) |
|
|
|
|
# any crosscompiling |
|
|
|
|
set(CMAKE_INSTALL_PREFIX "${CMAKE_BINARY_DIR}/install" CACHE PATH "Installation Directory") |
|
|
|
|
else() |
|
|
|
|
set(CMAKE_INSTALL_PREFIX "/usr/local" CACHE PATH "Installation Directory") |
|
|
|
|
endif() |
|
|
|
|
else(NOT CMAKE_TOOLCHAIN_FILE) |
|
|
|
|
#Android: set output folder to ${CMAKE_BINARY_DIR} |
|
|
|
|
set( LIBRARY_OUTPUT_PATH_ROOT ${CMAKE_BINARY_DIR} CACHE PATH "root for library output, set this to change where android libs are compiled to" ) |
|
|
|
|
# any crosscompiling |
|
|
|
|
set(CMAKE_INSTALL_PREFIX "${CMAKE_BINARY_DIR}/install" CACHE PATH "Installation Directory") |
|
|
|
|
endif(NOT CMAKE_TOOLCHAIN_FILE) |
|
|
|
|
endif(NOT CMAKE_TOOLCHAIN_FILE) |
|
|
|
|
endif() |
|
|
|
|
|
|
|
|
|
if(CMAKE_SYSTEM_NAME MATCHES WindowsPhone OR CMAKE_SYSTEM_NAME MATCHES WindowsStore) |
|
|
|
|
set(WINRT TRUE) |
|
|
|
|