-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathCMakeLists.txt
74 lines (58 loc) · 1.92 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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
# Set cmake_mimimum_required
# ----------------------------------
cmake_minimum_required(VERSION 3.20.0)
# Set cmake compiler
# ----------------------------------
set(CMAKE_CXX_COMPILER "clang++")
set(CMAKE_C_COMPILER "clang")
# Set makefile properties
# ----------------------------------
set(CMAKE_VERBOSE_MAKEFILE ON)
# Set C++ 17 Standard
# ----------------------------------
set(CMAKE_CXX_STANDARD 17)
# Set project name and version
# ----------------------------------
project(Iridescent VERSION 0.1.0 LANGUAGES C CXX)
set(IRIDESCENT ${PROJECT_NAME})
# Configure cmake
# ----------------------------------
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/CMake")
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
# Set options
# ----------------------------------
option(BUILD_SHARED_LIBS "Build shared libraries" OFF)
option(BUILD_EXAMPLES "Build examples" OFF)
# Configure Header Files
# ----------------------------------
configure_file (
"${PROJECT_SOURCE_DIR}/config.h.in"
"${PROJECT_BINARY_DIR}/config.h"
)
# Allow 'config.h' to be used throughout the program
# ----------------------------------
include_directories(${PROJECT_BINARY_DIR})
# Add compile definitions
# ----------------------------------
add_compile_definitions(IRID_EXPORTS)
# CMake modules
# ----------------------------------
# Standard modules
include(GenerateExportHeader)
# Own modules
include(GetPlatform)
include(DetermineArchitecture)
include(DetermineCompiler)
include(Build)
# Ensure cmake can find our libraries
# ----------------------------------
set(LIBRARY_OUTPUT_PATH "${CMAKE_BINARY_DIR}")
set(EXECUTABLE_OUTPUT_PATH "${CMAKE_BINARY_DIR}")
# Add subdirectories
# ----------------------------------
add_subdirectory(External)
add_subdirectory(Core)
add_subdirectory(Sandbox)
# Nice message to calm me down when compiling :)
# ----------------------------------
message(STATUS "Configuring ${PROJECT_NAME} v${PROJECT_VERSION} for ${CMAKE_SYSTEM_NAME}")