Skip to content

Commit 44f3bae

Browse files
committed
depends: Force CMAKE_EXPORT_NO_PACKAGE_REGISTRY=TRUE
When using CMake policies 3.14 and below, the `export(PACKAGE)` command by default populates the user package registry, which is stored outside the build tree. Setting the `CMAKE_EXPORT_NO_PACKAGE_REGISTRY` variable disables this side effect. In CMake 3.15 and later, this behavior is disabled by default, and the variable has no effect.
1 parent b80ead8 commit 44f3bae

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

depends/funcs.mk

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,7 @@ $(1)_cmake=env CC="$$($(1)_cc)" \
224224
-DCMAKE_INSTALL_LIBDIR=lib/ \
225225
-DCMAKE_POSITION_INDEPENDENT_CODE=ON \
226226
-DCMAKE_VERBOSE_MAKEFILE:BOOL=$(V) \
227+
-DCMAKE_EXPORT_NO_PACKAGE_REGISTRY:BOOL=TRUE \
227228
$$($(1)_config_opts)
228229
ifeq ($($(1)_type),build)
229230
$(1)_cmake += -DCMAKE_INSTALL_RPATH:PATH="$$($($(1)_type)_prefix)/lib"

0 commit comments

Comments
 (0)