hedgewars/CMakeLists.txt
changeset 9230 035cc97de6aa
parent 9227 c02e081ba481
child 9236 ddd675825672
child 9241 6f94d6434f94
equal deleted inserted replaced
9229:5d5c5cbe7681 9230:035cc97de6aa
   148 if(LUA_FOUND AND LUA_SYSTEM)
   148 if(LUA_FOUND AND LUA_SYSTEM)
   149     get_filename_component(LUA_LIBRARY_DIR ${LUA_LIBRARY} PATH)
   149     get_filename_component(LUA_LIBRARY_DIR ${LUA_LIBRARY} PATH)
   150     get_filename_component(LUA_LIBRARY_NAME ${LUA_LIBRARY} NAME)
   150     get_filename_component(LUA_LIBRARY_NAME ${LUA_LIBRARY} NAME)
   151     #NAME_WE would strip the .1 (or .2) next to the ".so"
   151     #NAME_WE would strip the .1 (or .2) next to the ".so"
   152     string(REGEX REPLACE "${CMAKE_SHARED_LIBRARY_PREFIX}(.*)${CMAKE_SHARED_LIBRARY_SUFFIX}" "\\1" LUA_LIBRARY_NAME "${LUA_LIBRARY_NAME}")
   152     string(REGEX REPLACE "${CMAKE_SHARED_LIBRARY_PREFIX}(.*)${CMAKE_SHARED_LIBRARY_SUFFIX}" "\\1" LUA_LIBRARY_NAME "${LUA_LIBRARY_NAME}")
   153     add_flag_append(CMAKE_Pascal_FLAGS "-Fl${LUA_LIBRARY_DIR} -k-L${LUA_LIBRARY_DIR} -XLAlua=${LUA_LIBRARY_NAME}")
   153     add_flag_append(CMAKE_Pascal_FLAGS "-Fl${LUA_LIBRARY_DIR} -XLAlua=${LUA_LIBRARY_NAME}")
   154 else()
   154 else()
   155     add_definitions(-dLUA_INTERNAL)
   155     add_definitions(-dLUA_INTERNAL)
   156     list(APPEND HW_LINK_LIBS lua)
   156     list(APPEND HW_LINK_LIBS lua)
   157     add_flag_append(CMAKE_Pascal_FLAGS "-XLAlua=${lua_output_name}")
   157     add_flag_append(CMAKE_Pascal_FLAGS "-XLAlua=${lua_output_name}")
   158 endif()
   158 endif()
   162     add_definitions(-dPHYSFS_INTERNAL)
   162     add_definitions(-dPHYSFS_INTERNAL)
   163     list(APPEND HW_LINK_LIBS physfs)
   163     list(APPEND HW_LINK_LIBS physfs)
   164     #-XLA is a beta fpc flag that renames libraries before passing them to the linker
   164     #-XLA is a beta fpc flag that renames libraries before passing them to the linker
   165     #we also have to pass PHYSFS_INTERNAL to satisfy windows runtime requirements
   165     #we also have to pass PHYSFS_INTERNAL to satisfy windows runtime requirements
   166     #(should be harmless on other platforms)
   166     #(should be harmless on other platforms)
   167     add_flag_append(CMAKE_Pascal_FLAGS "-XLAphysfs=${physfs_output_name}")
   167     add_flag_append(CMAKE_Pascal_FLAGS "-Fl${LIBRARY_OUTPUT_PATH} -XLAphysfs=${physfs_output_name}")
   168 endif()
   168 endif()
   169 list(APPEND HW_LINK_LIBS physlayer)
   169 list(APPEND HW_LINK_LIBS physlayer)
   170 
   170 
   171 #Mix_Init/Mix_Quit from SDL_mixer 1.2.10
   171 #Mix_Init/Mix_Quit from SDL_mixer 1.2.10
   172 check_library_exists(${SDLMIXER_LIBRARY} Mix_Init "" HAVE_MIXINIT)
   172 check_library_exists(${SDLMIXER_LIBRARY} Mix_Init "" HAVE_MIXINIT)