forked from IVCenter/calvr_plugins
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
53 lines (36 loc) · 1.52 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
52
53
cmake_minimum_required(VERSION 2.6)
project (CalVR_Plugins)
SET(CMAKE_MODULE_PATH "${CalVR_Plugins_SOURCE_DIR}/CMakeModules;${CMAKE_MODULE_PATH}")
OPTION(PLUGINS_GENERAL "Build General Plugins" ON)
INCLUDE(CVRPluginMacros)
FIND_PACKAGE(CalVR)
FIND_PACKAGE(OSG)
SET(INSTALL_PREFIX "${CALVR_DIR}" CACHE STRING "library install location - /lib/calvr-plugins will be appended")
IF(WIN32)
SET(LIBRARY_OUTPUT_PATH "${INSTALL_PREFIX}/bin/calvr-plugins")
SET(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${INSTALL_PREFIX}/bin/calvr-plugins")
MAKE_DIRECTORY(${INSTALL_PREFIX}/bin)
MAKE_DIRECTORY(${INSTALL_PREFIX}/bin/calvr-plugins)
ELSE(WIN32)
SET(LIBRARY_OUTPUT_PATH "${INSTALL_PREFIX}/lib/calvr-plugins")
SET(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${INSTALL_PREFIX}/lib/calvr-plugins")
MAKE_DIRECTORY(${INSTALL_PREFIX}/lib)
MAKE_DIRECTORY(${INSTALL_PREFIX}/lib/calvr-plugins)
ENDIF(WIN32)
IF(NOT CMAKE_BUILD_TYPE)
SET (CMAKE_BUILD_TYPE RelWithDebInfo)
ENDIF(NOT CMAKE_BUILD_TYPE)
MARK_AS_ADVANCED(CMAKE_INSTALL_PREFIX)
IF(MSVC)
ADD_DEFINITIONS("/W3 /D_CRT_SECURE_NO_WARNINGS /wd4018 /wd4251 /wd4250")
ENDIF(MSVC)
INCLUDE_DIRECTORIES(${CALVR_INCLUDE_DIR})
INCLUDE_DIRECTORIES(${CalVR_Plugins_SOURCE_DIR}/common)
IF(PLUGINS_GENERAL)
ADD_SUBDIRECTORY(general)
ENDIF(PLUGINS_GENERAL)
ADD_SUBDIRECTORY(calit2)
SET(ADDITIONAL_PLUGIN_FOLDER "" CACHE STRING "Additional plugin folder to build")
IF(ADDITIONAL_PLUGIN_FOLDER)
ADD_SUBDIRECTORY(${ADDITIONAL_PLUGIN_FOLDER} ${ADDITIONAL_PLUGIN_FOLDER})
ENDIF(ADDITIONAL_PLUGIN_FOLDER)