Skip to content

Commit c0f5cc1

Browse files
committed
build: Fix libmultiprocess cross-compiling to Linux hosts
To successfully call the `capnp_generate_cpp()` function, the `libmultiprocess` build system must be provided with paths to the native `capnp` and `capnpc-c++` tools.
1 parent 5d53cf3 commit c0f5cc1

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

depends/funcs.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ $(1)_cmake=env CC="$$($(1)_cc)" \
175175
CXX="$$($(1)_cxx)" \
176176
CXXFLAGS="$$($(1)_cppflags) $$($(1)_cxxflags)" \
177177
LDFLAGS="$$($(1)_ldflags)" \
178-
cmake -DCMAKE_INSTALL_PREFIX:PATH="$$($($(1)_type)_prefix)"
178+
cmake -DCMAKE_INSTALL_PREFIX:PATH="$$($($(1)_type)_prefix)" $$($(1)_cmake_opts)
179179
ifeq ($($(1)_type),build)
180180
$(1)_cmake += -DCMAKE_INSTALL_RPATH:PATH="$$($($(1)_type)_prefix)/lib"
181181
else

depends/packages/libmultiprocess.mk

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,16 @@ $(package)_download_path=$(native_$(package)_download_path)
44
$(package)_file_name=$(native_$(package)_file_name)
55
$(package)_sha256_hash=$(native_$(package)_sha256_hash)
66
$(package)_dependencies=native_$(package) capnp
7+
ifneq ($(host),$(build))
8+
$(package)_dependencies += native_capnp
9+
endif
10+
11+
define $(package)_set_vars :=
12+
ifneq ($(host),$(build))
13+
$(package)_cmake_opts := -DCAPNP_EXECUTABLE="$$(native_capnp_prefixbin)/capnp"
14+
$(package)_cmake_opts += -DCAPNPC_CXX_EXECUTABLE="$$(native_capnp_prefixbin)/capnpc-c++"
15+
endif
16+
endef
717

818
define $(package)_config_cmds
919
$($(package)_cmake) .

0 commit comments

Comments
 (0)