From 63dd11b95f2fc150969a266de15e354157e17ea8 Mon Sep 17 00:00:00 2001 From: NishiOwO Date: Thu, 23 Oct 2025 21:16:23 +0000 Subject: [PATCH] add them back git-svn-id: http://svn2.nishi.boats/svn/milsko/trunk@486 b9cfdab3-6d41-4d17-bbe4-086880011989 --- CMakeLists.txt | 2 ++ examples/CMakeLists.txt | 19 +++++++++++++++++++ examples/basic/CMakeLists.txt | 16 ++++++++++++++++ 3 files changed, 37 insertions(+) create mode 100644 examples/CMakeLists.txt create mode 100644 examples/basic/CMakeLists.txt diff --git a/CMakeLists.txt b/CMakeLists.txt index 547014a..d3e11c3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -162,3 +162,5 @@ install( DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} FILES_MATCHING PATTERN "*.h" ) + +add_subdirectory(examples) diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt new file mode 100644 index 0000000..6d1b2d5 --- /dev/null +++ b/examples/CMakeLists.txt @@ -0,0 +1,19 @@ +# $Id$ +file( + GLOB + EXAMPLES_SOURCES + *.c +) +list(REMOVE_ITEM EXAMPLES_SOURCES ${CMAKE_SOURCE_DIR}/examples/harvard.c) + +foreach(PATH IN LISTS EXAMPLES_SOURCES) + get_filename_component(TARGET ${PATH} NAME_WE) + add_executable(${TARGET} ${PATH}) + target_link_libraries( + ${TARGET} + PRIVATE + Mw + ) +endforeach() + +add_subdirectory(basic) diff --git a/examples/basic/CMakeLists.txt b/examples/basic/CMakeLists.txt new file mode 100644 index 0000000..29abd29 --- /dev/null +++ b/examples/basic/CMakeLists.txt @@ -0,0 +1,16 @@ +# $Id$ +file( + GLOB + EXAMPLES_BASIC_SOURCES + *.c +) + +foreach(PATH IN LISTS EXAMPLES_BASIC_SOURCES) + get_filename_component(TARGET ${PATH} NAME_WE) + add_executable(${TARGET} ${PATH}) + target_link_libraries( + ${TARGET} + PRIVATE + Mw + ) +endforeach()