forked from renatoGarcia/opencv-swig
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
51 lines (41 loc) · 1.21 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# DEV_HASH: $Format:%H$
cmake_minimum_required(VERSION 3.12)
cmake_policy(SET CMP0048 NEW)
include(CMakePackageConfigHelpers)
project(opencv-swig VERSION 1.0.2 LANGUAGES NONE)
if(WIN32 AND NOT CYGWIN)
set(DEF_INSTALL_CMAKE_DIR "CMake")
set(DEF_INSTALL_SWIGLIB_DIR "share/swig/any")
else()
set(DEF_INSTALL_CMAKE_DIR "lib/cmake/OpenCV-SWIG")
set(DEF_INSTALL_SWIGLIB_DIR "share/swig/any")
endif()
set(
OpenCV-SWIG_CMAKE_DIR ${DEF_INSTALL_CMAKE_DIR} CACHE PATH
"Installation directory for CMake files"
)
set(
OpenCV-SWIG_LIBDIR ${DEF_INSTALL_SWIGLIB_DIR} CACHE PATH
"Installation directory for SWIG library files"
)
configure_package_config_file(OpenCV-SWIGConfig.cmake.in
"${PROJECT_BINARY_DIR}/OpenCV-SWIGConfig.cmake"
INSTALL_DESTINATION ${OpenCV-SWIG_CMAKE_DIR}
PATH_VARS OpenCV-SWIG_LIBDIR
)
write_basic_package_version_file(
"${PROJECT_BINARY_DIR}/OpenCV-SWIGConfigVersion.cmake"
COMPATIBILITY SameMajorVersion
ARCH_INDEPENDENT
)
install(
FILES
"${PROJECT_BINARY_DIR}/OpenCV-SWIGConfig.cmake"
"${PROJECT_BINARY_DIR}/OpenCV-SWIGConfigVersion.cmake"
DESTINATION ${OpenCV-SWIG_CMAKE_DIR}
)
install(
DIRECTORY lib/
DESTINATION ${OpenCV-SWIG_LIBDIR}
FILES_MATCHING PATTERN "*.i"
)