hedgewars/CMakeLists.txt
branch0.9.21
changeset 10759 0f4b38722400
parent 10747 07ade56c3b4a
equal deleted inserted replaced
10756:4846f229b706 10759:0f4b38722400
   120 #generic folder where our libraries reside
   120 #generic folder where our libraries reside
   121 add_flag_append(CMAKE_Pascal_FLAGS "-Fl${LIBRARY_OUTPUT_PATH}")
   121 add_flag_append(CMAKE_Pascal_FLAGS "-Fl${LIBRARY_OUTPUT_PATH}")
   122 
   122 
   123 #DEPENDECIES AND EXECUTABLES SECTION
   123 #DEPENDECIES AND EXECUTABLES SECTION
   124 if(APPLE AND (NOT BUILD_ENGINE_LIBRARY))
   124 if(APPLE AND (NOT BUILD_ENGINE_LIBRARY))
   125     #on OSX we need to provide the SDL_main() function when building as executable
   125     #on OSX we need to provide the SDL_main() function when building as
       
   126     #executable and the entry point too
   126     add_subdirectory(sdlmain)
   127     add_subdirectory(sdlmain)
   127     list(APPEND HW_LINK_LIBS SDLmain)
   128     list(APPEND HW_LINK_LIBS SDLmain)
       
   129     add_flag_append(CMAKE_Pascal_FLAGS "-k-lsdlmain")
       
   130     add_flag_append(CMAKE_Pascal_FLAGS "-XMSDL_main")
       
   131     #OpenGL deps
       
   132     add_flag_append(CMAKE_Pascal_FLAGS "-k-framework -kCocoa")
       
   133     add_flag_append(CMAKE_Pascal_FLAGS "-k-framework -kOpenGL")
       
   134 
       
   135     #set the correct library or framework style depending on the main SDL
       
   136     string(FIND "${SDL_LIBRARY}" "dylib" sdl_framework)
       
   137     if(${sdl_framework} GREATER -1)
       
   138         add_flag_append(CMAKE_Pascal_FLAGS "-k-lsdl -k-lsdl_image -k-lsdl_mixer -k-lsdl_ttf -k-lsdl_net")
       
   139     else()
       
   140         add_flag_append(CMAKE_Pascal_FLAGS "-k-framework -kSDL -k-framework -kSDL_image -k-framework -k SDL_mixer -k-framework -k SDL_net -k-framework -kSDL_net")
       
   141     endif()
   128 endif()
   142 endif()
   129 
   143 
   130 if(LIBAV_FOUND)
   144 if(LIBAV_FOUND)
   131     add_subdirectory(avwrapper)
   145     add_subdirectory(avwrapper)
   132     list(APPEND HW_LINK_LIBS avwrapper)
   146     list(APPEND HW_LINK_LIBS avwrapper)