hedgewars/CMakeLists.txt
changeset 9208 acb2492288e5
parent 9203 bcc25cb9b122
child 9224 bce8cf41d666
equal deleted inserted replaced
9207:16373565692a 9208:acb2492288e5
   170     list(REMOVE_AT PNG_LIBRARIES 1) #removing the zlib library path
   170     list(REMOVE_AT PNG_LIBRARIES 1) #removing the zlib library path
   171     get_filename_component(PNG_LIBRARY_DIR ${PNG_LIBRARIES} PATH)
   171     get_filename_component(PNG_LIBRARY_DIR ${PNG_LIBRARIES} PATH)
   172     list(APPEND pascal_flags "-dPNG_SCREENSHOTS" "-Fl${PNG_LIBRARY_DIR}" "-k-L${PNG_LIBRARY_DIR}")
   172     list(APPEND pascal_flags "-dPNG_SCREENSHOTS" "-Fl${PNG_LIBRARY_DIR}" "-k-L${PNG_LIBRARY_DIR}")
   173 endif()
   173 endif()
   174 
   174 
       
   175 if(LUA_FOUND AND LUA_SYSTEM)
       
   176     get_filename_component(LUA_LIBRARY_DIR ${LUA_LIBRARY} PATH)
       
   177     get_filename_component(LUA_LIBRARY_NAME ${LUA_LIBRARY} NAME)
       
   178     #NAME_WE would strip the .1 (or .2) next to the ".so"
       
   179     string(REGEX REPLACE "${CMAKE_SHARED_LIBRARY_PREFIX}(.*)${CMAKE_SHARED_LIBRARY_SUFFIX}" "\\1" LUA_LIBRARY_NAME "${LUA_LIBRARY_NAME}")
       
   180     list(APPEND pascal_flags )
       
   181     list(APPEND pascal_flags "-Fl${LUA_LIBRARY_DIR}"
       
   182                              "-k-L${LUA_LIBRARY_DIR}"
       
   183                              "-XLAlua=${LUA_LIBRARY_NAME}")
       
   184 endif()
   175 
   185 
   176 #this command is a workaround to some inlining issues present in older FreePascal versions and fixed in 2.6
   186 #this command is a workaround to some inlining issues present in older FreePascal versions and fixed in 2.6
   177 if(FREEPASCAL_VERSION VERSION_LESS "2.6")
   187 if(FREEPASCAL_VERSION VERSION_LESS "2.6")
   178     #under some configurations CMAKE_BUILD_TOOL fails to pass on the jobserver, breaking parallel compilation
   188     #under some configurations CMAKE_BUILD_TOOL fails to pass on the jobserver, breaking parallel compilation
   179     if(UNIX)
   189     if(UNIX)