hedgewars/CMakeLists.txt
branchcmake_pascal
changeset 8802 ed984e06b435
parent 8798 03d113d51062
child 8804 32bc222ddca6
equal deleted inserted replaced
8800:5e837e6d8f94 8802:ed984e06b435
   122 find_package_or_fail(FreePascal)
   122 find_package_or_fail(FreePascal)
   123 
   123 
   124 #when cmake-2.6 support is dropped, this ought to be inside FindFreePascal.cmake
   124 #when cmake-2.6 support is dropped, this ought to be inside FindFreePascal.cmake
   125 if (FREEPASCAL_VERSION VERSION_LESS required_fpc_version)
   125 if (FREEPASCAL_VERSION VERSION_LESS required_fpc_version)
   126     message(FATAL_ERROR "Freepascal ${FREEPASCAL_VERSION} is too old, minimum version required is ${required_fpc_version}")
   126     message(FATAL_ERROR "Freepascal ${FREEPASCAL_VERSION} is too old, minimum version required is ${required_fpc_version}")
       
   127 elseif(FREEPASCAL_VERSION VERSION_GREATER 2.4)
       
   128     #enable INLINE only with a recent version of fpc
       
   129     add_flag_append(CMAKE_Pascal_FLAGS_RELEASE -Si)
   127 endif()
   130 endif()
   128 
   131 
   129 
   132 
   130 #DEPENDECIES AND EXECUTABLES SECTION
   133 #DEPENDECIES AND EXECUTABLES SECTION
   131 if(APPLE)
   134 if(APPLE)
   218 endif()
   221 endif()
   219 
   222 
   220 if(APPLE)
   223 if(APPLE)
   221     target_link_libraries(hwengine SDLmain)
   224     target_link_libraries(hwengine SDLmain)
   222 endif()
   225 endif()
   223 #this command is a workaround to some inlining issues present in older FreePascal versions and fixed in 2.6
       
   224 #if((FREEPASCAL_VERSION VERSION_LESS "2.6") AND (NOT ${FFMPEG_FOUND}))
       
   225 #    add_dependencies(hwengine ENGINECLEAN)
       
   226 #endif()
       
   227 
   226 
   228 install(PROGRAMS "${EXECUTABLE_OUTPUT_PATH}/${engine_output_name}" DESTINATION ${destination_dir})
   227 install(PROGRAMS "${EXECUTABLE_OUTPUT_PATH}/${engine_output_name}" DESTINATION ${destination_dir})