-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathCMakeLists.txt
49 lines (40 loc) · 1.29 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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
cmake_minimum_required(VERSION 3.17.2)
# Paths
set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
# Options
set(BUILD_TESTING ON CACHE BOOL "Build testing tree" FORCE)
set(CMAKE_USER_MAKE_RULES_OVERRIDE "${CMAKE_CURRENT_SOURCE_DIR}/cmake/InitFlags.cmake")
if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE "Debug" CACHE STRING "Build type" FORCE)
endif()
set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug" "Release" "MinSizeRel" "RelWithDebInfo")
# CMake policies
cmake_policy(SET CMP0022 NEW)
# On MacOS use @rpath/ for target's install name prefix path
if (POLICY CMP0042)
cmake_policy(SET CMP0042 NEW)
endif ()
# Clear VERSION variables when no VERSION is given to project()
if(POLICY CMP0048)
cmake_policy(SET CMP0048 NEW)
endif()
# Project
project(cyan
VERSION 0.0.0.1
DESCRIPTION "Collection of libraries"
HOMEPAGE_URL "https://github.com/sayan-chaliha/cyan"
LANGUAGES C CXX)
# Testing
include(Testing)
# Configure files
include(Platform)
configure_file(config.h.in ${PROJECT_NAME}/config.h)
install(FILES ${PROJECT_BINARY_DIR}/${PROJECT_NAME}/config.h DESTINATION include/${PROJECT_NAME})
# Libraries
add_subdirectory(common)
add_subdirectory(lockfree)
add_subdirectory(event)
add_subdirectory(dispatch)
add_subdirectory(net)
# Examples
add_subdirectory(examples)