Skip to content

Commit 0f0b5e7

Browse files
committed
have CMake auto-detect new sample apps
1 parent bab89de commit 0f0b5e7

File tree

1 file changed

+11
-7
lines changed

1 file changed

+11
-7
lines changed
Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
11
cmake_minimum_required(VERSION 3.0.0)
22
project(io2d CXX)
33

4-
add_subdirectory(draw_cpp)
5-
add_subdirectory(rocks_in_space)
6-
add_subdirectory(svg)
7-
add_subdirectory(life)
8-
add_subdirectory(cpu_load)
9-
add_subdirectory(sprites)
10-
add_subdirectory(maps)
4+
# Search for and add sample app(s):
5+
file(GLOB all_paths ${CMAKE_CURRENT_LIST_DIR}/*)
6+
set(all_samples "")
7+
foreach(one_path ${all_paths})
8+
if(IS_DIRECTORY ${one_path})
9+
if(EXISTS ${one_path}/CMakeLists.txt)
10+
get_filename_component(one_sample ${one_path} NAME)
11+
add_subdirectory(${one_sample})
12+
endif()
13+
endif()
14+
endforeach()

0 commit comments

Comments
 (0)