X-Git-Url: https://git.jsancho.org/?a=blobdiff_plain;f=CMakeLists.txt;h=1c55e5798acd19bf4242b055d7136b49f2802a4c;hb=11fc7bb36280c27d231753a9b3b3e95210351144;hp=4998234924aef199338ba59208f039753c0d5d65;hpb=80ed1c365a21c9be137a7374b3d5b849b6976bfb;p=lugaru.git diff --git a/CMakeLists.txt b/CMakeLists.txt index 4998234..1c55e57 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,6 +1,6 @@ project(lugaru) -cmake_minimum_required(VERSION 3.5) +cmake_minimum_required(VERSION 3.0) cmake_policy(SET CMP0004 OLD) include(FindPkgConfig) @@ -37,7 +37,7 @@ if(LINUX) option(SYSTEM_INSTALL "Enable system-wide installation, with hardcoded data directory defined with CMAKE_INSTALL_DATADIR" OFF) endif(LINUX) -set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/Modules/") +set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/CMake/Modules/") ### Sources @@ -173,7 +173,13 @@ else(WIN32) find_package(OpenAL REQUIRED) endif(WIN32) -find_package(sdl2 REQUIRED) +# macOS has problems with using pkgconfig to find SDL2 +if(APPLE) + find_package(sdl2 REQUIRED) +else(APPLE) + pkg_check_modules(SDL2 sdl2 REQUIRED) +endif(APPLE) + find_package(PNG REQUIRED) find_package(JPEG REQUIRED) find_package(ZLIB REQUIRED) @@ -230,7 +236,7 @@ endif(LINUX) if(APPLE) set(LUGARU_APP_ROOT ${CMAKE_INSTALL_PREFIX}/Lugaru.app) set(LUGARU_BINDIR ${LUGARU_APP_ROOT}/Contents/MacOS) - set(LUGARU_RESDIR ${LUGARU_APP_ROOT}/Resources) + set(LUGARU_RESDIR ${LUGARU_APP_ROOT}/Contents/Resources) endif(APPLE) # Actual installation instructions @@ -291,7 +297,10 @@ endif(APPLE) install(FILES ${CMAKE_SOURCE_DIR}/AUTHORS ${CMAKE_SOURCE_DIR}/CONTENT-LICENSE.txt ${CMAKE_SOURCE_DIR}/COPYING.txt - ${CMAKE_SOURCE_DIR}/DEVTOOLS.txt ${CMAKE_SOURCE_DIR}/README.md ${CMAKE_SOURCE_DIR}/RELEASE-NOTES.md + ${CMAKE_SOURCE_DIR}/Docs/DEVTOOLS.txt + ${CMAKE_SOURCE_DIR}/Docs/README.Empire.txt + ${CMAKE_SOURCE_DIR}/Docs/README.SevenTasks.txt + ${CMAKE_SOURCE_DIR}/Docs/README.Temple.txt DESTINATION ${LUGARU_DOCDIR})