mirror of
https://github.com/OpenMW/openmw.git
synced 2025-02-07 02:45:33 +00:00
CMakeLists.txt: set the OPENMW_RESOURCE_FILES before configuring openmw.cfg
This commit is contained in:
parent
7d6fa1b65a
commit
77965501d4
1 changed files with 28 additions and 27 deletions
|
@ -83,6 +83,33 @@ if (MSVC)
|
||||||
option(OPENMW_LTO_BUILD "Build OpenMW with Link-Time Optimization (Needs ~2GB of RAM)" OFF)
|
option(OPENMW_LTO_BUILD "Build OpenMW with Link-Time Optimization (Needs ~2GB of RAM)" OFF)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
# Set up common paths
|
||||||
|
if (APPLE)
|
||||||
|
set(MORROWIND_DATA_FILES "./data" CACHE PATH "location of Morrowind data files")
|
||||||
|
set(OPENMW_RESOURCE_FILES "./resources" CACHE PATH "location of OpenMW resources files")
|
||||||
|
elseif(UNIX)
|
||||||
|
# Paths
|
||||||
|
SET(BINDIR "${CMAKE_INSTALL_PREFIX}/bin" CACHE PATH "Where to install binaries")
|
||||||
|
SET(LIBDIR "${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}" CACHE PATH "Where to install libraries")
|
||||||
|
SET(DATAROOTDIR "${CMAKE_INSTALL_PREFIX}/share" CACHE PATH "Sets the root of data directories to a non-default location")
|
||||||
|
SET(GLOBAL_DATA_PATH "${DATAROOTDIR}/games/" CACHE PATH "Set data path prefix")
|
||||||
|
SET(DATADIR "${GLOBAL_DATA_PATH}/openmw" CACHE PATH "Sets the openmw data directories to a non-default location")
|
||||||
|
SET(ICONDIR "${DATAROOTDIR}/pixmaps" CACHE PATH "Set icon dir")
|
||||||
|
SET(LICDIR "${DATAROOTDIR}/licenses/openmw" CACHE PATH "Sets the openmw license directory to a non-default location.")
|
||||||
|
IF("${CMAKE_INSTALL_PREFIX}" STREQUAL "/usr")
|
||||||
|
SET(GLOBAL_CONFIG_PATH "/etc/" CACHE PATH "Set config dir prefix")
|
||||||
|
ELSE()
|
||||||
|
SET(GLOBAL_CONFIG_PATH "${CMAKE_INSTALL_PREFIX}/etc/" CACHE PATH "Set config dir prefix")
|
||||||
|
ENDIF()
|
||||||
|
SET(SYSCONFDIR "${GLOBAL_CONFIG_PATH}/openmw" CACHE PATH "Set config dir")
|
||||||
|
|
||||||
|
set(MORROWIND_DATA_FILES "${DATADIR}/data" CACHE PATH "location of Morrowind data files")
|
||||||
|
set(OPENMW_RESOURCE_FILES "${DATADIR}/resources" CACHE PATH "location of OpenMW resources files")
|
||||||
|
else()
|
||||||
|
set(MORROWIND_DATA_FILES "data" CACHE PATH "location of Morrowind data files")
|
||||||
|
set(OPENMW_RESOURCE_FILES "resources" CACHE PATH "location of OpenMW resources files")
|
||||||
|
endif(APPLE)
|
||||||
|
|
||||||
if (WIN32)
|
if (WIN32)
|
||||||
option(USE_DEBUG_CONSOLE "whether a debug console should be enabled for debug builds, if false debug output is redirected to Visual Studio output" ON)
|
option(USE_DEBUG_CONSOLE "whether a debug console should be enabled for debug builds, if false debug output is redirected to Visual Studio output" ON)
|
||||||
endif()
|
endif()
|
||||||
|
@ -349,21 +376,7 @@ elseif (MSVC)
|
||||||
endif (CMAKE_CXX_COMPILER_ID STREQUAL GNU OR CMAKE_CXX_COMPILER_ID STREQUAL Clang)
|
endif (CMAKE_CXX_COMPILER_ID STREQUAL GNU OR CMAKE_CXX_COMPILER_ID STREQUAL Clang)
|
||||||
|
|
||||||
IF(NOT WIN32 AND NOT APPLE)
|
IF(NOT WIN32 AND NOT APPLE)
|
||||||
# Linux building
|
# Linux installation
|
||||||
# Paths
|
|
||||||
SET(BINDIR "${CMAKE_INSTALL_PREFIX}/bin" CACHE PATH "Where to install binaries")
|
|
||||||
SET(LIBDIR "${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}" CACHE PATH "Where to install libraries")
|
|
||||||
SET(DATAROOTDIR "${CMAKE_INSTALL_PREFIX}/share" CACHE PATH "Sets the root of data directories to a non-default location")
|
|
||||||
SET(GLOBAL_DATA_PATH "${DATAROOTDIR}/games/" CACHE PATH "Set data path prefix")
|
|
||||||
SET(DATADIR "${GLOBAL_DATA_PATH}/openmw" CACHE PATH "Sets the openmw data directories to a non-default location")
|
|
||||||
SET(ICONDIR "${DATAROOTDIR}/pixmaps" CACHE PATH "Set icon dir")
|
|
||||||
SET(LICDIR "${DATAROOTDIR}/licenses/openmw" CACHE PATH "Sets the openmw license directory to a non-default location.")
|
|
||||||
IF("${CMAKE_INSTALL_PREFIX}" STREQUAL "/usr")
|
|
||||||
SET(GLOBAL_CONFIG_PATH "/etc/" CACHE PATH "Set config dir prefix")
|
|
||||||
ELSE()
|
|
||||||
SET(GLOBAL_CONFIG_PATH "${CMAKE_INSTALL_PREFIX}/etc/" CACHE PATH "Set config dir prefix")
|
|
||||||
ENDIF()
|
|
||||||
SET(SYSCONFDIR "${GLOBAL_CONFIG_PATH}/openmw" CACHE PATH "Set config dir")
|
|
||||||
|
|
||||||
# Install binaries
|
# Install binaries
|
||||||
IF(BUILD_OPENMW)
|
IF(BUILD_OPENMW)
|
||||||
|
@ -424,18 +437,6 @@ IF(NOT WIN32 AND NOT APPLE)
|
||||||
INSTALL(DIRECTORY DESTINATION "${DATADIR}/data" COMPONENT "Resources")
|
INSTALL(DIRECTORY DESTINATION "${DATADIR}/data" COMPONENT "Resources")
|
||||||
ENDIF(NOT WIN32 AND NOT APPLE)
|
ENDIF(NOT WIN32 AND NOT APPLE)
|
||||||
|
|
||||||
# Location of morrowind data files
|
|
||||||
if (APPLE)
|
|
||||||
set(MORROWIND_DATA_FILES "./data" CACHE PATH "location of Morrowind data files")
|
|
||||||
set(OPENMW_RESOURCE_FILES "./resources" CACHE PATH "location of OpenMW resources files")
|
|
||||||
elseif(UNIX)
|
|
||||||
set(MORROWIND_DATA_FILES "${DATADIR}/data" CACHE PATH "location of Morrowind data files")
|
|
||||||
set(OPENMW_RESOURCE_FILES "${DATADIR}/resources" CACHE PATH "location of OpenMW resources files")
|
|
||||||
else()
|
|
||||||
set(MORROWIND_DATA_FILES "data" CACHE PATH "location of Morrowind data files")
|
|
||||||
set(OPENMW_RESOURCE_FILES "resources" CACHE PATH "location of OpenMW resources files")
|
|
||||||
endif(APPLE)
|
|
||||||
|
|
||||||
if(WIN32)
|
if(WIN32)
|
||||||
FILE(GLOB dll_files "${OpenMW_BINARY_DIR}/Release/*.dll")
|
FILE(GLOB dll_files "${OpenMW_BINARY_DIR}/Release/*.dll")
|
||||||
INSTALL(FILES ${dll_files} DESTINATION ".")
|
INSTALL(FILES ${dll_files} DESTINATION ".")
|
||||||
|
|
Loading…
Reference in a new issue