Skip to content

Commit 4bb066b

Browse files
committed
Update installation regarding discussions
1 parent a1b4189 commit 4bb066b

File tree

1 file changed

+21
-2
lines changed

1 file changed

+21
-2
lines changed

CMakeLists.txt

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,10 +120,27 @@ if(SofaPython3Tools OR SofaPython3_FOUND)
120120
)
121121
endif()
122122

123-
#Install examples without copying debug files
123+
##############################
124+
#### EXAMPLE INSTALLATION ####
125+
##############################
126+
# Install examples without copying debug files by default except those listed in example_debug_folder_to_install
127+
128+
set(example_debug_folder_to_install "others/caduceus" "others/hexaBeam" "softRobots/finger" "softRobots/sofiaLeg")
129+
130+
set(regex_example_debug_folder_to_install "")
131+
FOREACH(folder ${example_debug_folder_to_install})
132+
if(NOT "${regex_example_debug_folder_to_install}" STREQUAL "")
133+
string(APPEND regex_example_debug_folder_to_install "|")
134+
endif ()
135+
string(APPEND regex_example_debug_folder_to_install ".*/${folder}/reduced/debug/.*")
136+
ENDFOREACH ()
137+
124138
FILE(GLOB_RECURSE all_ressources ${CMAKE_CURRENT_SOURCE_DIR}/examples/*)
125139
FOREACH(file_path ${all_ressources})
126-
if( NOT file_path MATCHES ".*/debug/.*" )
140+
if( file_path MATCHES "${regex_example_debug_folder_to_install}" OR NOT file_path MATCHES ".*/debug/.*" )
141+
message(${file_path})
142+
endif ()
143+
if( file_path MATCHES "${regex_example_debug_folder_to_install}" OR NOT file_path MATCHES ".*/debug/.*" )
127144
string(REPLACE "${CMAKE_CURRENT_SOURCE_DIR}/examples/" "" install_file_path "${file_path}")
128145
if( install_file_path MATCHES ".*/.*" )
129146
string(FIND "${install_file_path}" "/" last_slash_idx REVERSE)
@@ -136,6 +153,8 @@ FOREACH(file_path ${all_ressources})
136153
COMPONENT resources)
137154
endif()
138155
ENDFOREACH ()
156+
##############################
157+
139158

140159
# Move all resources when install: examples, doc and python files
141160
install(FILES "README.md" "LICENSE" DESTINATION .)

0 commit comments

Comments
 (0)