tools/CMakeLists.txt
changeset 15577 107170c05bac
parent 15355 8951eaad20e5
--- a/tools/CMakeLists.txt	Sun Apr 12 00:26:37 2020 +0300
+++ b/tools/CMakeLists.txt	Fri Apr 17 15:23:22 2020 -0400
@@ -8,7 +8,7 @@
 
 if(APPLE AND NOT SKIPBUNDLE)
     find_package(Qt5 REQUIRED QUIET COMPONENTS Core Widgets Gui Network)
-    find_package(SDL2 REQUIRED)
+    find_package(SDL2 REQUIRED CONFIG)
     find_package(SDL2_image 2 REQUIRED)
     find_package(SDL2_net 2 REQUIRED)
     find_package(SDL2_ttf 2 REQUIRED)
@@ -26,9 +26,9 @@
         endif()
     endif()
 
-    #remove the ";-framework Cocoa" from the SDL2_LIBRARY variable
-    string(REGEX REPLACE "(.*);-.*" "\\1" sdl_library_only "${SDL2_LIBRARY}")
-    #remove the "libSDLmain.a" from the SDL2_LIBRARY variable
+    #remove the ";-framework Cocoa" from the SDL2_LIBRARIES variable
+    string(REGEX REPLACE "(.*);-.*" "\\1" sdl_library_only "${SDL2_LIBRARIES}")
+    #remove the "libSDLmain.a" from the SDL2_LIBRARIES variable
     string(REGEX REPLACE ".*;(.*)" "\\1" sdl_library_only "${sdl_library_only}")
 
     #get the neme of the library (harmelss if it is static)