-
Notifications
You must be signed in to change notification settings - Fork 11
/
CMakeLists.txt
34 lines (28 loc) · 945 Bytes
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
cmake_minimum_required(VERSION 3.10)
# useful directories
set(ELKERNEL_ROOT_DIR ${CMAKE_CURRENT_SOURCE_DIR})
set(ELKERNEL_BUILD_DIR ${CMAKE_CURRENT_BINARY_DIR})
set(ELKERNEL_SOURCE_DIR ${ELKERNEL_ROOT_DIR}/src)
set(ELKERNEL_TARGET_DIR ${ELKERNEL_ROOT_DIR}/target)
set(ELKERNEL_TOOL_DIR ${ELKERNEL_ROOT_DIR}/tools)
set(ELKERNEL_BOOT_DIR ${ELKERNEL_ROOT_DIR}/boot)
set(ELKERNEL_DRIVER_DIR ${ELKERNEL_ROOT_DIR}/driver)
# bootloader
include(${ELKERNEL_BOOT_DIR}/boot.cmake)
# driver modules
include(${ELKERNEL_DRIVER_DIR}/stub.cmake)
include(${ELKERNEL_DRIVER_DIR}/neko.cmake)
# elkernel
include(${ELKERNEL_SOURCE_DIR}/elkernel.cmake)
# make elfOS
project(elf)
add_custom_target(${PROJECT_NAME} ALL
DEPENDS boot elkernel
COMMENT "Run post builds"
)
# post builds
set(_POST_BUILDS "")
file(GLOB_RECURSE _POST_BUILDS ${ELKERNEL_TARGET_DIR}/*.cmake)
foreach(POST_BUILD_FILE IN LISTS _POST_BUILDS)
include(${POST_BUILD_FILE})
endforeach()