diff options
Diffstat (limited to 'libs/kstd/CMakeLists.txt')
| -rw-r--r-- | libs/kstd/CMakeLists.txt | 34 |
1 files changed, 16 insertions, 18 deletions
diff --git a/libs/kstd/CMakeLists.txt b/libs/kstd/CMakeLists.txt index 2b5ee12..6902891 100644 --- a/libs/kstd/CMakeLists.txt +++ b/libs/kstd/CMakeLists.txt @@ -37,26 +37,28 @@ add_library("kstd" STATIC) add_library("kstd::lib" ALIAS "kstd") target_sources("kstd" PRIVATE - "src/os/error.cpp" - "src/mutex.cpp" - "src/vformat.cpp" + "kstd/os/error.cpp" + "kstd/mutex.cpp" + "kstd/vformat.cpp" ) file(GLOB_RECURSE KSTD_HEADERS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} CONFIGURE_DEPENDS - "include/kstd/*" + "kstd/*" ) +list(FILTER KSTD_HEADERS EXCLUDE REGEX ".*\.cpp") + target_sources("kstd" PUBLIC FILE_SET HEADERS - BASE_DIRS "include" + BASE_DIRS "${CMAKE_CURRENT_SOURCE_DIR}" FILES ${KSTD_HEADERS} ) target_include_directories("kstd" PUBLIC - "include" + "${CMAKE_CURRENT_SOURCE_DIR}" ) set_target_properties("kstd" PROPERTIES @@ -65,8 +67,8 @@ set_target_properties("kstd" PROPERTIES if(NOT BUILD_TESTING) target_sources("kstd" PRIVATE - "src/libc/stdlib.cpp" - "src/libc/string.cpp" + "kstd/libc/stdlib.cpp" + "kstd/libc/string.cpp" ) set(KSTD_LIBC_SYMBOLS @@ -90,16 +92,12 @@ if(BUILD_TESTING) add_executable("kstd::tests" ALIAS "kstd_tests") target_sources("kstd_tests" PRIVATE - "tests/src/flat_map.cpp" - "tests/src/format.cpp" - "tests/src/vector.cpp" - "tests/src/observer_ptr.cpp" - "tests/src/os_panic.cpp" - "tests/src/string.cpp" - ) - - target_include_directories("kstd_tests" PRIVATE - "tests/include" + "kstd/flat_map.test.cpp" + "kstd/format.test.cpp" + "kstd/vector.test.cpp" + "kstd/bits/observer_ptr.test.cpp" + "kstd/test_support/os_panic.test.cpp" + "kstd/string.test.cpp" ) target_link_libraries("kstd_tests" PRIVATE |
