-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
34 lines (28 loc) · 1.21 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
cmake_minimum_required(VERSION 3.16)
project(whiskermenu VERSION 2.7.0)
# options
string(TOLOWER "${CMAKE_BUILD_TYPE}" CMAKE_BUILD_TYPE_TOLOWER)
if(CMAKE_BUILD_TYPE_TOLOWER MATCHES "release|minsizerel")
set(whiskermenu_strip ON)
endif()
if(CMAKE_BUILD_TYPE_TOLOWER MATCHES "release|minsizerel|relwithdebinfo")
set(whiskermenu_lto ON)
endif()
option(ENABLE_ACCOUNTSSERVICE "Enable building with AccountsService" ON)
option(ENABLE_VISIBILITY "Enable ELF visibility attributes" ON)
option(ENABLE_AS_NEEDED "Enable -Wl,--as-needed for the linker" ON)
option(ENABLE_LINKER_OPTIMIZED_HASH_TABLES "Enable -Wl,-O1 for the linker" ON)
option(ENABLE_LINK_TIME_OPTIMIZATION "Enable link time optimization" ${whiskermenu_lto})
option(ENABLE_STRIP "Enable automatic stripping of release builds" ${whiskermenu_strip})
option(ENABLE_DEVELOPER_MODE "Enable strict checks to help with development" OFF)
include(GNUInstallDirs)
add_subdirectory(src)
# uninstall target
if(NOT TARGET uninstall)
configure_file(
${CMAKE_CURRENT_SOURCE_DIR}/cmake/uninstall.cmake.in
${CMAKE_CURRENT_BINARY_DIR}/cmake/uninstall.cmake
IMMEDIATE @ONLY)
add_custom_target(uninstall
${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake/uninstall.cmake)
endif()