| 1 |
include_guard() |
| 2 |
|
| 3 |
if(WIN32) |
| 4 |
set(default_bin_dir ".") |
| 5 |
set(default_wad_dir ".") |
| 6 |
set(default_copyright_dir ".") |
| 7 |
else() |
| 8 |
include(GNUInstallDirs) |
| 9 |
set(default_bin_dir "${CMAKE_INSTALL_BINDIR}") |
| 10 |
set(default_wad_dir "${CMAKE_INSTALL_DATAROOTDIR}/games/doom") |
| 11 |
set(default_copyright_dir "${CMAKE_INSTALL_DATAROOTDIR}/doc/${PROJECT_NAME}") |
| 12 |
endif() |
| 13 |
|
| 14 |
set(DSDAPWADDIR "${default_wad_dir}" CACHE STRING "Path to install DSDA-Doom internal WAD") |
| 15 |
set(DOOMWADDIR "${CMAKE_INSTALL_PREFIX}/${default_wad_dir}" CACHE PATH "Path to look for WAD files.") |
| 16 |
set(DSDA_INSTALL_COPYRIGHT_DIR "${default_copyright_dir}" CACHE STRING "Destination of the copyright file") |
| 17 |
set(DSDA_INSTALL_BINDIR "${default_bin_dir}" CACHE STRING "Destination of the dsda-doom binary") |
| 18 |
|
| 19 |
option(ENABLE_PACKAGING "Enable creating CPack packages" ${dsda_is_top_project}) |
| 20 |
option(STRICT_FIND "Fail configuration if an optional dependency is not found" OFF) |
| 21 |
option(SIMPLECHECKS "Enable checks which only impose significant overhead if a posible error is detected" ON) |
| 22 |
option(RANGECHECK "Enable internal range checking" OFF) |
| 23 |
|
| 24 |
option(CMAKE_FIND_PACKAGE_PREFER_CONFIG "Search for package config before using Find modules" ON) |
| 25 |
|
| 26 |
if(IS_ABSOLUTE "${DSDAPWADDIR}") |
| 27 |
set(DSDA_ABSOLUTE_PWAD_PATH "${DSDAPWADDIR}") |
| 28 |
else() |
| 29 |
set(DSDA_ABSOLUTE_PWAD_PATH "${CMAKE_INSTALL_PREFIX}/${DSDAPWADDIR}") |
| 30 |
endif() |
| 31 |
|
| 32 |
# Removed options |
| 33 |
|
| 34 |
if(DEFINED CACHE{ENABLE_LTO}) |
| 35 |
message(AUTHOR_WARNING "ENABLE_LTO has been removed, set CMAKE_INTERPROCEDURAL_OPTIMIZATION instead") |
| 36 |
endif() |