forked from Forceflow/ooc_svo_builder
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
71 lines (59 loc) · 1.86 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
68
69
70
71
CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
PROJECT ( OutOfCoreSparseVoxelOctree )
FIND_PACKAGE ( OpenMP REQUIRED )
SET(Trimesh2_INCLUDE_DIR "" 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 "" 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/ooc_svo_builder/tri_convert
./src/ooc_svo_builder/tri_tools/include
)
SET(SVO_BUILDER_SRCS
./src/ooc_svo_builder/svo_builder/main.cpp
./src/ooc_svo_builder/svo_builder/OctreeBuilder.cpp
./src/ooc_svo_builder/svo_builder/partitioner.cpp
./src/ooc_svo_builder/svo_builder/voxelizer.cpp
)
ADD_EXECUTABLE ( svo_builder ${SVO_BUILDER_SRCS} )
ADD_EXECUTABLE ( svo_builder_binary ${SVO_BUILDER_SRCS} )
SET_TARGET_PROPERTIES(svo_builder_binary PROPERTIES
COMPILE_FLAGS "-DBINARY_VOXELIZATION ${SHARED_FLAGS}"
)
SET(TRI_CONVERT_SRCS
./src/ooc_svo_builder/tri_convert/tri_convert.cpp
)
ADD_EXECUTABLE ( tri_convert ${TRI_CONVERT_SRCS} )
ADD_EXECUTABLE ( tri_convert_binary ${TRI_CONVERT_SRCS} )
SET_TARGET_PROPERTIES(tri_convert_binary PROPERTIES
COMPILE_FLAGS "-DBINARY_VOXELIZATION ${SHARED_FLAGS}"
)
TARGET_LINK_LIBRARIES ( svo_builder
gomp
)
TARGET_LINK_LIBRARIES ( svo_builder_binary
gomp
)
TARGET_LINK_LIBRARIES ( tri_convert
${Trimesh2_LIBRARY}
gomp
)
TARGET_LINK_LIBRARIES ( tri_convert_binary
${Trimesh2_LIBRARY}
gomp
)