aboutsummaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorPřemysl Janouch <p@janouch.name>2018-06-25 02:13:16 +0200
committerPřemysl Janouch <p@janouch.name>2018-06-25 02:34:47 +0200
commit9aa9512190a6b5201cbbd35c7a1c8c64788402bc (patch)
tree21c0fdfd6e332a3983ddc4f7ab765c2fd45c3d8d /CMakeLists.txt
parent193b7247090a466d508135d911a4c61b5c429dfa (diff)
downloadlogdiag-9aa9512190a6b5201cbbd35c7a1c8c64788402bc.tar.gz
logdiag-9aa9512190a6b5201cbbd35c7a1c8c64788402bc.tar.xz
logdiag-9aa9512190a6b5201cbbd35c7a1c8c64788402bc.zip
Find a better solution to the Lua situation
It seems that I cannot win here. If I want XP to work, I need to keep the old packages in place. This time the resulting program cannot find _time32 in msvcrt.dll.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt16
1 files changed, 15 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 58ddccb..3769430 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -83,7 +83,21 @@ endif (CONVERT_EXECUTABLE AND NOT WIN32)
# Dependencies
find_package (PkgConfig REQUIRED)
pkg_check_modules (GTK3 REQUIRED gtk+-3.0 json-glib-1.0)
-pkg_search_module (Lua REQUIRED lua>=5.2 lua5.3 lua-5.3 lua5.2 lua-5.2)
+
+if (NOT WIN32)
+ pkg_search_module (Lua REQUIRED lua>=5.2 lua5.3 lua-5.3 lua5.2 lua-5.2)
+else (NOT WIN32)
+ # For whatever reason this now seems to be required
+ set (LUA_INCLUDE_DIR "${WIN32_DEPENDS_PATH}/include")
+
+ # XXX: this seems to require CMake 3.0 ... include it in the project?
+ find_package (Lua REQUIRED)
+ if (LUA_VERSION_STRING VERSION_LESS "5.2")
+ message (FATAL_ERROR "Lua 5.2 not found")
+ endif (LUA_VERSION_STRING VERSION_LESS "5.2")
+ set (Lua_LIBRARIES ${LUA_LIBRARIES})
+ set (Lua_INCLUDE_DIRS ${LUA_INCLUDE_DIR})
+endif (NOT WIN32)
# This actually fucks up MinGW cross-compilation if omitted
link_directories (${GTK3_LIBRARY_DIRS})