-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathCMakeLists.txt
42 lines (29 loc) · 1.27 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
cmake_minimum_required(VERSION 3.1)
project(OverfitShapes LANGUAGES CXX)
set(CMAKE_INSTALL_PREFIX "${CMAKE_BINARY_DIR}/workspace" CACHE PATH "Install location to move all the files" FORCE)
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
option(BUILD_RENDERER "Build renderer" OFF)
if (BUILD_RENDERER)
set(CMAKE_CUDA_SEPARABLE_COMPILATION ON)
set(CMAKE_CUDA_ARCHITECTURES 75 CACHE STRING "CUDA architectures" FORCE)
endif()
#Build fast winding numbers library
find_package(TBB REQUIRED)
file(GLOB WNFILES ${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/WindingNumber/*.cpp)
add_library(FastWindingNumbers STATIC ${WNFILES})
target_include_directories(FastWindingNumbers PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/WindingNumbers/)
target_link_libraries(FastWindingNumbers PUBLIC TBB::tbb)
set(3rdparty_DIR ${CMAKE_CURRENT_SOURCE_DIR}/3rdparty)
set(UNIFORM_SAMPLER_DIR ${CMAKE_CURRENT_SOURCE_DIR}/UniformSampleNBall)
set(UTILITY_DIR ${CMAKE_CURRENT_SOURCE_DIR}/Utilities)
#Build point sampler
find_package(Eigen3 REQUIRED)
option(BUILD_PYTHON "Build Python linkage" ON)
if (BUILD_PYTHON)
add_subdirectory("${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/pybind11")
endif()
option(BUILD_EXAMPLES "Build examples" ON)
add_subdirectory(SDFSampler)
if (BUILD_RENDERER)
add_subdirectory(Renderer)
endif()