diff options
author | V3n3RiX <venerix@koprulu.sector> | 2023-06-25 01:28:26 +0100 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2023-06-25 01:28:26 +0100 |
commit | 9fce2d9787c37a690336f5e345a49d83ee60bc8a (patch) | |
tree | 0dabdf3dfaf12e3782b5551f1c84f30f19d22bec /eclass/cmake.eclass | |
parent | d2f5fa9c5505a5c3df8170b498e890f50dfc9553 (diff) |
gentoo auto-resync : 25:06:2023 - 01:28:26
Diffstat (limited to 'eclass/cmake.eclass')
-rw-r--r-- | eclass/cmake.eclass | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/eclass/cmake.eclass b/eclass/cmake.eclass index 24787f1c2a49..1cdbc123a243 100644 --- a/eclass/cmake.eclass +++ b/eclass/cmake.eclass @@ -484,17 +484,17 @@ cmake_src_configure() { cat >> "${toolchain_file}" <<- _EOF_ || die set(CMAKE_SYSTEM_NAME "${sysname}") _EOF_ + fi - if [ "${SYSROOT:-/}" != "/" ] ; then - # When cross-compiling with a sysroot (e.g. with crossdev's emerge wrappers) - # we need to tell cmake to use libs/headers from the sysroot but programs from / only. - cat >> "${toolchain_file}" <<- _EOF_ || die - set(CMAKE_SYSROOT "${ESYSROOT}") - set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) - set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) - set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) - _EOF_ - fi + if [[ ${SYSROOT:-/} != / ]] ; then + # When building with a sysroot (e.g. with crossdev's emerge wrappers) + # we need to tell cmake to use libs/headers from the sysroot but programs from / only. + cat >> "${toolchain_file}" <<- _EOF_ || die + set(CMAKE_SYSROOT "${ESYSROOT}") + set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) + set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) + set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) + _EOF_ fi if use prefix-guest; then |