aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt4
-rw-r--r--kapi/CMakeLists.txt17
-rw-r--r--kernel/CMakeLists.txt9
3 files changed, 16 insertions, 14 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index febcf0e..d785d4e 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -39,6 +39,10 @@ option(TEACHOS_GENERATE_DOCS "Generate documentation during build" ON)
# Global Build System Configuration
#]============================================================================]
+if(POLICY CMP0209)
+ cmake_policy(SET CMP0209 NEW)
+endif()
+
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/bin")
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/lib")
set(CMAKE_INTERPROCEDURAL_OPTIMIZATION YES)
diff --git a/kapi/CMakeLists.txt b/kapi/CMakeLists.txt
index 99b737c..c9aa23f 100644
--- a/kapi/CMakeLists.txt
+++ b/kapi/CMakeLists.txt
@@ -1,24 +1,13 @@
add_library("kapi" INTERFACE)
add_library("os::kapi" ALIAS "kapi")
+file(GLOB_RECURSE KAPI_HEADERS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "include/**.hpp")
+
target_sources("kapi" PUBLIC
FILE_SET HEADERS
BASE_DIRS "include"
FILES
- "include/kapi/boot_modules.hpp"
- "include/kapi/boot.hpp"
- "include/kapi/cio.hpp"
- "include/kapi/cpu.hpp"
- "include/kapi/interrupts.hpp"
- "include/kapi/boot_module/boot_module.hpp"
- "include/kapi/boot_module/boot_module_registry.hpp"
- "include/kapi/memory.hpp"
- "include/kapi/memory/address.hpp"
- "include/kapi/memory/frame_allocator.hpp"
- "include/kapi/memory/frame.hpp"
- "include/kapi/memory/page_mapper.hpp"
- "include/kapi/memory/page.hpp"
- "include/kapi/system.hpp"
+ ${KAPI_HEADERS}
)
target_include_directories("kapi" INTERFACE
diff --git a/kernel/CMakeLists.txt b/kernel/CMakeLists.txt
index 535c441..3d3c7e2 100644
--- a/kernel/CMakeLists.txt
+++ b/kernel/CMakeLists.txt
@@ -56,6 +56,15 @@ set_property(TARGET "kernel"
"${KERNEL_LINKER_SCRIPT}"
)
+file(GLOB_RECURSE KERNEL_HEADERS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "include/**.hpp")
+
+target_sources("kernel" PUBLIC
+ FILE_SET HEADERS
+ BASE_DIRS "include"
+ FILES
+ ${KERNEL_HEADERS}
+)
+
target_disassemble("kernel")
target_extract_debug_symbols("kernel")
target_strip("kernel")