Skip to content

Commit ec312a3

Browse files
committed
[cmake] Drop glob for src files, add them manually - remove some unnecessary directives
1 parent 19504be commit ec312a3

File tree

1 file changed

+85
-9
lines changed

1 file changed

+85
-9
lines changed

CMakeLists.txt

Lines changed: 85 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,97 @@ project(CollisionAlgorithm VERSION 0.1 LANGUAGES CXX)
33

44
set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
55

6-
file(GLOB_RECURSE HEADER_FILES "src/*.h" "src/*.inl")
7-
file(GLOB_RECURSE SOURCE_FILES "src/*.cpp")
8-
file(GLOB_RECURSE SCENES_FILES "scenes/*.scn" "*.xml")
9-
file(GLOB_RECURSE IGNORED_FILES "ignored/*.h" "ignored/*.inl" "ignored/*.cpp")
10-
file(GLOB_RECURSE DEPRECATED_FILES "deprecated/*.h" "deprecated/*.inl" "deprecated/*.cpp")
11-
126
find_package(Sofa.Simulation.Core REQUIRED)
137
find_package(Sofa.Component.StateContainer REQUIRED)
148
find_package(Sofa.Component.Constraint.Lagrangian.Solver REQUIRED)
159
find_package(Sofa.GL REQUIRED)
1610

17-
#include_directories("${CMAKE_CURRENT_SOURCE_DIR}/ignored")
18-
#include_directories("${CMAKE_CURRENT_SOURCE_DIR}/deprecated")
11+
set(COLLISIONALGORITHM_SRC "src/${PROJECT_NAME}")
12+
13+
set(HEADER_FILES
14+
${COLLISIONALGORITHM_SRC}/BaseAABBBroadPhase.h
15+
${COLLISIONALGORITHM_SRC}/BaseAlgorithm.h
16+
${COLLISIONALGORITHM_SRC}/BaseElement.h
17+
${COLLISIONALGORITHM_SRC}/BaseGeometry.h
18+
${COLLISIONALGORITHM_SRC}/BaseOperation.h
19+
${COLLISIONALGORITHM_SRC}/BaseProximity.h
20+
${COLLISIONALGORITHM_SRC}/CollisionPipeline.h
21+
${COLLISIONALGORITHM_SRC}/DataDetectionOutput.h
22+
${COLLISIONALGORITHM_SRC}/ElementIterator.h
23+
${COLLISIONALGORITHM_SRC}/InternalData.h
24+
25+
${COLLISIONALGORITHM_SRC}/algorithm/Find2DClosestProximityAlgorithm.h
26+
${COLLISIONALGORITHM_SRC}/algorithm/FindClosestProximityAlgorithm.h
27+
${COLLISIONALGORITHM_SRC}/algorithm/InsertionAlgorithm.h
28+
29+
${COLLISIONALGORITHM_SRC}/broadphase/AABBBroadPhase.h
30+
${COLLISIONALGORITHM_SRC}/broadphase/FullAABBBroadPhase.h
31+
32+
${COLLISIONALGORITHM_SRC}/elements/EdgeElement.h
33+
${COLLISIONALGORITHM_SRC}/elements/PointElement.h
34+
${COLLISIONALGORITHM_SRC}/elements/TetrahedronElement.h
35+
${COLLISIONALGORITHM_SRC}/elements/TriangleElement.h
36+
37+
${COLLISIONALGORITHM_SRC}/filters/DistanceFilter.h
38+
39+
${COLLISIONALGORITHM_SRC}/geometry/EdgeGeometry.h
40+
${COLLISIONALGORITHM_SRC}/geometry/PointGeometry.h
41+
${COLLISIONALGORITHM_SRC}/geometry/SubsetGeometry.h
42+
${COLLISIONALGORITHM_SRC}/geometry/TetrahedronGeometry.h
43+
${COLLISIONALGORITHM_SRC}/geometry/TriangleGeometry.h
44+
45+
${COLLISIONALGORITHM_SRC}/operations/CreateCenterProximity.h
46+
${COLLISIONALGORITHM_SRC}/operations/FindClosestProximity.h
47+
${COLLISIONALGORITHM_SRC}/operations/Project.h
48+
49+
${COLLISIONALGORITHM_SRC}/proximity/EdgeProximity.h
50+
${COLLISIONALGORITHM_SRC}/proximity/FixedProximity.h
51+
${COLLISIONALGORITHM_SRC}/proximity/MechanicalProximity.h
52+
${COLLISIONALGORITHM_SRC}/proximity/MultiProximity.h
53+
${COLLISIONALGORITHM_SRC}/proximity/PointProximity.h
54+
${COLLISIONALGORITHM_SRC}/proximity/TetrahedronProximity.h
55+
${COLLISIONALGORITHM_SRC}/proximity/TriangleProximity.h
56+
57+
${COLLISIONALGORITHM_SRC}/toolbox/EdgeToolBox.h
58+
${COLLISIONALGORITHM_SRC}/toolbox/PointToolBox.h
59+
${COLLISIONALGORITHM_SRC}/toolbox/TetrahedronToolBox.h
60+
${COLLISIONALGORITHM_SRC}/toolbox/TriangleToolBox.h
61+
)
62+
63+
set(SOURCE_FILES
64+
${COLLISIONALGORITHM_SRC}/initPlugin.cpp
65+
66+
${COLLISIONALGORITHM_SRC}/CollisionPipeline.cpp
67+
68+
${COLLISIONALGORITHM_SRC}/algorithm/Find2DClosestProximityAlgorithm.cpp
69+
${COLLISIONALGORITHM_SRC}/algorithm/FindClosestProximityAlgorithm.cpp
70+
${COLLISIONALGORITHM_SRC}/algorithm/InsertionAlgorithm.cpp
71+
72+
${COLLISIONALGORITHM_SRC}/broadphase/AABBBroadPhase.cpp
73+
${COLLISIONALGORITHM_SRC}/broadphase/FullAABBBroadPhase.cpp
74+
75+
${COLLISIONALGORITHM_SRC}/elements/EdgeElement.cpp
76+
${COLLISIONALGORITHM_SRC}/elements/PointElement.cpp
77+
${COLLISIONALGORITHM_SRC}/elements/TetrahedronElement.cpp
78+
${COLLISIONALGORITHM_SRC}/elements/TriangleElement.cpp
1979

20-
set_source_files_properties(${IGNORED_FILES} PROPERTIES HEADER_FILE_ONLY TRUE)
80+
${COLLISIONALGORITHM_SRC}/filters/DistanceFilter.cpp
81+
82+
${COLLISIONALGORITHM_SRC}/geometry/EdgeGeometry.cpp
83+
${COLLISIONALGORITHM_SRC}/geometry/PointGeometry.cpp
84+
${COLLISIONALGORITHM_SRC}/geometry/SubsetGeometry.cpp
85+
${COLLISIONALGORITHM_SRC}/geometry/TetrahedronGeometry.cpp
86+
${COLLISIONALGORITHM_SRC}/geometry/TriangleGeometry.cpp
87+
88+
${COLLISIONALGORITHM_SRC}/operations/CreateCenterProximity.cpp
89+
${COLLISIONALGORITHM_SRC}/operations/FindClosestProximity.cpp
90+
${COLLISIONALGORITHM_SRC}/operations/Project.cpp
91+
92+
${COLLISIONALGORITHM_SRC}/toolbox/EdgeToolBox.cpp
93+
${COLLISIONALGORITHM_SRC}/toolbox/PointToolBox.cpp
94+
${COLLISIONALGORITHM_SRC}/toolbox/TetrahedronToolBox.cpp
95+
${COLLISIONALGORITHM_SRC}/toolbox/TriangleToolBox.cpp
96+
)
2197

2298
add_library(${PROJECT_NAME} SHARED ${SOURCE_FILES} ${HEADER_FILES} ${README_FILES})
2399

0 commit comments

Comments
 (0)