-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathCMakeLists.txt
33 lines (22 loc) · 1.25 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
cmake_minimum_required(VERSION 3.8.2)
project(ob_csharp VERSION 2.1.1 LANGUAGES CSharp)
set(CMAKE_INSTALL_PREFIX ${CMAKE_BINARY_DIR}/install)
include(CSharpUtilities)
file(GLOB_RECURSE SOURCES src/*.cs)
add_library(${PROJECT_NAME} SHARED ${SOURCES})
set_property(TARGET ${PROJECT_NAME} PROPERTY VS_DOTNET_TARGET_FRAMEWORK_VERSION 4.7.2)
add_subdirectory(samples)
file(GLOB OB_SDK_LIB_FILES ${CMAKE_CURRENT_LIST_DIR}/OrbbecSDK/lib/OrbbecSDK.dll)
file(GLOB OB_SDK_EXT_DIR ${CMAKE_CURRENT_LIST_DIR}/OrbbecSDK/lib/extensions)
file(GLOB OB_SDK_CONFIG_FILES ${CMAKE_CURRENT_LIST_DIR}/OrbbecSDK/config/OrbbecSDKConfig.*)
install (FILES ${OB_SDK_LIB_FILES} DESTINATION ${CMAKE_INSTALL_PREFIX}/bin)
install (DIRECTORY ${OB_SDK_EXT_DIR} DESTINATION ${CMAKE_INSTALL_PREFIX}/bin)
install (FILES ${OB_SDK_CONFIG_FILES} DESTINATION ${CMAKE_INSTALL_PREFIX}/bin)
install (FILES ${OB_SDK_LIB_FILES} DESTINATION ${CMAKE_INSTALL_PREFIX}/lib)
install (DIRECTORY ${OB_SDK_EXT_DIR} DESTINATION ${CMAKE_INSTALL_PREFIX}/lib)
install (FILES ${OB_SDK_CONFIG_FILES} DESTINATION ${CMAKE_INSTALL_PREFIX}/lib)
install(TARGETS ${PROJECT_NAME}
RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/bin
LIBRARY DESTINATION ${CMAKE_INSTALL_PREFIX}/lib
ARCHIVE DESTINATION ${CMAKE_INSTALL_PREFIX}/lib
)