forked from includeos/IncludeOS
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
41 lines (30 loc) · 1.17 KB
/
CMakeLists.txt
File metadata and controls
41 lines (30 loc) · 1.17 KB
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
35
36
37
38
39
40
41
cmake_minimum_required(VERSION 3.31.6)
#we are only creating libraries for ELF
set(CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY)
project (includeos C CXX)
if (NOT ARCH)
message(FATAL_ERROR "ARCH is not set")
endif()
if ("${ARCH}" STREQUAL "aarch64")
option(SMP "Compile with SMP (multiprocessing)" OFF)
else()
option(SMP "Compile with SMP (multiprocessing)" ON)
endif()
option(PROFILE "Compile with startup profilers" OFF)
include(cmake/includeos.cmake)
add_subdirectory(src)
# Install cmake files
install(FILES cmake/linux.service.cmake DESTINATION cmake)
install(FILES cmake/os.cmake DESTINATION cmake)
install(FILES cmake/includeos.cmake DESTINATION cmake)
# Install config to enable find_package(IncludeOS)
include(CMakePackageConfigHelpers)
configure_package_config_file(
cmake/includeos-config.cmake.in
${CMAKE_CURRENT_BINARY_DIR}/cmake/includeos-config.cmake
INSTALL_DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/cmake/includeos-config.cmake DESTINATION cmake)
# Install IncludeOS user code dependencies
install(FILES src/service_name.cpp DESTINATION src)
# Install IncludeOS headers
install(DIRECTORY api/ DESTINATION include/os)