--- stellarium-0.20.4.old/CMakeLists.txt +++ stellarium-0.20.4/CMakeLists.txt @@ -304,7 +304,7 @@ ########### Others ########### # Activate translation -SET(ENABLE_NLS 1 CACHE BOOL "Define whether program translation should be supported.") +# SET(ENABLE_NLS 1 CACHE BOOL "Define whether program translation should be supported.") IF(ENABLE_NLS) ADD_DEFINITIONS(-DENABLE_NLS) ENDIF() @@ -632,18 +632,12 @@ ENDIF() ########### Set some global variables ########### -IF(UNIX AND NOT WIN32) - IF(APPLE) - SET(CMAKE_INSTALL_PREFIX "${PROJECT_BINARY_DIR}/Stellarium.app/Contents") - ELSE() - ADD_DEFINITIONS(-DINSTALL_DATADIR="${CMAKE_INSTALL_PREFIX}/${SDATALOC}") - # Used in generating the documentation (doc/stellarium.pod.cmake): - SET(INSTALL_DATADIR "${CMAKE_INSTALL_PREFIX}/${SDATALOC}") - ENDIF() -ELSE() - ADD_DEFINITIONS(-DINSTALL_DATADIR=".") - ADD_DEFINITIONS(-DINSTALL_LOCALEDIR="./locale") -ENDIF() +SET(CMAKE_INSTALL_PREFIX "__META_PREFIX__") +SET(INSTALL_DATADIR "${CMAKE_INSTALL_PREFIX}/data") +SET(INSTALL_LOCALEDIR "${CMAKE_INSTALL_PREFIX}/locale") +ADD_DEFINITIONS(-DINSTALL_DATADIR="${CMAKE_INSTALL_PREFIX}/data") +ADD_DEFINITIONS(-DINSTALL_LOCALEDIR="${CMAKE_INSTALL_PREFIX}/locale") + # For not installed debug builds with build directory path that not match sources directory path ${PROJECT_BINARY_DIR} != ${CMAKE_SOURCE_DIR} IF(CMAKE_BUILD_TYPE STREQUAL "Debug") ADD_DEFINITIONS(-DINSTALL_DATADIR_FOR_DEBUG="${CMAKE_SOURCE_DIR}")