aboutsummaryrefslogtreecommitdiffstats
path: root/examples/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'examples/CMakeLists.txt')
-rw-r--r--examples/CMakeLists.txt12
1 files changed, 10 insertions, 2 deletions
diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt
index 16b20795..a75f6528 100644
--- a/examples/CMakeLists.txt
+++ b/examples/CMakeLists.txt
@@ -1,2 +1,10 @@
-add_executable(simplegame simplegame/main.cpp)
-target_link_libraries(simplegame yage)
+function(make_example name)
+
+ file(GLOB SOURCES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${name}/*.cpp)
+ add_executable(${name} ${SOURCES})
+ target_link_libraries(${name} yage)
+
+endfunction(make_test)
+
+make_example(simplegame)
+make_example(shooter)