-
Notifications
You must be signed in to change notification settings - Fork 31
/
CMakeLists.txt
96 lines (84 loc) · 2.15 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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
#==========
#
# Copyright (c) 2010, Dan Bethell, Johannes Saam.
# All rights reserved.
#
# For license information regarding redistribution and
# use, please refer to the COPYING file.
#
#==========
cmake_minimum_required( VERSION 2.6 )
project( rmanconnect )
#=====
# General
set( CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/config/cmake )
find_package( Boost 1.40.0 COMPONENTS system REQUIRED )
find_package( Nuke REQUIRED )
find_package( Doxygen )
# try to find a rman lib (set by the RMAN envvar)
set( RMAN "3Delight" )
if ( $ENV{RMAN} MATCHES "" )
set( RMAN $ENV{RMAN} )
endif ( $ENV{RMAN} MATCHES "" )
find_package( ${RMAN} REQUIRED )
include_directories(
${CMAKE_SOURCE_DIR}/src
${Boost_INCLUDE_DIRS}
${Nuke_INCLUDE_DIR}
${${RMAN}_INCLUDE_DIR}
)
#=====
# Build the Nuke plugin
add_library( nuke_plugin
SHARED
${CMAKE_SOURCE_DIR}/src/nk_rmanConnect.cpp
${CMAKE_SOURCE_DIR}/src/Server.cpp
${CMAKE_SOURCE_DIR}/src/Client.cpp
${CMAKE_SOURCE_DIR}/src/Data.cpp
)
set_target_properties( nuke_plugin
PROPERTIES
PREFIX ""
OUTPUT_NAME "nk_rmanConnect"
COMPILE_FLAGS "-DUSE_GLEW ${Nuke_COMPILE_FLAGS}"
LINK_FLAGS "${Nuke_LINK_FLAGS}"
)
target_link_libraries( nuke_plugin
${Boost_LIBRARIES}
${Nuke_LIBRARIES}
)
#=====
# Build the Rman plugin
add_library( rman_plugin
SHARED
${CMAKE_SOURCE_DIR}/src/d_rmanConnect.cpp
${CMAKE_SOURCE_DIR}/src/Client.cpp
${CMAKE_SOURCE_DIR}/src/Data.cpp
)
set_target_properties( rman_plugin
PROPERTIES
PREFIX ""
OUTPUT_NAME "d_rmanConnect"
COMPILE_FLAGS "${${RMAN}_COMPILE_FLAGS}"
)
# PRMan requires .so even on MacOSX
if( RMAN MATCHES "PRMan" )
set_target_properties( rman_plugin
PROPERTIES
SUFFIX ".so"
)
endif( RMAN MATCHES "PRMan" )
target_link_libraries( rman_plugin
${Boost_LIBRARIES}
${${RMAN}_LIBRARIES}
)
#=====
# Build docs (after the nuke plugin is built)
IF( DOXYGEN_FOUND )
ADD_CUSTOM_COMMAND( TARGET nuke_plugin
POST_BUILD
COMMAND ${DOXYGEN_EXECUTABLE}
${CMAKE_SOURCE_DIR}/"config/docs/doxygen.cfg"
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
)
ENDIF( DOXYGEN_FOUND )