Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-92859

cmake: static qt - INTERFACE_SOURCES contains paths to the build directory

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P2: Important
    • 6.1.0 RC
    • 6.0.3
    • Build System: CMake
    • None

    Description

      i'm using statically linked qt. Qt now injects `INTERFACE_SOURCES` to each target, which are used to link/load the static plugins. however the path to these sources is an absolute path to the build folder (e.g. something like: `/Users/tim/dev/qt3rd/build-Qt-6.x-dev-macx-clang-static/qtsvg/qt_Gui_QMinimalIntegrationPlugin.cpp`)

      we probably want to (a) deploy the files via `ninja install` and (b) rewrite the path the the generated cmake file.

      i've configured the builds via:

      cmake -S /Users/tim/dev/qt3rd -B /Users/tim/dev/qt3rd/build-Qt-6.x-dev-macx-clang-static -G "Ninja" -DBUILD_SHARED_LIBS=OFF -DBUILD_qtquick3d=OFF -DQT_USE_CCACHE=ON -DBUILD_WITH_PCH=OFF -DCMAKE_C_COMPILER=/Applications/Xcode12.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -DCMAKE_CXX_COMPILER=/Applications/Xcode12.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -DCMAKE_INSTALL_PREFIX=/Users/tim/dev/qt3rd/Qt-6.x-dev-macx-clang-static -DCMAKE_BUILD_TYPE=Release -DQT_NAMESPACE=MYNAMESPACE -DQT_BUILD_TESTS=OFF -DQT_BUILD_EXAMPLES=OFF -DQT_QMAKE_TARGET_MKSPEC=macx-clang -DPNG_INCLUDE_DIRS=/Users/tim/dev/qt3rd/3rdparty-builds/libpng/ -DPNG_PNG_INCLUDE_DIR=/Users/tim/dev/qt3rd/3rdparty-builds/libpng/ -DPNG_LIBRARIES=/Users/tim/dev/qt3rd/3rdparty-builds/libpng/lib/osx/libpng.a -DPNG_LIBRARY=/Users/tim/dev/qt3rd/3rdparty-builds/libpng/lib/osx/libpng.a -DPNG_VERSION_STRING=1.6.23 -DPNG_FOUND=TRUE -DJPEG_INCLUDE_DIRS=/Users/tim/dev/qt3rd/3rdparty-builds/libjpeg/ -DJPEG_INCLUDE_DIR=/Users/tim/dev/qt3rd/3rdparty-builds/libjpeg/ -DJPEG_LIBRARIES=/Users/tim/dev/qt3rd/3rdparty-builds/libjpeg/lib/osx/libjpeg.a -DJPEG_LIBRARY=/Users/tim/dev/qt3rd/3rdparty-builds/libjpeg/lib/osx/libjpeg.a -DJPEG_VERSION=9a -DJPEG_FOUND=TRUE -DFREETYPE_INCLUDE_DIRS=/Users/tim/dev/qt3rd/3rdparty-builds/freetype/include -DFREETYPE_LIBRARIES=/Users/tim/dev/qt3rd/3rdparty-builds/freetype/lib/osx/libfreetype.a -DFREETYPE_LIBRARY=/Users/tim/dev/qt3rd/3rdparty-builds/freetype/lib/osx/libfreetype.a -DFREETYPE_LIBRARIES_DEBUG=/Users/tim/dev/qt3rd/3rdparty-builds/freetype/lib/osx/libfreetype.a -DFREETYPE_LIBRARIES_RELEASE=/Users/tim/dev/qt3rd/3rdparty-builds/freetype/lib/osx/libfreetype.a -DFREETYPE_VERSION_STRING=9a -DFreetype_FOUND=TRUE -DFREETYPE_FOUND=TRUE -DFREETYPE_DIR=/Users/tim/dev/qt3rd/3rdparty-builds/freetype -DINPUT_system_zlib=TRUE -DINPUT_glib=FALSE -DINPUT_libjpeg=system -DINPUT_libpng=system -DINPUT_freetype=system -DINPUT_harfbuzz=qt -DFEATURE_system_freetype=ON -DFEATURE_system_jpeg=ON -DFEATURE_system_png=ON
      

      the part of injecting 3rdparty builds is probably irrelevant for the issue. it's built from the 6.0.3 source tarball (with small patches). i did not check 6.1 (also, i'm seeing this on macos, not ios)

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            qtbuildsystem Qt Build System Team
            timblechmann tim blechmann
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes