forked from sideeffects/HoudiniUsdBridge
-
Notifications
You must be signed in to change notification settings - Fork 1
/
CMakeLists.txt
63 lines (51 loc) · 1.77 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
# Contributed by Nathan Rusch, Luma Pictures
cmake_minimum_required(VERSION 3.12)
project(HoudiniUsdBridge)
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
# Options
set(HOUDINI_PATH ""
CACHE STRING
"The path to the Houdini installation. This is optional if the HFS environment variable is set.")
set(BOOST_NAMESPACE "boost"
CACHE STRING
"The namespace of the Boost build you are using with USD.")
set(USD_LIB_PREFIX "lib"
CACHE STRING
"The name prefix of the USD libraries to build/link against.")
option(COPY_HOUDINI_USD_PLUGINS "Copy $HH/dso/usd_plugins from Houdini to the project installation directory" ON)
set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}/cmake)
# Find Houdini
if (WIN32)
find_path(HOUDINI_ROOT custom/houdini/dsolib/libFUSE.lib
HINTS ${HOUDINI_PATH} ENV HFS
NO_DEFAULT_PATH)
set(PLATFORM_CXX_OPTIONS "")
set(PLATFORM_LINK_OPTIONS "")
else()
find_path(HOUDINI_ROOT dsolib/libHoudiniAPPS3${CMAKE_SHARED_LIBRARY_SUFFIX}
HINTS ${HOUDINI_PATH} ENV HFS
NO_DEFAULT_PATH)
set(PLATFORM_CXX_OPTIONS
-Wno-missing-field-initializers
-Wno-unused-function)
set(PLATFORM_LINK_OPTIONS "-Wl,--exclude-libs,ALL")
endif()
find_path(HOUDINI_INCLUDE_DIR HAPI/HAPI_Version.h
HINTS ${HOUDINI_PATH} ENV HFS
PATH_SUFFIXES toolkit/include
NO_DEFAULT_PATH)
if (NOT (HOUDINI_ROOT AND HOUDINI_INCLUDE_DIR))
message(FATAL_ERROR
"Could not find Houdini dirs (HOUDINI_PATH: \"${HOUDINI_PATH}\", HFS: \"$ENV{HFS}\")")
endif()
message(STATUS "Found Houdini at ${HOUDINI_ROOT}")
# Find other dependencies
find_package(USD REQUIRED)
find_package(Boost
COMPONENTS python
REQUIRED)
find_package(PythonInterp 2.7 REQUIRED)
find_package(PythonLibs 2.7 REQUIRED)
add_subdirectory(src)