Details
-
Bug
-
Resolution: Out of scope
-
P4: Low
-
None
-
6.6
-
None
-
305f61a80 (dev)
Description
I configure like this:
PKG_CONFIG_PATH= \ PKG_CONFIG_SYSROOT_DIR="$SYSROOT" \ PKG_CONFIG_LIBDIR="$SYSROOT/usr/lib/$TRIPLET/pkgconfig:$SYSROOT/usr/share/pkgconfig" \ $SRC_DIR/configure \ -make examples -xcb -opengl es2 -debug -linker lld \ -sysroot "$SYSROOT" -prefix "$PREFIX" \ -qt-host-path "$QT_HOST_PATH" \ -- -DCMAKE_C_COMPILER="$CC" -DCMAKE_CXX_COMPILER="$CXX" \ -DCMAKE_C_FLAGS="$CFLAGS" -DCMAKE_CXX_FLAGS="$CXXFLAGS" -DCMAKE_ASM_FLAGS="$ASMFLAGS" \ -DCMAKE_SHARED_LINKER_FLAGS="$LDFLAGS" -DCMAKE_EXE_LINKER_FLAGS="$LDFLAGS" -DCMAKE_MODULE_LINKER_FLAGS="$LDFLAGS" \ -DCMAKE_SYSROOT="$SYSROOT" -DCMAKE_SYSTEM_NAME=Linux \ -DCMAKE_FIND_ROOT_PATH_MODE_PROGRAM=NEVER \ -DCMAKE_FIND_ROOT_PATH_MODE_LIBRARY=ONLY -DCMAKE_FIND_ROOT_PATH_MODE_INCLUDE=ONLY -DCMAKE_FIND_ROOT_PATH_MODE_PACKAGE=ONLY
Notice that I have both -sysroot and -D CMAKE_SYSROOT. The result is success. I also get the following warning:
CMake Warning: Manually-specified variables were not used by the project: INPUT_sysroot
If I omit -D CMAKE_SYSROOT, then the configuration fails (because of failing to find some libraries). Shouldn't configure -sysroot set the CMAKE variable automatically?