hedgewars/CMakeLists.txt
changeset 15577 107170c05bac
parent 15370 96254b857257
child 15872 b27bac2260e3
equal deleted inserted replaced
15576:36687bc9d5c1 15577:107170c05bac
     1 enable_language(Pascal)
     1 enable_language(Pascal)
     2 
     2 
     3 find_package(SDL2 REQUIRED)
     3 find_package(SDL2 REQUIRED CONFIG)
     4 find_package(SDL2_image 2 REQUIRED)
     4 find_package(SDL2_image 2 REQUIRED)
     5 find_package(SDL2_net 2 REQUIRED)
     5 find_package(SDL2_net 2 REQUIRED)
     6 find_package(SDL2_ttf 2 REQUIRED)
     6 find_package(SDL2_ttf 2 REQUIRED)
     7 find_package(SDL2_mixer 2 REQUIRED)
     7 find_package(SDL2_mixer 2 REQUIRED)
     8 
     8 
   128     #OpenGL deps
   128     #OpenGL deps
   129     add_flag_append(CMAKE_Pascal_FLAGS "-k-framework -kCocoa")
   129     add_flag_append(CMAKE_Pascal_FLAGS "-k-framework -kCocoa")
   130     add_flag_append(CMAKE_Pascal_FLAGS "-k-framework -kOpenGL")
   130     add_flag_append(CMAKE_Pascal_FLAGS "-k-framework -kOpenGL")
   131 
   131 
   132     #set the correct library or framework style depending on the main SDL
   132     #set the correct library or framework style depending on the main SDL
   133     string(FIND "${SDL2_LIBRARY}" "dylib" sdl_framework)
   133     string(FIND "${SDL2_LIBRARIES}" "dylib" sdl_framework)
   134     if(${sdl_framework} GREATER -1)
   134     if(${sdl_framework} GREATER -1)
   135         add_flag_append(CMAKE_Pascal_FLAGS "-k-lsdl2 -k-lsdl2_image -k-lsdl2_mixer -k-lsdl2_ttf -k-lsdl2_net")
   135         add_flag_append(CMAKE_Pascal_FLAGS "-k-lsdl2 -k-lsdl2_image -k-lsdl2_mixer -k-lsdl2_ttf -k-lsdl2_net")
   136     else()
   136     else()
   137         add_flag_append(CMAKE_Pascal_FLAGS "-k-framework -kSDL2 -k-framework -kSDL2_image -k-framework -kSDL2_mixer -k-framework -kSDL2_net -k-framework -kSDL2_net -k-framework -kSDL2_ttf")
   137         add_flag_append(CMAKE_Pascal_FLAGS "-k-framework -kSDL2 -k-framework -kSDL2_image -k-framework -kSDL2_mixer -k-framework -kSDL2_net -k-framework -kSDL2_net -k-framework -kSDL2_ttf")
   138     endif()
   138     endif()