-
Notifications
You must be signed in to change notification settings - Fork 14
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
57 lines (45 loc) · 1.64 KB
/
CMakeLists.txt
File metadata and controls
57 lines (45 loc) · 1.64 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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
cmake_minimum_required(VERSION 3.12)
project(hesiod-root VERSION 0.5.2)
if(APPLE)
message(FATAL_ERROR "macOS is NOT supported by this project.")
endif()
set(EXECUTABLE_OUTPUT_PATH ${CMAKE_BINARY_DIR}/bin)
# Version info
add_compile_definitions(
HESIOD_VERSION_MAJOR=${hesiod-root_VERSION_MAJOR}
HESIOD_VERSION_MINOR=${hesiod-root_VERSION_MINOR}
HESIOD_VERSION_PATCH=${hesiod-root_VERSION_PATCH})
# ------------------------------
# Options
# ------------------------------
option(HESIOD_ENABLE_GENERATE_APP_IMAGE "Enable AppImage generation" ON)
option(HESIOD_MINIMAL_NODE_SET
"Use a minimal set of nodes (ADVANCED DEV ONLY!!!)" OFF)
# Option to enable LTO and unused-function detection
option(HESIOD_ENABLE_LTO "Enable LTO and unused-function detection" OFF)
option(HESIOD_UNUSED_FUNCTIONS "Detect unused static functions" OFF)
# ------------------------------
# Modules
# ------------------------------
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
include(HesiodCompilerOptions)
include(HesiodPlatform)
include(HesiodQtLoggingRules)
include(HesiodGitVersion)
# ------------------------------
# Dependencies
# ------------------------------
find_package(spdlog REQUIRED)
find_package(Qt6 REQUIRED COMPONENTS Core Widgets OpenGL OpenGLWidgets)
find_package(nlohmann_json REQUIRED)
add_compile_definitions(
CL_HPP_MINIMUM_OPENCL_VERSION=120 CL_HPP_TARGET_OPENCL_VERSION=120
HSD_DEFAULT_GPU_MODE=true)
# ------------------------------
# Subdirectories
# ------------------------------
add_subdirectory(external)
add_subdirectory(Hesiod)
if(HESIOD_ENABLE_GENERATE_APP_IMAGE)
add_subdirectory(scripts/generate_appimage)
endif()