-
Notifications
You must be signed in to change notification settings - Fork 1
/
CMakeLists.txt
47 lines (38 loc) · 1.47 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
cmake_minimum_required(VERSION 2.8 FATAL_ERROR)
project(rtmpointer)
string(TOLOWER ${PROJECT_NAME} PROJECT_NAME_LOWER)
list(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake/Modules)
include(${PROJECT_SOURCE_DIR}/cmake/rtmpointer_utils.cmake)
# Set version and OS-specific settings
set(RTMPOINTER_VERSION 1.0.0-RC1 CACHE STRING "RTMPointer version")
DISSECT_VERSION()
GET_OS_INFO()
if(WIN32)
set(RTMPOINTER_DLLVERSION
"${RTMPOINTER_VERSION_MAJOR}${RTMPOINTER_VERSION_MINOR}${RTMPOINTER_VERSION_PATCH}")
set(RTMPOINTER_DEBUG_POSTFIX d)
else(WIN32)
set(RTMPOINTER_DLLVERSION)
set(RTMPOINTER_DEBUG_POSTFIX)
endif(WIN32)
# Add an "uninstall" target
configure_file("${PROJECT_SOURCE_DIR}/cmake/uninstall_target.cmake.in"
"${PROJECT_BINARY_DIR}/uninstall_target.cmake" IMMEDIATE @ONLY)
add_custom_target(uninstall "${CMAKE_COMMAND}" -P
"${PROJECT_BINARY_DIR}/uninstall_target.cmake")
# Get necessary dependency information
find_package(OpenRTM 1 REQUIRED)
# Subdirectories
add_subdirectory(cmake)
add_subdirectory(include)
add_subdirectory(src)
add_subdirectory(doc)
add_subdirectory(examples)
# Package creation
include(InstallRequiredSystemLibraries)
set(PKG_DESCRIPTION "Pointer-sharing transport for OpenRTM-aist")
set(PKG_VENDOR "Geoffrey Biggs, AIST")
configure_file("${PROJECT_SOURCE_DIR}/cmake/cpack_options.cmake.in"
"${PROJECT_BINARY_DIR}/cpack_options.cmake" @ONLY)
set(CPACK_PROJECT_CONFIG_FILE "${PROJECT_BINARY_DIR}/cpack_options.cmake")
include(CPack)