Skip to content

Commit d046236

Browse files
committed
depends: always set CMAKE_INSTALL_LIBDIR=lib/
Rather than setting this per package, set it globally, as this is always what we want. Without doing this, later commit will have to add the same doc + change to more packages.
1 parent 5560741 commit d046236

File tree

3 files changed

+7
-11
lines changed

3 files changed

+7
-11
lines changed

depends/funcs.mk

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,12 +170,18 @@ ifneq ($($(1)_ldflags),)
170170
$(1)_autoconf += LDFLAGS="$$($(1)_ldflags)"
171171
endif
172172

173+
# We hardcode the library install path to "lib" to match the PKG_CONFIG_PATH
174+
# setting in depends/config.site.in, which also hardcodes "lib".
175+
# Without this setting, CMake by default would use the OS library
176+
# directory, which might be "lib64" or something else, not "lib", on multiarch systems.
173177
$(1)_cmake=env CC="$$($(1)_cc)" \
174178
CFLAGS="$$($(1)_cppflags) $$($(1)_cflags)" \
175179
CXX="$$($(1)_cxx)" \
176180
CXXFLAGS="$$($(1)_cppflags) $$($(1)_cxxflags)" \
177181
LDFLAGS="$$($(1)_ldflags)" \
178-
cmake -DCMAKE_INSTALL_PREFIX:PATH="$$($($(1)_type)_prefix)" $$($(1)_config_opts)
182+
cmake -DCMAKE_INSTALL_PREFIX:PATH="$$($($(1)_type)_prefix)" \
183+
-DCMAKE_INSTALL_LIBDIR=lib/ \
184+
$$($(1)_config_opts)
179185
ifeq ($($(1)_type),build)
180186
$(1)_cmake += -DCMAKE_INSTALL_RPATH:PATH="$$($($(1)_type)_prefix)/lib"
181187
else

depends/packages/capnp.mk

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,10 @@ $(package)_download_file=$(native_$(package)_download_file)
55
$(package)_file_name=$(native_$(package)_file_name)
66
$(package)_sha256_hash=$(native_$(package)_sha256_hash)
77

8-
# Hardcode library install path to "lib" to match the PKG_CONFIG_PATH
9-
# setting in depends/config.site.in, which also hardcodes "lib".
10-
# Without this setting, cmake by default would use the OS library
11-
# directory, which might be "lib64" or something else, not "lib", on multiarch systems.
128
define $(package)_set_vars :=
139
$(package)_config_opts := -DBUILD_TESTING=OFF
1410
$(package)_config_opts += -DWITH_OPENSSL=OFF
1511
$(package)_config_opts += -DWITH_ZLIB=OFF
16-
$(package)_config_opts += -DCMAKE_INSTALL_LIBDIR=lib/
1712
endef
1813

1914
define $(package)_config_cmds

depends/packages/libmultiprocess.mk

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,7 @@ ifneq ($(host),$(build))
88
$(package)_dependencies += native_capnp
99
endif
1010

11-
# Hardcode library install path to "lib" to match the PKG_CONFIG_PATH
12-
# setting in depends/config.site.in, which also hardcodes "lib".
13-
# Without this setting, cmake by default would use the OS library
14-
# directory, which might be "lib64" or something else, not "lib", on multiarch systems.
1511
define $(package)_set_vars :=
16-
$(package)_config_opts += -DCMAKE_INSTALL_LIBDIR=lib/
1712
$(package)_config_opts += -DCMAKE_POSITION_INDEPENDENT_CODE=ON
1813
ifneq ($(host),$(build))
1914
$(package)_config_opts := -DCAPNP_EXECUTABLE="$$(native_capnp_prefixbin)/capnp"

0 commit comments

Comments
 (0)