-
Notifications
You must be signed in to change notification settings - Fork 41
/
CMakeLists.txt
58 lines (41 loc) · 1.48 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
# >=3.1 is required for CMAKE_CXX_STANDARD
cmake_minimum_required(VERSION 3.1)
project(usdqt)
if (UNIX AND NOT APPLE)
set(LINUX TRUE)
endif ()
set(CMAKE_MODULE_PATH "${CMAKE_MODULE_PATH};${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules;${CMAKE_CURRENT_SOURCE_DIR}/cmake/macros")
if (NOT MSVC)
add_compile_options(-Wall -Wno-unused-local-typedefs -Wno-deprecated )
else()
add_compile_options("/DNOMINMAX")
endif()
add_compile_options(-DBUILD_OPTLEVEL_OPT -DBUILD_COMPONENT_SRC_PREFIX="")
option(INSTALL_PURE_PYTHON "Install pure python files. Disable to only install compiled extension" ON)
set(BOOST_SYMBOL_NAMESPACE "boost"
CACHE STRING
"The symbol namespace used in the Boost build. Defaults to \"boost\"")
include(Private)
if (NOT DEFINED CMAKE_CXX_STANDARD)
set(CMAKE_CXX_STANDARD 14)
endif()
set(CMAKE_CXX_STANDARD_REQUIRED ON)
find_package(USD REQUIRED)
find_package(TBB REQUIRED)
find_package(PythonInterp 2.7 REQUIRED)
find_package(PythonLibs 2.7 REQUIRED)
set(Boost_USE_STATIC_LIBS OFF)
find_package(Boost COMPONENTS python27)
if (NOT Boost_FOUND)
find_package(Boost COMPONENTS python REQUIRED)
endif()
include_directories(${Boost_INCLUDE_DIRS})
include_directories(${USD_INCLUDE_DIR})
link_directories(${USD_LIBRARY_DIR})
include_directories(SYSTEM ${PYTHON_INCLUDE_DIRS})
include_directories(SYSTEM ${TBB_INCLUDE_DIRS})
add_subdirectory(pxr)
# TODO: Compile installed .py files as well
install(DIRECTORY treemodel
DESTINATION lib/python
PATTERN "*.py")