From 1a563ff6c81150a5f80740553a4e799afd96eda9 Mon Sep 17 00:00:00 2001 From: NishiOwO Date: Tue, 28 Oct 2025 20:26:12 +0000 Subject: [PATCH] oops git-svn-id: http://svn2.nishi.boats/svn/milsko/trunk@498 b9cfdab3-6d41-4d17-bbe4-086880011989 --- CMakeLists.txt | 9 ++++++--- examples/CMakeLists.txt | 5 ----- examples/basic/CMakeLists.txt | 5 ----- 3 files changed, 6 insertions(+), 13 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 79b31cc..d64c906 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -13,6 +13,7 @@ else() option(VULKAN "Compile Vulkan widget or not" ON) endif() option(CLASSIC "Use classic theme" OFF) +option(BUILD_EXAMPLES "Build examples" OFF) option(USE_STB_IMAGE "Use stb_image" ON) option(USE_STB_TRUETYPE "Use stb_truetype" OFF) option(USE_FREETYPE2 "Use FreeType 2" ON) @@ -93,7 +94,7 @@ endif() target_include_directories( Mw - PRIVATE + PUBLIC include ) @@ -146,7 +147,7 @@ endif() target_include_directories( Mw - PUBLIC + PRIVATE ${INCLUDE_DIRS} ) target_link_directories( @@ -178,4 +179,6 @@ install( FILES_MATCHING PATTERN "*.h" ) -add_subdirectory(examples) +if(BUILD_EXAMPLES) + add_subdirectory(examples) +endif() diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt index 26debd5..6d1b2d5 100644 --- a/examples/CMakeLists.txt +++ b/examples/CMakeLists.txt @@ -9,11 +9,6 @@ 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_include_directories( - ${TARGET} - PRIVATE - ${CMAKE_SOURCE_DIR}/include - ) target_link_libraries( ${TARGET} PRIVATE diff --git a/examples/basic/CMakeLists.txt b/examples/basic/CMakeLists.txt index 69f087d..29abd29 100644 --- a/examples/basic/CMakeLists.txt +++ b/examples/basic/CMakeLists.txt @@ -8,11 +8,6 @@ file( foreach(PATH IN LISTS EXAMPLES_BASIC_SOURCES) get_filename_component(TARGET ${PATH} NAME_WE) add_executable(${TARGET} ${PATH}) - target_include_directories( - ${TARGET} - PRIVATE - ${CMAKE_SOURCE_DIR}/include - ) target_link_libraries( ${TARGET} PRIVATE