forked from Mirrorlandia_minetest/minetest
Don't look for zlib and zstd manually on Windows
This commit is contained in:
parent
e5edda28ce
commit
31d2b9edcd
@ -203,6 +203,7 @@ endif(ENABLE_REDIS)
|
|||||||
|
|
||||||
find_package(SQLite3 REQUIRED)
|
find_package(SQLite3 REQUIRED)
|
||||||
|
|
||||||
|
|
||||||
OPTION(ENABLE_PROMETHEUS "Enable prometheus client support" FALSE)
|
OPTION(ENABLE_PROMETHEUS "Enable prometheus client support" FALSE)
|
||||||
set(USE_PROMETHEUS FALSE)
|
set(USE_PROMETHEUS FALSE)
|
||||||
|
|
||||||
@ -239,6 +240,10 @@ if(ENABLE_SPATIAL)
|
|||||||
endif(ENABLE_SPATIAL)
|
endif(ENABLE_SPATIAL)
|
||||||
|
|
||||||
|
|
||||||
|
find_package(ZLIB REQUIRED)
|
||||||
|
find_package(Zstd REQUIRED)
|
||||||
|
|
||||||
|
|
||||||
if(NOT MSVC)
|
if(NOT MSVC)
|
||||||
set(USE_GPROF FALSE CACHE BOOL "Use -pg flag for g++")
|
set(USE_GPROF FALSE CACHE BOOL "Use -pg flag for g++")
|
||||||
endif()
|
endif()
|
||||||
@ -267,17 +272,10 @@ if(WIN32)
|
|||||||
endif()
|
endif()
|
||||||
set(PLATFORM_LIBS ws2_32.lib version.lib shlwapi.lib ${PLATFORM_LIBS})
|
set(PLATFORM_LIBS ws2_32.lib version.lib shlwapi.lib ${PLATFORM_LIBS})
|
||||||
|
|
||||||
# Zlib stuff
|
# DLLs are automatically copied to the output directory by vcpkg when VCPKG_APPLOCAL_DEPS=ON
|
||||||
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
|
|
||||||
if(NOT VCPKG_APPLOCAL_DEPS)
|
if(NOT VCPKG_APPLOCAL_DEPS)
|
||||||
find_file(ZLIB_DLL NAMES "zlib.dll" "zlib1.dll" DOC "Path to zlib.dll for installation (optional)")
|
find_file(ZLIB_DLL NAMES "" 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(ZSTD_DLL NAMES "" DOC "Path to Zstd DLL for installation (optional)")
|
||||||
if(ENABLE_SOUND)
|
if(ENABLE_SOUND)
|
||||||
set(OPENAL_DLL "" CACHE FILEPATH "Path to OpenAL32.dll for installation (optional)")
|
set(OPENAL_DLL "" CACHE FILEPATH "Path to OpenAL32.dll for installation (optional)")
|
||||||
set(OGG_DLL "" CACHE FILEPATH "Path to libogg.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(NOT HAIKU AND NOT APPLE)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
find_package(ZLIB REQUIRED)
|
|
||||||
find_package(Zstd REQUIRED)
|
|
||||||
set(PLATFORM_LIBS -lpthread ${CMAKE_DL_LIBS})
|
set(PLATFORM_LIBS -lpthread ${CMAKE_DL_LIBS})
|
||||||
if(APPLE)
|
if(APPLE)
|
||||||
set(PLATFORM_LIBS "-framework CoreFoundation" ${PLATFORM_LIBS})
|
set(PLATFORM_LIBS "-framework CoreFoundation" ${PLATFORM_LIBS})
|
||||||
|
@ -119,7 +119,7 @@ cmake -S $sourcedir -B . \
|
|||||||
-DIRRLICHT_DLL="$irr_dlls" \
|
-DIRRLICHT_DLL="$irr_dlls" \
|
||||||
\
|
\
|
||||||
-DZLIB_INCLUDE_DIR=$libdir/zlib/include \
|
-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 \
|
-DZLIB_DLL=$libdir/zlib/bin/zlib1.dll \
|
||||||
\
|
\
|
||||||
-DZSTD_INCLUDE_DIR=$libdir/zstd/include \
|
-DZSTD_INCLUDE_DIR=$libdir/zstd/include \
|
||||||
|
@ -119,7 +119,7 @@ cmake -S $sourcedir -B . \
|
|||||||
-DIRRLICHT_DLL="$irr_dlls" \
|
-DIRRLICHT_DLL="$irr_dlls" \
|
||||||
\
|
\
|
||||||
-DZLIB_INCLUDE_DIR=$libdir/zlib/include \
|
-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 \
|
-DZLIB_DLL=$libdir/zlib/bin/zlib1.dll \
|
||||||
\
|
\
|
||||||
-DZSTD_INCLUDE_DIR=$libdir/zstd/include \
|
-DZSTD_INCLUDE_DIR=$libdir/zstd/include \
|
||||||
|
Loading…
Reference in New Issue
Block a user