-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
92 lines (87 loc) · 3.57 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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
cmake_minimum_required(VERSION 3.15)
project(simConvex)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_MACOSX_RPATH 1)
find_package(Boost REQUIRED)
if(NOT COPPELIASIM_INCLUDE_DIR)
if(DEFINED ENV{COPPELIASIM_ROOT_DIR})
set(COPPELIASIM_INCLUDE_DIR $ENV{COPPELIASIM_ROOT_DIR}/programming/include)
else()
set(COPPELIASIM_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../include)
endif()
endif()
list(APPEND CMAKE_MODULE_PATH ${COPPELIASIM_INCLUDE_DIR}/cmake)
find_package(CoppeliaSim 4.5.1.7 REQUIRED)
coppeliasim_add_plugin(
simConvex
LEGACY
SOURCES
sourceCode/simConvex.cpp
external/hacd/hacdGraph.cpp
external/hacd/hacdHACD.cpp
external/hacd/hacdICHull.cpp
external/hacd/hacdManifoldMesh.cpp
external/hacd/hacdMeshDecimator.cpp
external/hacd/hacdMicroAllocator.cpp
external/hacd/hacdRaycastMesh.cpp
external/vhacd/src/btAlignedAllocator.cpp
external/vhacd/src/btConvexHullComputer.cpp
external/vhacd/src/FloatMath.cpp
external/vhacd/src/VHACD.cpp
external/vhacd/src/VHACD-ASYNC.cpp
external/vhacd/src/vhacdICHull.cpp
external/vhacd/src/vhacdManifoldMesh.cpp
external/vhacd/src/vhacdMesh.cpp
external/vhacd/src/vhacdRaycastMesh.cpp
external/vhacd/src/vhacdVolume.cpp
external/qHull/userprintf_rbox.c
external/qHull/userprintf.c
external/qHull/usermem.c
external/qHull/user.c
external/qHull/stat.c
external/qHull/rboxlib.c
external/qHull/random.c
external/qHull/qset.c
external/qHull/poly2.c
external/qHull/poly.c
external/qHull/merge.c
external/qHull/mem.c
external/qHull/libqhull.c
external/qHull/io.c
external/qHull/global.c
external/qHull/geom2.c
external/qHull/geom.c
${COPPELIASIM_INCLUDE_DIR}/simStack/stackBool.cpp
${COPPELIASIM_INCLUDE_DIR}/simStack/stackNull.cpp
${COPPELIASIM_INCLUDE_DIR}/simStack/stackNumber.cpp
${COPPELIASIM_INCLUDE_DIR}/simStack/stackString.cpp
${COPPELIASIM_INCLUDE_DIR}/simStack/stackArray.cpp
${COPPELIASIM_INCLUDE_DIR}/simStack/stackMap.cpp
${COPPELIASIM_INCLUDE_DIR}/simStack/stackObject.cpp
${COPPELIASIM_INCLUDE_DIR}/simMath/mathFuncs.cpp
${COPPELIASIM_INCLUDE_DIR}/simMath/3Vector.cpp
${COPPELIASIM_INCLUDE_DIR}/simMath/4Vector.cpp
${COPPELIASIM_INCLUDE_DIR}/simMath/7Vector.cpp
${COPPELIASIM_INCLUDE_DIR}/simMath/3X3Matrix.cpp
${COPPELIASIM_INCLUDE_DIR}/simMath/4X4Matrix.cpp
${COPPELIASIM_INCLUDE_DIR}/simMath/mXnMatrix.cpp
${COPPELIASIM_INCLUDE_DIR}/simLib/scriptFunctionData.cpp
${COPPELIASIM_INCLUDE_DIR}/simLib/scriptFunctionDataItem.cpp
)
target_compile_definitions(simConvex PRIVATE SIM_MATH_DOUBLE)
target_include_directories(simConvex PRIVATE external/hacd)
target_include_directories(simConvex PRIVATE external/vhacd/inc)
target_include_directories(simConvex PRIVATE external/vhacd/public)
target_include_directories(simConvex PRIVATE external/vhacd/src)
target_include_directories(simConvex PRIVATE external)
target_include_directories(simConvex PRIVATE external/qHull)
target_include_directories(simConvex PRIVATE ${COPPELIASIM_INCLUDE_DIR}/simMath)
target_include_directories(simConvex PRIVATE ${COPPELIASIM_INCLUDE_DIR}/simStack)
target_include_directories(simConvex PRIVATE ${COPPELIASIM_INCLUDE_DIR}/simLib)
coppeliasim_add_lua(lua/simConvex.lua)
coppeliasim_add_lua(lua/simConvex-ce.lua)
coppeliasim_add_lua(lua/simQHull.lua)
coppeliasim_add_addon("addOns/Convex decomposition coacd.py")
coppeliasim_add_addon("addOns/Convex decomposition hacd.lua")
coppeliasim_add_addon("addOns/Convex decomposition vhacd.lua")
coppeliasim_add_addon("addOns/Convex hull.lua")