-
Notifications
You must be signed in to change notification settings - Fork 3
/
CMakeLists.txt
32 lines (24 loc) · 1.2 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
cmake_minimum_required( VERSION 3.6 )
project( cxxbridge )
if(NOT WIN32)
set(CMAKE_CXX_FLAGS_DEBUG "-g")
set(CMAKE_CXX_FLAGS_RELEASE "-O3")
endif()
# CMAKE_PREFIX_PATH must contain the path to the toolkit/cmake subdirectory of
# the Houdini installation. See the "Compiling with CMake" section of the HDK
# documentation for more details, which describes several options for
# specifying this path.
list( APPEND CMAKE_PREFIX_PATH "$ENV{HFS}/toolkit/cmake" )
# Locate Houdini's libraries and header files.
# Registers an imported library target named 'Houdini'.
find_package( Houdini REQUIRED )
set( library_name cxxbridge )
# Add a library and its source files.
add_library( ${library_name} STATIC "${CMAKE_BINARY_DIR}/../cxxbridge/sources/implicits/src/lib.rs.cc" )
# Link against the Houdini libraries, and add required include directories and
# compile definitions.
target_link_libraries( ${library_name} Houdini )
# Needed to expose cimplicits.h
target_include_directories( ${library_name} PUBLIC "${CMAKE_BINARY_DIR}/../../../../")
# Sets several common target properties, such as the library's output directory.
houdini_configure_target( ${library_name} INSTDIR ${CMAKE_INSTALL_PREFIX} LIB_PREFIX lib)