Skip to content

Commit fbf4d91

Browse files
committed
Force CMAKE_POLICY_VERSION_MINIMUM=3.5 for only GLEW and libarchive, not all Rack/plugin deps. Updating the Cmake policy version to support Cmake 4 should be the responsibility of each dep.
1 parent bfd530b commit fbf4d91

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

dep.mk

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,6 @@ UNZIP := unzip -o
4040
CONFIGURE := ./configure --prefix="$(DEP_PATH)"
4141

4242
CMAKE := cmake
43-
# Cmake 4 no longer emulates behavior from Cmake <3.5. But most libraries are fine if we use policies from a higher Cmake version.
44-
CMAKE += -DCMAKE_POLICY_VERSION_MINIMUM=3.5
4543
ifdef ARCH_WIN
4644
CMAKE += -DCMAKE_SYSTEM_NAME=Windows
4745
endif

dep/Makefile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,8 @@ glew-2.2.0:
9393

9494
$(glew): | glew-2.2.0
9595
cd glew-2.2.0 && mkdir -p build
96-
cd glew-2.2.0/build && $(CMAKE) ./cmake
96+
# Increase policy version to support building with Cmake 4
97+
cd glew-2.2.0/build && $(CMAKE) -DCMAKE_POLICY_VERSION_MINIMUM=3.5 cmake
9798
$(MAKE) -C glew-2.2.0/build
9899
$(MAKE) -C glew-2.2.0/build install
99100

@@ -167,7 +168,8 @@ libarchive-3.7.7:
167168
$(libarchive): | $(zstd) libarchive-3.7.7
168169
#cd libarchive-3.7.7 && $(CONFIGURE) --enable-shared=no --enable-static=yes --disable-bsdtar --disable-bsdcat --disable-bsdcpio --disable-posix-regex-lib --disable-xattr --disable-acl --without-zlib --without-bz2lib --without-libb2 --without-iconv --without-lz4 --without-lzma --without-cng --without-openssl --without-xml2 --without-expat
169170
cd libarchive-3.7.7 && mkdir -p build
170-
cd libarchive-3.7.7/build && $(CMAKE) -DBUILD_TESTING=OFF -DBUILD_SHARED_LIBS=OFF -DENABLE_ACL=OFF -DENABLE_BZip2=OFF -DENABLE_CAT=OFF -DENABLE_CNG=OFF -DENABLE_COVERAGE=OFF -DENABLE_CPIO=OFF -DENABLE_EXPAT=OFF -DENABLE_ICONV=OFF -DENABLE_LIBB2=OFF -DENABLE_LIBXML2=OFF -DENABLE_LZ4=OFF -DENABLE_LZMA=OFF -DENABLE_LZO=OFF -DENABLE_MBEDTLS=OFF -DENABLE_NETTLE=OFF -DENABLE_OPENSSL=OFF -DENABLE_TAR=OFF -DENABLE_TEST=OFF -DENABLE_UNZIP=OFF -DENABLE_WERROR=OFF -DENABLE_XATTR=OFF -DENABLE_ZLIB=OFF -DENABLE_ZSTD=ON -DWINDOWS_VERSION="WIN7" -DZSTD_INCLUDE_DIR:PATH=$(DEP_PATH)/include -DZSTD_LIBRARY=$(DEP_PATH)/lib/libzstd.a ..
171+
# Increase policy version to support building with Cmake 4
172+
cd libarchive-3.7.7/build && $(CMAKE) -DCMAKE_POLICY_VERSION_MINIMUM=3.5 -DBUILD_TESTING=OFF -DBUILD_SHARED_LIBS=OFF -DENABLE_ACL=OFF -DENABLE_BZip2=OFF -DENABLE_CAT=OFF -DENABLE_CNG=OFF -DENABLE_COVERAGE=OFF -DENABLE_CPIO=OFF -DENABLE_EXPAT=OFF -DENABLE_ICONV=OFF -DENABLE_LIBB2=OFF -DENABLE_LIBXML2=OFF -DENABLE_LZ4=OFF -DENABLE_LZMA=OFF -DENABLE_LZO=OFF -DENABLE_MBEDTLS=OFF -DENABLE_NETTLE=OFF -DENABLE_OPENSSL=OFF -DENABLE_TAR=OFF -DENABLE_TEST=OFF -DENABLE_UNZIP=OFF -DENABLE_WERROR=OFF -DENABLE_XATTR=OFF -DENABLE_ZLIB=OFF -DENABLE_ZSTD=ON -DWINDOWS_VERSION="WIN7" -DZSTD_INCLUDE_DIR:PATH=$(DEP_PATH)/include -DZSTD_LIBRARY=$(DEP_PATH)/lib/libzstd.a ..
171173
$(MAKE) -C libarchive-3.7.7/build
172174
$(MAKE) -C libarchive-3.7.7/build install
173175

0 commit comments

Comments
 (0)