aboutsummaryrefslogtreecommitdiff
path: root/src/example/CMakeLists.txt
diff options
context:
space:
mode:
authormax-001 <maxsmits21@kpnmail.nl>2024-12-17 08:53:03 +0100
committermax-001 <maxsmits21@kpnmail.nl>2024-12-17 08:53:03 +0100
commit72f04cc18113785b8f57d95254d28e7d64d584aa (patch)
tree47b08f2f781d05679f76406df4838bf8697f7dc2 /src/example/CMakeLists.txt
parent00f3ee853d94b607646e311d6bc9aca1736ab259 (diff)
Placed every class into seperate file
Diffstat (limited to 'src/example/CMakeLists.txt')
-rw-r--r--src/example/CMakeLists.txt36
1 files changed, 17 insertions, 19 deletions
diff --git a/src/example/CMakeLists.txt b/src/example/CMakeLists.txt
index 187ed46..911a99c 100644
--- a/src/example/CMakeLists.txt
+++ b/src/example/CMakeLists.txt
@@ -1,22 +1,20 @@
-# all examples
-add_custom_target(examples)
+set(GAME_HEADERS
+ Aquarium.h
+ Background.h
+ Forest.h
+ Hallway.h
+ Start.h
+)
-# add_example(target_name [SOURCES...])
-function(add_example target_name)
- # if SOURCES is not specified
- if(NOT ARGV1)
- # A .cpp file with target_name exists, and should be used
- set(sources ${target_name}.cpp)
- else()
- set(sources ${ARGV})
- endif()
+set(GAME_SOURCES
+ game.cpp
+ Aquarium.cpp
+ Background.cpp
+ Forest.cpp
+ Hallway.cpp
+ Start.cpp
+)
- add_executable(${target_name} EXCLUDE_FROM_ALL ${sources})
- target_link_libraries(${target_name} PUBLIC crepe)
- add_dependencies(examples ${target_name})
-endfunction()
+add_executable(game ${GAME_SOURCES} ${GAME_HEADERS})
-add_example(rendering_particle)
-add_example(game)
-add_example(button)
-add_example(AITest)
+target_link_libraries(game PUBLIC crepe)