Files
pokemon-battle-engine/examples/CMakeLists.txt
cdemeyer-teachx 1c1e7f8d51 Google Tests
2025-08-14 10:19:03 +09:00

27 lines
770 B
CMake

# Examples CMakeLists.txt
# Collect all example source files
file(GLOB_RECURSE EXAMPLE_SOURCES "*.cpp" "*.cc" "*.cxx")
# Create example executables
foreach(EXAMPLE_SOURCE ${EXAMPLE_SOURCES})
get_filename_component(EXAMPLE_NAME ${EXAMPLE_SOURCE} NAME_WE)
add_executable(${EXAMPLE_NAME} ${EXAMPLE_SOURCE})
# Link with our library
target_link_libraries(${EXAMPLE_NAME}
PRIVATE
PokemonSim::pokemon_battle_sim
)
# Include directories
target_include_directories(${EXAMPLE_NAME}
PRIVATE
${CMAKE_SOURCE_DIR}/include
)
endforeach()
# Example of adding examples manually:
# add_executable(battle_example battle_example.cpp)
# target_link_libraries(battle_example PRIVATE PokemonSim::pokemon_battle_sim)