hedgewars/CMakeLists.txt
changeset 15577 107170c05bac
parent 15370 96254b857257
child 15872 b27bac2260e3
--- a/hedgewars/CMakeLists.txt	Sun Apr 12 00:26:37 2020 +0300
+++ b/hedgewars/CMakeLists.txt	Fri Apr 17 15:23:22 2020 -0400
@@ -1,6 +1,6 @@
 enable_language(Pascal)
 
-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)
@@ -130,7 +130,7 @@
     add_flag_append(CMAKE_Pascal_FLAGS "-k-framework -kOpenGL")
 
     #set the correct library or framework style depending on the main SDL
-    string(FIND "${SDL2_LIBRARY}" "dylib" sdl_framework)
+    string(FIND "${SDL2_LIBRARIES}" "dylib" sdl_framework)
     if(${sdl_framework} GREATER -1)
         add_flag_append(CMAKE_Pascal_FLAGS "-k-lsdl2 -k-lsdl2_image -k-lsdl2_mixer -k-lsdl2_ttf -k-lsdl2_net")
     else()