CMakeLists.txt
branchcmake_pascal
changeset 8787 f9dc079f2aa6
parent 8784 c11727e5fa3f
child 8796 8ab4ef8b70f6
equal deleted inserted replaced
8784:c11727e5fa3f 8787:f9dc079f2aa6
   255 add_flag_append(CMAKE_Pascal_FLAGS_RELEASE "-Os -Xs -Si")
   255 add_flag_append(CMAKE_Pascal_FLAGS_RELEASE "-Os -Xs -Si")
   256 
   256 
   257 #get BUILD_TYPE and enable/disable optimisation
   257 #get BUILD_TYPE and enable/disable optimisation
   258 message(STATUS "Using ${CMAKE_BUILD_TYPE} configuration")
   258 message(STATUS "Using ${CMAKE_BUILD_TYPE} configuration")
   259 if(CMAKE_BUILD_TYPE MATCHES "DEBUG")
   259 if(CMAKE_BUILD_TYPE MATCHES "DEBUG")
   260 
       
   261     list(APPEND haskell_flags "-Wall"       # all warnings
   260     list(APPEND haskell_flags "-Wall"       # all warnings
   262                               "-debug"      # debug mode
   261                               "-debug"      # debug mode
   263                               "-dcore-lint" # internal sanity check
   262                               "-dcore-lint" # internal sanity check
   264                               )
   263                               )
   265 else()
   264 else()
   266     list(APPEND haskell_flags "-w" # no warnings
   265     list(APPEND haskell_flags "-w" # no warnings
   267                               )
   266                               )
   268 endif()
   267 endif()
   269 
   268 
   270 include(${CMAKE_MODULE_PATH}/utils.cmake)
       
   271 
       
   272 #lua discovery
   269 #lua discovery
   273 find_package(Lua)
   270 find_package(Lua)
   274 if(LUA_FOUND)
   271 if(LUA_FOUND)
   275     message(STATUS "Found LUA: ${LUA_DEFAULT}")
   272     message(STATUS "Found LUA: ${LUA_DEFAULT}")
   276 else()
   273 else()
   277     message(STATUS "LUA will be provided by the bundled sources")
   274     message(STATUS "LUA will be provided by the bundled sources")
   278     add_subdirectory(misc/liblua)
   275     add_subdirectory(misc/liblua)
   279     #linking with liblua.a requires system readline
       
   280     add_flag_append(CMAKE_Pascal_FLAGS "-k${EXECUTABLE_OUTPUT_PATH}/lib${LUA_LIBRARY}.a -k-lreadline")
       
   281 endif()
   276 endif()
   282 
   277 
   283 
   278 
   284 #physfs discovery
   279 #physfs discovery
   285 if (${SYSTEM_PHYSFS})
   280 if (${SYSTEM_PHYSFS})