Skip to content

Commit

Permalink
hotfix CMakeLists
Browse files Browse the repository at this point in the history
  • Loading branch information
hverhelst committed Dec 10, 2024
1 parent 3ca0eaf commit 1d83fe0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
11 changes: 5 additions & 6 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -54,15 +54,14 @@ add_definitions(-DELAST_DATA_DIR="${CMAKE_CURRENT_SOURCE_DIR}/filedata/")

# add example files
if(GISMO_BUILD_EXAMPLES)
add_custom_target(${PROJECT_NAME}-examples)
add_subdirectory(examples)
add_custom_target(${PROJECT_NAME}-examples)
add_subdirectory(examples)
get_property(dirs TARGET ${PROJECT_NAME}-examples PROPERTY BUILDSYSTEM_TARGETS)
message(STATUS "dirs: ${dirs}")
else()
add_subdirectory(examples EXCLUDE_FROM_ALL)
add_subdirectory(examples EXCLUDE_FROM_ALL)
endif(GISMO_BUILD_EXAMPLES)

# Print the contents of {PROJECT_NAME}-examples
get_property(dirs TARGET ${PROJECT_NAME}-examples PROPERTY BUILDSYSTEM_TARGETS)
message(STATUS "dirs: ${dirs}")


# # add unittests
Expand Down
2 changes: 1 addition & 1 deletion examples/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ foreach(file ${FILES})
set_property(TEST ${tarname} PROPERTY LABELS "${PROJECT_NAME}-examples")
if(GISMO_BUILD_EXAMPLES)
set_target_properties(${tarname} PROPERTIES FOLDER "${PROJECT_NAME}")
add_dependencies(${PROJECT_NAME}-examples ${tarname})
else(GISMO_BUILD_EXAMPLES)
set_target_properties(${tarname} PROPERTIES
FOLDER "${PROJECT_NAME}"
EXCLUDE_FROM_ALL TRUE)
endif(GISMO_BUILD_EXAMPLES)
add_dependencies(${PROJECT_NAME}-examples ${tarname})
# install the example executables (optionally)
install(TARGETS ${tarname} DESTINATION "${BIN_INSTALL_DIR}" COMPONENT exe OPTIONAL)
endforeach(file ${FILES})

0 comments on commit 1d83fe0

Please sign in to comment.