-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
61 lines (48 loc) · 1.66 KB
/
CMakeLists.txt
File metadata and controls
61 lines (48 loc) · 1.66 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
58
59
60
61
cmake_minimum_required(VERSION 3.17)
project(svscraft VERSION 0.0.1.1 LANGUAGES CXX)
# ----------------------------------
# Build Options
# ----------------------------------
option(SVSCRAFT_BUILD_STATIC "Build static libraries" OFF)
option(SVSCRAFT_BUILD_TESTS "Build test cases" OFF)
option(SVSCRAFT_BUILD_TRANSLATIONS "Build translations" ON)
option(SVSCRAFT_BUILD_DOCUMENTATIONS "Build documentations" OFF)
option(SVSCRAFT_INSTALL "Install library" ON)
# ----------------------------------
# CMake Settings
# ----------------------------------
if(MSVC)
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /manifest:no")
set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} /manifest:no")
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /manifest:no")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /utf-8")
if(NOT DEFINED CMAKE_DEBUG_POSTFIX)
set(CMAKE_DEBUG_POSTFIX "d")
endif()
endif()
if(SVSCRAFT_INSTALL)
include(GNUInstallDirs)
include(CMakePackageConfigHelpers)
endif()
# ----------------------------------
# Project Variables
# ----------------------------------
set(IDECORE_VERSION ${PROJECT_VERSION})
set(SVSCRAFT_INSTALL_NAME ${PROJECT_NAME})
# ----------------------------------
# Find basic dependencies
# ----------------------------------
find_package(qmsetup REQUIRED)
qm_import(Filesystem)
if (NOT DEFINED QMSETUP_BUILD_DIR)
set(QMSETUP_BUILD_DIR "${CMAKE_BINARY_DIR}/out")
endif()
qm_init_directories()
# ----------------------------------
# Add source modules
# ----------------------------------
add_subdirectory(src)
add_subdirectory(share)
if(SVSCRAFT_BUILD_TESTS)
add_subdirectory(tests)
endif()