--- a/CMakeLists.txt Tue Jun 12 17:20:27 2012 +0400
+++ b/CMakeLists.txt Sun Jun 24 20:31:26 2012 +0400
@@ -52,17 +52,19 @@
ENDIF(NOT BUILD_ENGINE_LIBRARY)
set(target_dir "bin")
-
#bundle .app setup
-if(APPLE)
- set(CMAKE_FIND_FRAMEWORK "FIRST")
-
+if(APPLE OR CROSSAPPLE)
#paths for creating the bundle
set(bundle_name Hedgewars.app)
set(frameworks_dir ${bundle_name}/Contents/Frameworks/)
set(CMAKE_INSTALL_PREFIX ${bundle_name}/Contents/MacOS/)
set(DATA_INSTALL_DIR "../Resources/")
set(target_dir ".")
+ set(minimum_macosx_version "10.6")
+endif()
+
+if(APPLE)
+ set(CMAKE_FIND_FRAMEWORK "FIRST")
#what system are we building for
set(minimum_macosx_version $ENV{MACOSX_DEPLOYMENT_TARGET})
@@ -200,13 +202,17 @@
endif()
find_package(Lua)
-if(${LUA_FOUND})
+if(LUA_FOUND)
message(STATUS "Lua library is present on your system (${LUA_DEFAULT})")
else()
message(STATUS "Lua library not found, building bundled dependency")
add_subdirectory(misc/liblua)
#linking with liblua.a requires system readline -- this works everywhere, right?
- set(pascal_flags "-k${CMAKE_BINARY_DIR}/bin/liblua.a" "-k-lreadline" ${pascal_flags})
+ if(WIN32)
+ set(pascal_flags "-k${CMAKE_BINARY_DIR}/bin/liblua.dll.a" "-k-lreadline" ${pascal_flags})
+ else()
+ set(pascal_flags "-k${CMAKE_BINARY_DIR}/bin/liblua.a" "-k-lreadline" ${pascal_flags})
+ endif()
endif()
add_subdirectory(hedgewars)