hedgewars/CMakeLists.txt
branchcmake_pascal
changeset 8790 783669d76b4f
parent 8787 f9dc079f2aa6
child 8798 03d113d51062
equal deleted inserted replaced
8787:f9dc079f2aa6 8790:783669d76b4f
   197 add_definitions(-dDEBUGFILE)
   197 add_definitions(-dDEBUGFILE)
   198 add_executable(hwengine ${engine_sources})
   198 add_executable(hwengine ${engine_sources})
   199 
   199 
   200 #when system Lua is not found we need to compile it before engine
   200 #when system Lua is not found we need to compile it before engine
   201 if(NOT LUA_FOUND)
   201 if(NOT LUA_FOUND)
   202     add_dependencies(hwengine lua)
   202     target_link_libraries(hwengine lua)
   203 endif()
   203 endif()
   204 
   204 
   205 # same for physfs
   205 # same for physfs
   206 if(NOT PHYSFS_FOUND)
   206 if(NOT PHYSFS_FOUND)
   207     add_dependencies(hwengine physfs)
   207     target_link_libraries(hwengine physfs)
   208 endif()
   208 endif()
   209 
   209 
   210 add_dependencies(hwengine physlayer)
   210 target_link_libraries(hwengine physlayer)
   211 
   211 
   212 #when ffmpeg/libav is found we need to compile it before engine
   212 #when ffmpeg/libav is found we need to compile it before engine
   213 #TODO: convert avwrapper to .pas unit so we can skip this step
   213 #TODO: convert avwrapper to .pas unit so we can skip this step
   214 if(${FFMPEG_FOUND})
   214 if(${FFMPEG_FOUND})
   215     add_dependencies(hwengine avwrapper)
   215     target_link_libraries(hwengine avwrapper)
   216 endif()
   216 endif()
   217 
   217 
       
   218 if(APPLE)
       
   219     target_link_libraries(hwengine SDLmain)
       
   220 endif()
   218 #this command is a workaround to some inlining issues present in older FreePascal versions and fixed in 2.6
   221 #this command is a workaround to some inlining issues present in older FreePascal versions and fixed in 2.6
   219 #if((FREEPASCAL_VERSION VERSION_LESS "2.6") AND (NOT ${FFMPEG_FOUND}))
   222 #if((FREEPASCAL_VERSION VERSION_LESS "2.6") AND (NOT ${FFMPEG_FOUND}))
   220 #    add_dependencies(hwengine ENGINECLEAN)
   223 #    add_dependencies(hwengine ENGINECLEAN)
   221 #endif()
   224 #endif()
   222 
   225