-
Notifications
You must be signed in to change notification settings - Fork 373
/
CMakeLists.txt
32 lines (23 loc) · 1 KB
/
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
cmake_minimum_required(VERSION 3.6)
#we are only creating libraries for ELF
set(CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY)
project (includeos C CXX)
option(SMP "Compile with SMP (multiprocessing)" ON)
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)