-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathCMakeLists.txt
38 lines (30 loc) · 1.13 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
CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
PROJECT ( OutOfCoreSparseVoxelOctree )
FIND_PACKAGE ( OpenMP REQUIRED )
SET(Trimesh2_INCLUDE_DIR "src/libs/trimesh2/include" CACHE PATH "Path to Trimesh2 includes")
FIND_FILE(Trimesh2_TriMesh_h TriMesh.h ${Trimesh2_INCLUDE_DIR})
IF(NOT Trimesh2_TriMesh_h)
message(SEND_ERROR "Can't find TriMesh.h in ${Trimesh2_INCLUDE_DIR}")
ENDIF()
MARK_AS_ADVANCED(Trimesh2_TriMesh_h)
INCLUDE_DIRECTORIES(${Trimesh2_INCLUDE_DIR})
SET(Trimesh2_LINK_DIR "src/libs/trimesh2/lib.Linux64" CACHE PATH "Path to Trimesh2 libraries")
FIND_LIBRARY(Trimesh2_LIBRARY trimesh ${Trimesh2_LINK_DIR})
IF(NOT Trimesh2_LIBRARY)
message(SEND_ERROR "Can't find libtrimesh.a in ${Trimesh2_LINK_DIR}")
ENDIF()
MARK_AS_ADVANCED(Trimesh2_LIBRARY)
IF (MSVC)
ADD_DEFINITIONS ( -openmp )
ELSE ()
# Apple and Linux both uses GCC
ADD_DEFINITIONS ( -fopenmp )
ENDIF (MSVC)
INCLUDE_DIRECTORIES(
src/libs/libtri/include
)
ADD_EXECUTABLE(dag_builder
src/svo_builder/DAGmain.cpp
src/svo_builder/DAGBuilder.cpp
src/svo_builder/DAGBuilder.h
src/svo_builder/DAGNode.h src/svo_builder/DAGNode.cpp)