diff --git a/CMakeLists.txt b/CMakeLists.txt index 5987d454d012e..b45e7104ba795 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -21,7 +21,7 @@ option(LIBBACKTRACE "Print backtrace with libbacktrace." "OFF") option(USE_XDG_DIR "Use XDG directories for save and config files." "OFF") option(USE_HOME_DIR "Use user's home directory for save and config files." "ON") cmake_dependent_option(USE_PREFIX_DATA_DIR - "Use UNIX system directories for game data in release build." OFF + "Use UNIX system directories for game data in release build." ON "UNIX" OFF ) option(LOCALIZE "Support for language localizations. Also enable UTF support." "ON") @@ -172,6 +172,7 @@ else () # Use CMAKE_INSTALL_PREFIX as storage of data,gfx, etc.. Useful only on *nix OS. if(USE_PREFIX_DATA_DIR) if ("${CMAKE_SYSTEM_NAME}" MATCHES "(Linux|FreeBSD|Darwin)") + set(CMAKE_INSTALL_DATAROOTDIR "${CMAKE_INSTALL_PREFIX}/share/cataclysm-dda") add_definitions(-DPREFIX=${CMAKE_INSTALL_PREFIX}) configure_file( "${CMAKE_SOURCE_DIR}/src/prefix.h.in" diff --git a/lang/CMakeLists.txt b/lang/CMakeLists.txt index 942a38afd2d52..e6a2f92d2f438 100644 --- a/lang/CMakeLists.txt +++ b/lang/CMakeLists.txt @@ -33,7 +33,7 @@ foreach (LANG ${LANGUAGES}) add_custom_command( OUTPUT ${_MO} COMMAND ${CMAKE_COMMAND} -E - make_directory ${CMAKE_SOURCE_DIR}/lang/mo/${LANG} + make_directory ${CMAKE_SOURCE_DIR}/lang/mo/${LANG}/LC_MESSAGES COMMAND ${GETTEXT_MSGFMT_EXECUTABLE} -f ${_PO} -o ${_MO} WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} DEPENDS ${_PO} diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 0b99b6fd94303..6d5d148bee6bc 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -126,6 +126,8 @@ if (TILES) target_link_libraries(cataclysm-tiles-common PUBLIC backtrace) endif () endif () + elseif (APPLE) + target_link_libraries(cataclysm-tiles-common PUBLIC "-framework CoreFoundation") endif () if (LIBBACKTRACE) @@ -191,6 +193,8 @@ if (CURSES) if (BACKTRACE) target_link_libraries(cataclysm-common PUBLIC dbghelp.lib) endif () + elseif (APPLE) + target_link_libraries(cataclysm-common PUBLIC "-framework CoreFoundation") endif () if (LIBBACKTRACE)