forked from chadrik/renderconnect
-
Notifications
You must be signed in to change notification settings - Fork 17
/
CMakeLists.txt
96 lines (81 loc) · 2.11 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) 2019, Dan Bethell, Johannes Saam, Vahan Sosoyan.
# All rights reserved.
#
# For license information regarding redistribution and
# use, please refer to the COPYING file.
#
#==========
cmake_minimum_required( VERSION 2.6 )
project( aton )
#=====
# General
set( CMAKE_BUILD_TYPE Release )
set( Boost_USE_STATIC_LIBS ON )
set( CMAKE_CXX_COMPILER g++ )
set( CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake )
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -include cstddef" )
find_package( Boost 1.54.0 COMPONENTS regex filesystem system REQUIRED )
find_package( Nuke REQUIRED )
include_directories(
${CMAKE_SOURCE_DIR}/src
${Boost_INCLUDE_DIRS}
${Nuke_INCLUDE_DIR}
)
#=====
# Build the Nuke plugin
add_library( nuke_plugin
SHARED
${CMAKE_SOURCE_DIR}/src/aton_node.cpp
${CMAKE_SOURCE_DIR}/src/aton_framebuffer.cpp
${CMAKE_SOURCE_DIR}/src/aton_server.cpp
${CMAKE_SOURCE_DIR}/src/aton_client.cpp
)
set_target_properties( nuke_plugin
PROPERTIES
PREFIX ""
OUTPUT_NAME "aton"
COMPILE_FLAGS "-DUSE_GLEW ${Nuke_COMPILE_FLAGS}"
LINK_FLAGS "${Nuke_LINK_FLAGS}"
)
target_link_libraries( nuke_plugin
${Boost_LIBRARIES}
${Nuke_LIBRARIES}
)
#=====
# Build the Arnold plugin
find_package( Arnold )
if( ARNOLD_FOUND )
include_directories( ${Arnold_INCLUDE_DIR} )
# Aton Driver
add_library( arnold_plugin
SHARED
${CMAKE_SOURCE_DIR}/src/aton_driver_arnold.cpp
${CMAKE_SOURCE_DIR}/src/aton_client.cpp
)
set_target_properties( arnold_plugin
PROPERTIES
PREFIX ""
OUTPUT_NAME "driver_aton"
COMPILE_FLAGS "${Arnold_COMPILE_FLAGS}"
)
target_link_libraries( arnold_plugin
${Boost_LIBRARIES}
${Arnold_ai_LIBRARY}
)
# Aton Operator
add_library( arnold_operator
SHARED
${CMAKE_SOURCE_DIR}/src/aton_operator_arnold.cpp
)
set_target_properties( arnold_operator
PROPERTIES
PREFIX ""
OUTPUT_NAME "operator_aton"
COMPILE_FLAGS "${Arnold_COMPILE_FLAGS}"
)
target_link_libraries( arnold_operator
${Arnold_ai_LIBRARY}
)
endif( ARNOLD_FOUND )