]> git.jsancho.org Git - lugaru.git/blobdiff - CMakeLists.txt
CMake: Fix SDL2 detection for macOS
[lugaru.git] / CMakeLists.txt
index d1e62951cc47f74ad3398e9d2acdda68418b724f..0feb4b9cc98130dc2986e9b1596457988d1a2e2b 100644 (file)
@@ -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)
@@ -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)
@@ -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})