]> git.jsancho.org Git - lugaru.git/commitdiff
CMake: Fix SDL2 detection for macOS
authorNeal Gompa <ngompa13@gmail.com>
Wed, 14 Dec 2016 13:53:05 +0000 (08:53 -0500)
committerNeal Gompa <ngompa13@gmail.com>
Wed, 14 Dec 2016 13:55:33 +0000 (08:55 -0500)
CMakeLists.txt

index 044544f13406cdf5fa4c2ec44fb7e6eb9f107b62..0feb4b9cc98130dc2986e9b1596457988d1a2e2b 100644 (file)
@@ -173,9 +173,13 @@ else(WIN32)
     find_package(OpenAL REQUIRED)
 endif(WIN32)
 
-# Not all distros provide sdl2-config.cmake yet
-#find_package(sdl2 REQUIRED)
-pkg_check_modules(SDL2 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)