Skip to content

Commit

Permalink
cmake, doc: Update depends/README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
hebasto committed May 4, 2024
1 parent c05ea8e commit 6212d6d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 10 deletions.
14 changes: 5 additions & 9 deletions depends/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,13 @@ For example:

make HOST=x86_64-w64-mingw32 -j4

**Bitcoin Core's `configure` script by default will ignore the depends output.** In
**When configuring Bitcoin Core, CMake by default will ignore the depends output.** In
order for it to pick up libraries, tools, and settings from the depends build,
you must set the `CONFIG_SITE` environment variable to point to a `config.site` settings file.
Make sure that `CONFIG_SITE` is an absolute path.
In the above example, a file named `depends/x86_64-w64-mingw32/share/config.site` will be
created. To use it during compilation:
you must specify the toolchain file.
In the above example, a file named `depends/x86_64-w64-mingw32/toolchain.cmake` will be
created. To use it during configuring Bitcoin Core:

CONFIG_SITE=$PWD/depends/x86_64-w64-mingw32/share/config.site ./configure

The default install prefix when using `config.site` is `--prefix=depends/<host-platform-triplet>`,
so depends build outputs will be installed in that location.
cmake -B build --toolchain depends/x86_64-w64-mingw32/toolchain.cmake

Common `host-platform-triplet`s for cross compilation are:

Expand Down
2 changes: 1 addition & 1 deletion depends/funcs.mk
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ $(1)_autoconf += LDFLAGS="$$($(1)_ldflags)"
endif

# We hardcode the library install path to "lib" to match the PKG_CONFIG_PATH
# setting in depends/config.site.in, which also hardcodes "lib".
# setting in depends/toolchain.cmake.in, which also hardcodes "lib".
# Without this setting, CMake by default would use the OS library
# directory, which might be "lib64" or something else, not "lib", on multiarch systems.
$(1)_cmake=env CC="$$($(1)_cc)" \
Expand Down

0 comments on commit 6212d6d

Please sign in to comment.