forked from diy4hobby/DAL
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
47 lines (34 loc) · 1.53 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
cmake_minimum_required(VERSION 3.13)
################################################################################
## PROJECT
## name and version
################################################################################
project(DAL LANGUAGES CXX)
################################################################################
## SETTINGS
## basic project settings before use
################################################################################
# If this project is used as a submodule, the variable should be overridden
# to "OFF" in the top-level application (to disable forced cache rewriting)
option(${PARENT}_SUBMODULE_CACHE_OVERWRITE "Enable forced cache rewriting" ON)
if (${PARENT}_SUBMODULE_CACHE_OVERWRITE)
SET(REWRITE_FORCE "FORCE")
else()
SET(REWRITE_FORCE "")
endif()
################################################################################
## CONFIGURATION
## project configuration
################################################################################
SET(${PARENT}_DAL ON CACHE BOOL "" ${REWRITE_FORCE})
SET(${PARENT}_DAL_EXAMPLES ON CACHE BOOL "" ${REWRITE_FORCE})
################################################################################
## INCLUDING SUBDIRECTORIES
## Adding subdirectories according to the project configuration
################################################################################
if (${PARENT}_DAL)
add_subdirectory(src)
endif()
if (${PARENT}_DAL_EXAMPLES)
add_subdirectory(examples)
endif()