forked from vcg-uvic/viper
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
67 lines (54 loc) · 2.37 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
cmake_minimum_required (VERSION 3.2)
project (VIPER LANGUAGES CXX CUDA)
file(GLOB VIPER_SOURCES "Viper/*.cpp")
file(GLOB VIPER_CUDA_SOURCES "Viper/*.cu")
file(GLOB SPHEREWEIGHTS_SOURCES "SphereWeights/*.cpp")
file(GLOB DEMO_SOURCES "Demo/*.cu")
file(GLOB SPHEREWEIGHTS_CUDA_SOURCES "SphereWeights/*.cu")
set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}/cmake)
include(cmake/configure.cmake)
include_directories(
${PROJECT_SOURCE_DIR}/Viper
${PROJECT_SOURCE_DIR}/SphereWeights
${PROJECT_SOURCE_DIR}/libs/glm/
${PROJECT_SOURCE_DIR}/libs/eigen/
${PROJECT_SOURCE_DIR}/libs/rapidjson/include/
${PROJECT_SOURCE_DIR}/libs/opengp/src/
${PROJECT_SOURCE_DIR}/libs/igl/include/
${PROJECT_SOURCE_DIR}/libs/TetWild/
${PROJECT_SOURCE_DIR}/libs/geogram/src/lib/
)
### ViperLib
cuda_add_library(ViperLib_static STATIC ${VIPER_SOURCES} ${VIPER_CUDA_SOURCES})
target_link_libraries(ViperLib_static ${COMMON_LIBS} CGAL Boost::thread gmp mpfr)
cuda_add_library(ViperLib SHARED ${VIPER_SOURCES} ${VIPER_CUDA_SOURCES})
target_link_libraries(ViperLib ${COMMON_LIBS} CGAL Boost::thread gmp mpfr)
### SphereWeights
add_executable(sphereweights ${SPHEREWEIGHTS_SOURCES})
target_include_directories(
sphereweights
PRIVATE
${PROJECT_SOURCE_DIR}/SphereWeights
)
target_link_libraries(sphereweights ${COMMON_LIBS} CGAL Boost::thread tbb gmp mpfr GLEW GL glfw png ViperLib)
### Demo
cuda_add_executable(demo ${DEMO_SOURCES})
target_link_libraries(demo ${COMMON_LIBS} CGAL Boost::thread tbb gmp mpfr GLEW GL glfw png ViperLib)
# configure_file(${PROJECT_SOURCE_DIR}/data/octopus.obj ${PROJECT_BINARY_DIR}/octopus.obj)
configure_file(${PROJECT_SOURCE_DIR}/data/texture.bin ${PROJECT_BINARY_DIR}/texture.bin COPYONLY)
configure_file(${PROJECT_SOURCE_DIR}/data/mesh.bin ${PROJECT_BINARY_DIR}/mesh.bin COPYONLY)
set(Viper_SO_PATH ${PROJECT_BINARY_DIR}/libViperLib.so)
## PYBIND
set(PYBIND11_CPP_STANDARD -std=c++11)
add_subdirectory(pybind11)
#
# get_target_property(modifacecopts module INTERFACE_COMPILE_OPTIONS)
# list(REMOVE_ITEM modefacecopts "-fvisibility=hidden")
# set_target_properties(module PROPERTIES INTERFACE_COMPILE_OPTIONS "${modifacecopts}")
#
# add_library(dummy MODULE
# Demo/example.cpp
# Viper/Scene.cu
# )
pybind11_add_module(interface Demo/interface.cpp)
target_link_libraries(interface PRIVATE ${COMMON_LIBS} CGAL Boost::thread tbb gmp mpfr GLEW GL glfw png ViperLib)