Skip to content

Commit

Permalink
MAINT: fix CMake script.
Browse files Browse the repository at this point in the history
  • Loading branch information
Odd Kiva committed Jul 15, 2024
1 parent 7bf6726 commit d10b5e9
Showing 1 changed file with 15 additions and 6 deletions.
21 changes: 15 additions & 6 deletions cpp/examples/Kalpana/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,12 +1,21 @@
add_custom_target(copy_data_folder_to_binary_dir)
add_custom_command(
TARGET copy_data_folder_to_binary_dir
COMMAND
if (CMAKE_CONFIGURATION_TYPES)
add_custom_command(
TARGET copy_data_folder_to_binary_dir
COMMAND
${CMAKE_COMMAND} -E copy_directory ${CMAKE_SOURCE_DIR}/data/
# Check append ("Debug", "Release") subfolder if we are in a multi-config
# Append ("Debug", "Release") subfolder if we are in a multi-config
# project.
${CMAKE_BINARY_DIR}/bin/$<$<BOOL:${CMAKE_CONFIGURATION_TYPES}>:$<CONFIG>>data
)
${CMAKE_BINARY_DIR}/bin/$<CONFIG>/data
)
else ()
add_custom_command(
TARGET copy_data_folder_to_binary_dir
COMMAND
${CMAKE_COMMAND} -E copy_directory ${CMAKE_SOURCE_DIR}/data/
${CMAKE_BINARY_DIR}/bin/data
)
endif()
set_property(TARGET copy_data_folder_to_binary_dir #
PROPERTY FOLDER "Examples")

Expand Down

0 comments on commit d10b5e9

Please sign in to comment.