-
Notifications
You must be signed in to change notification settings - Fork 16
/
CMakeLists.txt
executable file
·44 lines (35 loc) · 1.18 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
project(CDROID C CXX)
cmake_minimum_required (VERSION 3.2)
set(CMAKE_POSITION_INDEPENDENT_CODE TRUE)
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_SOURCE_DIR}/cmake/modules)
include(cmake/depchecks.cmake)
include(cmake/common_functions.cmake)
include(cmake/options.cmake)
if(COMMAND cmake_policy)
cmake_policy(SET CMP0003 NEW)
#make vcpkg happy:)
endif(COMMAND cmake_policy)
set(DISABLE_FORCE_DEBUG_POSTFIX ON)
if (CMAKE_BUILD_TYPE STREQUAL Debug)
add_definitions(-DDEBUG)
endif()
if(CMAKE_HOST_SYSTEM_NAME MATCHES "Linux")
add_link_options("LINKER:-rpath-link,${CMAKE_SOURCE_DIR}/src/porting/${CDROID_CHIPSET}/lib")
endif()
add_subdirectory(src/porting)
add_subdirectory(src/gui)
add_subdirectory(src/modules)
add_subdirectory(src/3rdparty/pinyin)
add_subdirectory(apps)
add_subdirectory(tests)
GetGitVersion(CDROID)
string(TIMESTAMP COMPILE_TIME "%Y%m%d_%H%M%S")
set(CPACK_PACKAGE_NAME "CDROID-${COMPILE_TIME}-${CDROID_COMMITID}")
set(CPACK_PACKAGE_VERSION ${CDROID_VERSION})
set(CPACK_GENERATOR "ZIP") # Choose the desired generator (e.g., ZIP, TGZ, NSIS, etc.)
include(CPack)
if(BUILD_DOCS)
include(cmake/build_doxygen.cmake)
build_doxygen()
endif()