Files
nd-wfc/examples/CMakeLists.txt
cdemeyer-teachx 76ad49b05a wfc compiled
2025-08-24 17:15:09 +09:00

34 lines
1.0 KiB
CMake

set(EXAMPLE_SOURCES
)
# Create executables for each example
foreach(EXAMPLE_SOURCE ${EXAMPLE_SOURCES})
get_filename_component(EXAMPLE_NAME ${EXAMPLE_SOURCE} NAME_WE)
add_executable(${EXAMPLE_NAME} ${EXAMPLE_SOURCE})
target_link_libraries(${EXAMPLE_NAME}
PRIVATE
nd-wfc
# SDL3::SDL3 # Will be enabled when SDL3 is needed
)
target_include_directories(${EXAMPLE_NAME}
PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}/../include
)
set_target_properties(${EXAMPLE_NAME} PROPERTIES
CXX_STANDARD 17
CXX_STANDARD_REQUIRED ON
RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/examples
)
endforeach()
# Copy resources if they exist
if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/resources)
add_custom_target(copy-example-resources
COMMAND ${CMAKE_COMMAND} -E copy_directory
${CMAKE_CURRENT_SOURCE_DIR}/resources
${CMAKE_BINARY_DIR}/examples/resources
)
# Dependencies for resource copying would go here if needed
endif()