2018-11-28 14:42:00 -07:00
|
|
|
cmake_minimum_required(VERSION 3.1.0)
|
|
|
|
|
2020-01-10 15:02:51 -07:00
|
|
|
project(celestia VERSION "1.7.0" LANGUAGES NONE)
|
2018-12-30 13:14:41 -07:00
|
|
|
|
2019-03-11 12:42:31 -06:00
|
|
|
option(NATIVE_OSX_APP "Support native OSX paths read data from (Default: off)" OFF)
|
2021-12-01 12:56:17 -07:00
|
|
|
option(ENABLE_NLS "Enable object names translation? (Default: on)" ON)
|
2018-11-28 14:42:00 -07:00
|
|
|
|
2019-01-10 10:55:18 -07:00
|
|
|
# Use our cmake files
|
|
|
|
list(INSERT CMAKE_MODULE_PATH 0 "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
|
|
|
|
|
2018-11-28 14:42:00 -07:00
|
|
|
include(GNUInstallDirs)
|
2019-02-07 07:31:52 -07:00
|
|
|
include(install_to_extras_subdir)
|
2019-08-02 22:42:24 -06:00
|
|
|
|
2021-12-01 12:56:17 -07:00
|
|
|
if(ENABLE_NLS)
|
|
|
|
find_package(Gettext)
|
|
|
|
if(NOT GETTEXT_FOUND)
|
|
|
|
message(WARNING "Gettext is not found, traslations won't be created.")
|
|
|
|
endif()
|
|
|
|
include(FixGettext)
|
|
|
|
endif()
|
|
|
|
|
2019-08-02 22:42:24 -06:00
|
|
|
if(NATIVE_OSX_APP)
|
|
|
|
set(CMAKE_INSTALL_PREFIX "${PROJECT_BINARY_DIR}/${PROJECT_NAME}.app/Contents")
|
|
|
|
set(CMAKE_INSTALL_FULL_LOCALEDIR "${CMAKE_INSTALL_PREFIX}/Resources/locale")
|
2019-08-03 01:01:47 -06:00
|
|
|
set(CMAKE_INSTALL_BINDIR "MacOS")
|
2019-08-02 22:42:24 -06:00
|
|
|
set(DATADIR "${CMAKE_INSTALL_PREFIX}/Resources")
|
|
|
|
set(FULL_DATADIR "${CMAKE_INSTALL_PREFIX}/Resources")
|
|
|
|
else()
|
|
|
|
set(DATADIR "${CMAKE_INSTALL_DATADIR}/${PROJECT_NAME}")
|
|
|
|
set(FULL_DATADIR "${CMAKE_INSTALL_FULL_DATADIR}/${PROJECT_NAME}")
|
|
|
|
endif()
|
2018-11-28 14:42:00 -07:00
|
|
|
|
|
|
|
add_subdirectory(data)
|
|
|
|
add_subdirectory(extras)
|
|
|
|
add_subdirectory(extras-standard)
|
|
|
|
add_subdirectory(models)
|
2021-12-01 12:56:17 -07:00
|
|
|
add_subdirectory(po)
|
2018-11-28 14:42:00 -07:00
|
|
|
add_subdirectory(textures)
|
2021-06-12 10:10:16 -06:00
|
|
|
add_subdirectory(warp)
|