-
Notifications
You must be signed in to change notification settings - Fork 181
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
75 lines (61 loc) · 1.95 KB
/
CMakeLists.txt
File metadata and controls
75 lines (61 loc) · 1.95 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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
cmake_minimum_required(VERSION 3.10)
project(filemanager)
# CMake modules
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
# Include common DFM configuration
include(DFMCommon)
# Initialize common environment
dfm_init_common()
# Print build information
message(STATUS "=== DDE File Manager Build ===")
message(STATUS "Build mode: ${CMAKE_BUILD_TYPE}")
message(STATUS "Standalone test: ${DFM_STANDALONE_TEST}")
message(STATUS "Project root: ${DFM_PROJECT_ROOT}")
message(STATUS "Source directory: ${DFM_SOURCE_DIR}")
message(STATUS "Include directory: ${DFM_INCLUDE_DIR}")
message(STATUS "CMAKE_CXX_FLAGS: ${CMAKE_CXX_FLAGS}")
message(STATUS "==============================")
# options
option(OPT_DISABLE_QDEBUG "Disable Debug Macro" OFF)
option(OPT_ENABLE_BUILD_DOCS "Build develop documents" OFF)
option(OPT_ENABLE_BUILD_UT "Build unit tests" ON)
option(OPT_ENABLE_BUILD_TESTS "Build test/demo programs" OFF)
include(install_dconfig)
include(install_treeland_overrides)
include(install_dbus_service)
include(DFMInstallDirs)
include(GNUInstallDirs)
# Skip build rpath for reproducible release build
if(CMAKE_BUILD_TYPE STREQUAL "Release")
set(CMAKE_SKIP_BUILD_RPATH TRUE)
endif()
# Enable position-independent code for improved security (ASLR)
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
# sub directories
add_subdirectory(src/apps)
add_subdirectory(src/dfm-base)
add_subdirectory(src/dfm-extension)
add_subdirectory(src/dfm-framework)
add_subdirectory(src/plugins)
add_subdirectory(src/external)
add_subdirectory(src/tools)
add_subdirectory(src/services)
# test/demo programs
if(OPT_ENABLE_BUILD_TESTS)
add_subdirectory(tests)
endif()
# docs
if(OPT_ENABLE_BUILD_DOCS)
find_package(Doxygen)
if (DOXYGEN_FOUND)
add_subdirectory(docs/api)
endif()
endif()
# test
if(OPT_ENABLE_BUILD_UT)
message(STATUS "Enable testing: ${BUILD_TESTING}")
if(BUILD_TESTING)
enable_testing()
add_subdirectory(autotests)
endif()
endif()