move one flag cmake_pascal
authorkoda
Tue, 19 Mar 2013 10:55:10 +0100
branchcmake_pascal
changeset 8787 f9dc079f2aa6
parent 8784 c11727e5fa3f
child 8790 783669d76b4f
move one flag
CMakeLists.txt
hedgewars/CMakeLists.txt
--- a/CMakeLists.txt	Tue Mar 19 10:43:45 2013 +0100
+++ b/CMakeLists.txt	Tue Mar 19 10:55:10 2013 +0100
@@ -257,7 +257,6 @@
 #get BUILD_TYPE and enable/disable optimisation
 message(STATUS "Using ${CMAKE_BUILD_TYPE} configuration")
 if(CMAKE_BUILD_TYPE MATCHES "DEBUG")
-
     list(APPEND haskell_flags "-Wall"       # all warnings
                               "-debug"      # debug mode
                               "-dcore-lint" # internal sanity check
@@ -267,8 +266,6 @@
                               )
 endif()
 
-include(${CMAKE_MODULE_PATH}/utils.cmake)
-
 #lua discovery
 find_package(Lua)
 if(LUA_FOUND)
@@ -276,8 +273,6 @@
 else()
     message(STATUS "LUA will be provided by the bundled sources")
     add_subdirectory(misc/liblua)
-    #linking with liblua.a requires system readline
-    add_flag_append(CMAKE_Pascal_FLAGS "-k${EXECUTABLE_OUTPUT_PATH}/lib${LUA_LIBRARY}.a -k-lreadline")
 endif()
 
 
--- a/hedgewars/CMakeLists.txt	Tue Mar 19 10:43:45 2013 +0100
+++ b/hedgewars/CMakeLists.txt	Tue Mar 19 10:55:10 2013 +0100
@@ -175,6 +175,11 @@
     add_flag_append(CMAKE_Pascal_FLAGS -Fl${PNG_LIB_DIR})
 endif()
 
+if(NOT LUA_FOUND)
+    #linking with liblua.a requires system readline
+    add_flag_append(CMAKE_Pascal_FLAGS "-k${EXECUTABLE_OUTPUT_PATH}/lib${LUA_LIBRARY}.a -k-lreadline")
+endif()
+
 if(NOT PHYSFS_FOUND)
     #-XLA is a beta fpc flag that renames libraries before passing them to the linker
     #we also have to pass PHYSFS_INTERNAL to satisfy windows runtime requirements