aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsfan5 <sfan5@live.de>2021-09-01 10:48:54 +0200
committersfan5 <sfan5@live.de>2021-09-01 22:20:38 +0200
commit31d2b9edcdf3215aa047d54254c192fc46a7a517 (patch)
tree0a0b68ff27b32880eb4050835ebcbc76ed6b4506
parente5edda28ce3ba123464d08a37e3f81005b727305 (diff)
downloadminetest-31d2b9edcdf3215aa047d54254c192fc46a7a517.tar.gz
minetest-31d2b9edcdf3215aa047d54254c192fc46a7a517.tar.bz2
minetest-31d2b9edcdf3215aa047d54254c192fc46a7a517.zip
Don't look for zlib and zstd manually on Windows
-rw-r--r--src/CMakeLists.txt20
-rwxr-xr-xutil/buildbot/buildwin32.sh2
-rwxr-xr-xutil/buildbot/buildwin64.sh2
3 files changed, 10 insertions, 14 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index addb0af3f..dc2072d11 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -203,6 +203,7 @@ endif(ENABLE_REDIS)
find_package(SQLite3 REQUIRED)
+
OPTION(ENABLE_PROMETHEUS "Enable prometheus client support" FALSE)
set(USE_PROMETHEUS FALSE)
@@ -239,6 +240,10 @@ if(ENABLE_SPATIAL)
endif(ENABLE_SPATIAL)
+find_package(ZLIB REQUIRED)
+find_package(Zstd REQUIRED)
+
+
if(NOT MSVC)
set(USE_GPROF FALSE CACHE BOOL "Use -pg flag for g++")
endif()
@@ -267,17 +272,10 @@ if(WIN32)
endif()
set(PLATFORM_LIBS ws2_32.lib version.lib shlwapi.lib ${PLATFORM_LIBS})
- # Zlib stuff
- find_path(ZLIB_INCLUDE_DIR "zlib.h" DOC "Zlib include directory")
- find_library(ZLIB_LIBRARIES "zlib" DOC "Path to zlib library")
-
- find_path(ZSTD_INCLUDE_DIR "zstd.h" DOC "Zstd include directory")
- find_library(ZSTD_LIBRARY "zstd" DOC "Path to zstd library")
-
- # Dll's are automatically copied to the output directory by vcpkg when VCPKG_APPLOCAL_DEPS=ON
+ # DLLs are automatically copied to the output directory by vcpkg when VCPKG_APPLOCAL_DEPS=ON
if(NOT VCPKG_APPLOCAL_DEPS)
- find_file(ZLIB_DLL NAMES "zlib.dll" "zlib1.dll" DOC "Path to zlib.dll for installation (optional)")
- find_file(ZSTD_DLL NAMES "zstd.dll" DOC "Path to zstd.dll for installation (optional)")
+ find_file(ZLIB_DLL NAMES "" DOC "Path to Zlib DLL for installation (optional)")
+ find_file(ZSTD_DLL NAMES "" DOC "Path to Zstd DLL for installation (optional)")
if(ENABLE_SOUND)
set(OPENAL_DLL "" CACHE FILEPATH "Path to OpenAL32.dll for installation (optional)")
set(OGG_DLL "" CACHE FILEPATH "Path to libogg.dll for installation (optional)")
@@ -299,8 +297,6 @@ else()
endif(NOT HAIKU AND NOT APPLE)
endif()
- find_package(ZLIB REQUIRED)
- find_package(Zstd REQUIRED)
set(PLATFORM_LIBS -lpthread ${CMAKE_DL_LIBS})
if(APPLE)
set(PLATFORM_LIBS "-framework CoreFoundation" ${PLATFORM_LIBS})
diff --git a/util/buildbot/buildwin32.sh b/util/buildbot/buildwin32.sh
index b6c188739..eceb5b788 100755
--- a/util/buildbot/buildwin32.sh
+++ b/util/buildbot/buildwin32.sh
@@ -119,7 +119,7 @@ cmake -S $sourcedir -B . \
-DIRRLICHT_DLL="$irr_dlls" \
\
-DZLIB_INCLUDE_DIR=$libdir/zlib/include \
- -DZLIB_LIBRARIES=$libdir/zlib/lib/libz.dll.a \
+ -DZLIB_LIBRARY=$libdir/zlib/lib/libz.dll.a \
-DZLIB_DLL=$libdir/zlib/bin/zlib1.dll \
\
-DZSTD_INCLUDE_DIR=$libdir/zstd/include \
diff --git a/util/buildbot/buildwin64.sh b/util/buildbot/buildwin64.sh
index c6cb80cda..68d2ebf0c 100755
--- a/util/buildbot/buildwin64.sh
+++ b/util/buildbot/buildwin64.sh
@@ -119,7 +119,7 @@ cmake -S $sourcedir -B . \
-DIRRLICHT_DLL="$irr_dlls" \
\
-DZLIB_INCLUDE_DIR=$libdir/zlib/include \
- -DZLIB_LIBRARIES=$libdir/zlib/lib/libz.dll.a \
+ -DZLIB_LIBRARY=$libdir/zlib/lib/libz.dll.a \
-DZLIB_DLL=$libdir/zlib/bin/zlib1.dll \
\
-DZSTD_INCLUDE_DIR=$libdir/zstd/include \