Skip to content

Commit 497e066

Browse files
committed
classes/cmake added sysroot to find_root_paths
1 parent 543cfa2 commit 497e066

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

classes/cmake.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ buildScript: |
1111
[[ "$AUTOCONF_BUILD" == *-msys ]] && i="$(cygpath -m $i)"
1212
CMAKE_FIND_ROOT_PATH+="${CMAKE_FIND_ROOT_PATH:+;}$i"
1313
done
14+
# We should also add the sysroot path if available.
15+
SYSROOT="$($CXX -print-sysroot)"
16+
[ -z "${SYSROOT:+true}" ] || CMAKE_FIND_ROOT_PATH+=";${SYSROOT}"
1417
1518
# This looks odd but it prevents MSYS from converting /usr to C:\msys64\usr
1619
# (or wherever MSYS was installed). See
@@ -115,6 +118,7 @@ buildScript: |
115118
-DCMAKE_BUILD_TYPE=Bob \
116119
-DCMAKE_INSTALL_PREFIX="$CMAKE_INSTALL_PREFIX" \
117120
-DCMAKE_INSTALL_SYSCONFDIR="$CMAKE_INSTALL_SYSCONFDIR" \
121+
-DCMAKE_INSTALL_LIBDIR="lib" \
118122
-DBUILD_SHARED_LIBS=$BUILD_SHARED_LIBS \
119123
-DCMAKE_MSVC_RUNTIME_LIBRARY="" \
120124
"${@:2}"

0 commit comments

Comments
 (0)