Browse Source

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.
Přemysl Janouch 5 months ago
parent
commit
9aa9512190
Signed by: Přemysl Janouch <p@janouch.name> GPG Key ID: A0420B94F92B9493
2 changed files with 20 additions and 9 deletions
  1. 15
    1
      CMakeLists.txt
  2. 5
    8
      Win32Depends.cmake

+ 15
- 1
CMakeLists.txt View File

@@ -83,7 +83,21 @@ endif (CONVERT_EXECUTABLE AND NOT WIN32)
83 83
 # Dependencies
84 84
 find_package (PkgConfig REQUIRED)
85 85
 pkg_check_modules (GTK3 REQUIRED gtk+-3.0 json-glib-1.0)
86
-pkg_search_module (Lua REQUIRED lua>=5.2 lua5.3 lua-5.3 lua5.2 lua-5.2)
86
+
87
+if (NOT WIN32)
88
+	pkg_search_module (Lua REQUIRED lua>=5.2 lua5.3 lua-5.3 lua5.2 lua-5.2)
89
+else (NOT WIN32)
90
+	# For whatever reason this now seems to be required
91
+	set (LUA_INCLUDE_DIR "${WIN32_DEPENDS_PATH}/include")
92
+
93
+	# XXX: this seems to require CMake 3.0 ... include it in the project?
94
+	find_package (Lua REQUIRED)
95
+	if (LUA_VERSION_STRING VERSION_LESS "5.2")
96
+		message (FATAL_ERROR "Lua 5.2 not found")
97
+	endif (LUA_VERSION_STRING VERSION_LESS "5.2")
98
+	set (Lua_LIBRARIES ${LUA_LIBRARIES})
99
+	set (Lua_INCLUDE_DIRS ${LUA_INCLUDE_DIR})
100
+endif (NOT WIN32)
87 101
 
88 102
 # This actually fucks up MinGW cross-compilation if omitted
89 103
 link_directories (${GTK3_LIBRARY_DIRS})

+ 5
- 8
Win32Depends.cmake View File

@@ -46,16 +46,13 @@ set (pkg_winlibs_root "http://sourceforge.net/projects/winlibs/files")
46 46
 set (pkg_winlibs_urls "${pkg_winlibs_root}/GTK+/libjson-glib-1.0-1-mingw32.7z")
47 47
 set (pkg_winlibs_md5 "f06e42c5998dae5fb6245fecc96a403e")
48 48
 
49
-set (pkg_mingw_lua_root "http://repo.msys2.org/mingw/i686")
49
+set (pkg_mingw_lua_root "http://sourceforge.net/projects/mingw/files/MinGW/Extension")
50 50
 set (pkg_mingw_lua_urls
51
-	"${pkg_mingw_lua_root}/mingw-w64-i686-lua-5.3.4-1-any.pkg.tar.xz"
52
-	"${pkg_mingw_lua_root}/mingw-w64-i686-gcc-libs-7.3.0-2-any.pkg.tar.xz"
53
-	"${pkg_mingw_lua_root}/mingw-w64-i686-libwinpthread-git-6.0.0.5134.2416de71-1-any.pkg.tar.xz")
54
-set (pkg_mingw_lua_strip "mingw32")
51
+	"${pkg_mingw_lua_root}/lua/lua-5.2.0-1/lua-5.2.0-1-mingw32-dll-52.tar.xz"
52
+	"${pkg_mingw_lua_root}/lua/lua-5.2.0-1/lua-5.2.0-1-mingw32-dev.tar.xz")
55 53
 set (pkg_mingw_lua_md5
56
-	"b75af38372cddde0b0ff997cf4fdb038"
57
-	"9507a011e7ab3c7fadf01b24590b8713"
58
-	"ecf4d62961c5f4b33841a4d22a0eda80")
54
+	"150b27cab05b78ba40bbd7225630c00d"
55
+	"6abe77c1e1a783075fe73c53b7c235fb")
59 56
 
60 57
 # Stage 1: fetch missing packages
61 58
 foreach (pkg_set ${pkg_list})

Loading…
Cancel
Save