|
|
|
@ -83,6 +83,14 @@ endif() |
|
|
|
|
|
|
|
|
|
export(TARGETS ${OpenCVModules_TARGETS} FILE "${CMAKE_BINARY_DIR}/OpenCVModules${modules_file_suffix}.cmake") |
|
|
|
|
|
|
|
|
|
if(TARGET ippicv) |
|
|
|
|
set(USE_IPPICV TRUE) |
|
|
|
|
file(RELATIVE_PATH INSTALL_PATH_RELATIVE_IPPICV ${CMAKE_BINARY_DIR} ${IPPICV_LOCATION_PATH}) |
|
|
|
|
else() |
|
|
|
|
set(USE_IPPICV FALSE) |
|
|
|
|
set(INSTALL_PATH_RELATIVE_IPPICV "non-existed-path") |
|
|
|
|
endif() |
|
|
|
|
|
|
|
|
|
configure_file("${OpenCV_SOURCE_DIR}/cmake/templates/OpenCVConfig.cmake.in" "${CMAKE_BINARY_DIR}/OpenCVConfig.cmake" @ONLY) |
|
|
|
|
#support for version checking when finding opencv. find_package(OpenCV 2.3.1 EXACT) should now work. |
|
|
|
|
configure_file("${OpenCV_SOURCE_DIR}/cmake/templates/OpenCVConfig-version.cmake.in" "${CMAKE_BINARY_DIR}/OpenCVConfig-version.cmake" @ONLY) |
|
|
|
@ -98,9 +106,6 @@ if(INSTALL_TO_MANGLED_PATHS) |
|
|
|
|
set(OpenCV_3RDPARTY_LIB_DIRS_CONFIGCMAKE "\"\${OpenCV_INSTALL_PATH}/${OpenCV_3RDPARTY_LIB_DIRS_CONFIGCMAKE}\"") |
|
|
|
|
endif() |
|
|
|
|
|
|
|
|
|
configure_file("${OpenCV_SOURCE_DIR}/cmake/templates/OpenCVConfig.cmake.in" "${CMAKE_BINARY_DIR}/unix-install/OpenCVConfig.cmake" @ONLY) |
|
|
|
|
configure_file("${OpenCV_SOURCE_DIR}/cmake/templates/OpenCVConfig-version.cmake.in" "${CMAKE_BINARY_DIR}/unix-install/OpenCVConfig-version.cmake" @ONLY) |
|
|
|
|
|
|
|
|
|
if(UNIX) # ANDROID configuration is created here also |
|
|
|
|
#http://www.vtk.org/Wiki/CMake/Tutorials/Packaging reference |
|
|
|
|
# For a command "find_package(<name> [major[.minor]] [EXACT] [REQUIRED|QUIET])" |
|
|
|
@ -108,6 +113,15 @@ if(UNIX) # ANDROID configuration is created here also |
|
|
|
|
# <prefix>/(share|lib)/cmake/<name>*/ (U) |
|
|
|
|
# <prefix>/(share|lib)/<name>*/ (U) |
|
|
|
|
# <prefix>/(share|lib)/<name>*/(cmake|CMake)/ (U) |
|
|
|
|
if(USE_IPPICV) |
|
|
|
|
if(INSTALL_TO_MANGLED_PATHS) |
|
|
|
|
file(RELATIVE_PATH INSTALL_PATH_RELATIVE_IPPICV "${CMAKE_INSTALL_PREFIX}/${OPENCV_CONFIG_INSTALL_PATH}-${OPENCV_VERSION}/" ${IPPICV_INSTALL_PATH}) |
|
|
|
|
else() |
|
|
|
|
file(RELATIVE_PATH INSTALL_PATH_RELATIVE_IPPICV "${CMAKE_INSTALL_PREFIX}/${OPENCV_CONFIG_INSTALL_PATH}/" ${IPPICV_INSTALL_PATH}) |
|
|
|
|
endif() |
|
|
|
|
endif() |
|
|
|
|
configure_file("${OpenCV_SOURCE_DIR}/cmake/templates/OpenCVConfig.cmake.in" "${CMAKE_BINARY_DIR}/unix-install/OpenCVConfig.cmake" @ONLY) |
|
|
|
|
configure_file("${OpenCV_SOURCE_DIR}/cmake/templates/OpenCVConfig-version.cmake.in" "${CMAKE_BINARY_DIR}/unix-install/OpenCVConfig-version.cmake" @ONLY) |
|
|
|
|
if(INSTALL_TO_MANGLED_PATHS) |
|
|
|
|
install(FILES ${CMAKE_BINARY_DIR}/unix-install/OpenCVConfig.cmake DESTINATION ${OPENCV_CONFIG_INSTALL_PATH}-${OPENCV_VERSION}/ COMPONENT dev) |
|
|
|
|
install(FILES ${CMAKE_BINARY_DIR}/unix-install/OpenCVConfig-version.cmake DESTINATION ${OPENCV_CONFIG_INSTALL_PATH}-${OPENCV_VERSION}/ COMPONENT dev) |
|
|
|
@ -131,6 +145,13 @@ if(WIN32) |
|
|
|
|
set(OpenCV2_INCLUDE_DIRS_CONFIGCMAKE "\"\"") |
|
|
|
|
|
|
|
|
|
exec_program(mkdir ARGS "-p \"${CMAKE_BINARY_DIR}/win-install/\"" OUTPUT_VARIABLE RET_VAL) |
|
|
|
|
if(USE_IPPICV) |
|
|
|
|
if(BUILD_SHARED_LIBS) |
|
|
|
|
file(RELATIVE_PATH INSTALL_PATH_RELATIVE_IPPICV "${CMAKE_INSTALL_PREFIX}/${OpenCV_INSTALL_BINARIES_PREFIX}lib" ${IPPICV_INSTALL_PATH}) |
|
|
|
|
else() |
|
|
|
|
file(RELATIVE_PATH INSTALL_PATH_RELATIVE_IPPICV "${CMAKE_INSTALL_PREFIX}/${OpenCV_INSTALL_BINARIES_PREFIX}staticlib" ${IPPICV_INSTALL_PATH}) |
|
|
|
|
endif() |
|
|
|
|
endif() |
|
|
|
|
configure_file("${OpenCV_SOURCE_DIR}/cmake/templates/OpenCVConfig.cmake.in" "${CMAKE_BINARY_DIR}/win-install/OpenCVConfig.cmake" @ONLY) |
|
|
|
|
configure_file("${OpenCV_SOURCE_DIR}/cmake/templates/OpenCVConfig-version.cmake.in" "${CMAKE_BINARY_DIR}/win-install/OpenCVConfig-version.cmake" @ONLY) |
|
|
|
|
if(BUILD_SHARED_LIBS) |
|
|
|
|