hedgewars/CMakeLists.txt
branchcmake_pascal
changeset 8804 32bc222ddca6
parent 8802 ed984e06b435
child 8811 dcdfcddf37ee
equal deleted inserted replaced
8802:ed984e06b435 8804:32bc222ddca6
   138 
   138 
   139     if(powerpc_build)
   139     if(powerpc_build)
   140         set(powerpc_build "powerpc")
   140         set(powerpc_build "powerpc")
   141     endif()
   141     endif()
   142 
   142 
       
   143 
   143     #on OSX we need to provide the SDL_main() function when building as executable
   144     #on OSX we need to provide the SDL_main() function when building as executable
   144     if(NOT ${BUILD_ENGINE_LIBRARY})
   145     if(NOT ${BUILD_ENGINE_LIBRARY})
   145         #let's look for the installed sdlmain file; if it is not found, let's build our own
   146         add_subdirectory(sdlmain)
   146         find_package(SDL REQUIRED)
       
   147         include_directories(${SDL_INCLUDE_DIR})
       
   148         add_library (SDLmain STATIC SDLMain.m)
       
   149         add_flag_append(CMAKE_Pascal_FLAGS -Fl${LIBRARY_OUTPUT_PATH})
   147         add_flag_append(CMAKE_Pascal_FLAGS -Fl${LIBRARY_OUTPUT_PATH})
   150     endif()
   148     endif()
   151 endif(APPLE)
   149 endif(APPLE)
   152 
   150 
   153 
   151