Skip to content

Commit

Permalink
Don't look for zlib and zstd manually on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
sfan5 committed Sep 1, 2021
1 parent e5edda2 commit 31d2b9e
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 14 deletions.
20 changes: 8 additions & 12 deletions src/CMakeLists.txt
Expand Up @@ -203,6 +203,7 @@ endif(ENABLE_REDIS)

find_package(SQLite3 REQUIRED)


OPTION(ENABLE_PROMETHEUS "Enable prometheus client support" FALSE)
set(USE_PROMETHEUS FALSE)

Expand Down Expand Up @@ -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()
Expand Down Expand Up @@ -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)")
Expand All @@ -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})
Expand Down
2 changes: 1 addition & 1 deletion util/buildbot/buildwin32.sh
Expand Up @@ -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 \
Expand Down
2 changes: 1 addition & 1 deletion util/buildbot/buildwin64.sh
Expand Up @@ -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 \
Expand Down

0 comments on commit 31d2b9e

Please sign in to comment.