Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. qt 5.15.2 everywhere - Could not find Qt5ThemeSupport
Forum Updated to NodeBB v4.3 + New Features

qt 5.15.2 everywhere - Could not find Qt5ThemeSupport

Scheduled Pinned Locked Moved Unsolved Installation and Deployment
20 Posts 2 Posters 3.9k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • JoeCFDJ JoeCFD

    @Fulgurance not sure why it is built that way. You can link a static one to your app. Simply set the right path.

    F Offline
    F Offline
    Fulgurance
    wrote on last edited by
    #11

    @JoeCFD How can I proceed ? I am not familiar with Cmake.

    It's very strange only this part of Qt was generated.
    It's very annoying for me because actually all of my system work with dynamic libraries

    JoeCFDJ 1 Reply Last reply
    0
    • F Fulgurance

      @JoeCFD How can I proceed ? I am not familiar with Cmake.

      It's very strange only this part of Qt was generated.
      It's very annoying for me because actually all of my system work with dynamic libraries

      JoeCFDJ Offline
      JoeCFDJ Offline
      JoeCFD
      wrote on last edited by JoeCFD
      #12

      @Fulgurance
      add this in your cmake
      target_link_libraries( ${PROJECT_NAME} $ENV{QT5DIR}/lib/libQt5ThemeSupport.a )
      together with other lib links.

      remove all other settings for Qt5::ThemeSupport. you may need include path as well. I do not know.

      F 1 Reply Last reply
      0
      • JoeCFDJ JoeCFD

        @Fulgurance
        add this in your cmake
        target_link_libraries( ${PROJECT_NAME} $ENV{QT5DIR}/lib/libQt5ThemeSupport.a )
        together with other lib links.

        remove all other settings for Qt5::ThemeSupport. you may need include path as well. I do not know.

        F Offline
        F Offline
        Fulgurance
        wrote on last edited by Fulgurance
        #13

        @JoeCFD said in qt 5.15.2 everywhere - Could not find Qt5ThemeSupport:

        target_link_libraries( ${PROJECT_NAME} $ENV{QT5DIR}/lib/libQt5ThemeSupport.a )

        I have this error when I included what you said:

        root [ /sources/KdeSoftwares-Main/Plasma-Integration/5.22.4/plasma-integration-5.22.4/
        build ]# cmake -DCMAKE_INSTALL_PREFIX=/opt/kf5 -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=off -Wno-dev ..
        Installing in /opt/kf5. Run /sources/KdeSoftwares-Main/Plasma-Integration/5.22.4/plasma-integration-5.22.4/build/prefix.sh to set the environment for PlasmaIntegration.
        -- Warning: Property URL already set to "https://xcb.freedesktop.org/", overriding it with "https://xcb.freedesktop.org"
        CMake Error at CMakeLists.txt:42 (target_link_libraries):
          Cannot specify link libraries for target "PlasmaIntegration" which is not
          built by this project.
        
        
        -- Configuring incomplete, errors occurred!
        See also "/sources/KdeSoftwares-Main/Plasma-Integration/5.22.4/plasma-integration-5.22.4/build/CMakeFiles/CMakeOutput.log".
        

        I put it just before the CMakeLists file is looking for this library:

        # dependencies for QPA plugin
        target_link_libraries( PlasmaIntegration $ENV{QT5DIR}/lib/libQt5ThemeSupport.a )
        find_package(Qt5ThemeSupport REQUIRED)
        set(QT5PLATFORMSUPPORT_LIBS Qt5ThemeSupport::Qt5ThemeSupport)
        

        But to be honest I would like to know why didn't generate this library as dynamic. It can be again a problem for me later

        JoeCFDJ 1 Reply Last reply
        0
        • F Fulgurance

          @JoeCFD said in qt 5.15.2 everywhere - Could not find Qt5ThemeSupport:

          target_link_libraries( ${PROJECT_NAME} $ENV{QT5DIR}/lib/libQt5ThemeSupport.a )

          I have this error when I included what you said:

          root [ /sources/KdeSoftwares-Main/Plasma-Integration/5.22.4/plasma-integration-5.22.4/
          build ]# cmake -DCMAKE_INSTALL_PREFIX=/opt/kf5 -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=off -Wno-dev ..
          Installing in /opt/kf5. Run /sources/KdeSoftwares-Main/Plasma-Integration/5.22.4/plasma-integration-5.22.4/build/prefix.sh to set the environment for PlasmaIntegration.
          -- Warning: Property URL already set to "https://xcb.freedesktop.org/", overriding it with "https://xcb.freedesktop.org"
          CMake Error at CMakeLists.txt:42 (target_link_libraries):
            Cannot specify link libraries for target "PlasmaIntegration" which is not
            built by this project.
          
          
          -- Configuring incomplete, errors occurred!
          See also "/sources/KdeSoftwares-Main/Plasma-Integration/5.22.4/plasma-integration-5.22.4/build/CMakeFiles/CMakeOutput.log".
          

          I put it just before the CMakeLists file is looking for this library:

          # dependencies for QPA plugin
          target_link_libraries( PlasmaIntegration $ENV{QT5DIR}/lib/libQt5ThemeSupport.a )
          find_package(Qt5ThemeSupport REQUIRED)
          set(QT5PLATFORMSUPPORT_LIBS Qt5ThemeSupport::Qt5ThemeSupport)
          

          But to be honest I would like to know why didn't generate this library as dynamic. It can be again a problem for me later

          JoeCFDJ Offline
          JoeCFDJ Offline
          JoeCFD
          wrote on last edited by JoeCFD
          #14

          @Fulgurance
          find and set are not needed. It has been hard-coded.

          # dependencies for QPA plugin
          message(  "qt dir = $ENV{QT5DIR}" )
          target_link_libraries( PlasmaIntegration $ENV{QT5DIR}/lib/libQt5ThemeSupport.a )
          

          is the path $ENV{QT5DIR} correct?
          add message to check it out.
          echo $QT5DIR

          F 1 Reply Last reply
          0
          • JoeCFDJ JoeCFD

            @Fulgurance
            find and set are not needed. It has been hard-coded.

            # dependencies for QPA plugin
            message(  "qt dir = $ENV{QT5DIR}" )
            target_link_libraries( PlasmaIntegration $ENV{QT5DIR}/lib/libQt5ThemeSupport.a )
            

            is the path $ENV{QT5DIR} correct?
            add message to check it out.
            echo $QT5DIR

            F Offline
            F Offline
            Fulgurance
            wrote on last edited by Fulgurance
            #15

            @JoeCFD said in qt 5.15.2 everywhere - Could not find Qt5ThemeSupport:

            message( "qt dir = $ENV{QT5DIR}" )
            target_link_libraries( PlasmaIntegration $ENV{QT5DIR}/lib/libQt5ThemeSupport.a )

            So I removed find and set and added your code, this is the result:

            root [ /sources/KdeSoftwares-Main/Plasma-Integration/5.22.4/plasma-integration-5.22.4/
            build ]# cmake -DCMAKE_INSTALL_PREFIX=/opt/kf5 -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=off -Wno-dev ..
            Installing in /opt/kf5. Run /sources/KdeSoftwares-Main/Plasma-Integration/5.22.4/plasma-integration-5.22.4/build/prefix.sh to set the environment for PlasmaIntegration.
            -- Warning: Property URL already set to "https://xcb.freedesktop.org/", overriding it with "https://xcb.freedesktop.org"
            qt dir = /opt/qt5
            CMake Error at CMakeLists.txt:45 (target_link_libraries):
              Cannot specify link libraries for target "PlasmaIntegration" which is not
              built by this project.
            
            
            -- Configuring incomplete, errors occurred!
            See also "/sources/KdeSoftwares-Main/Plasma-Integration/5.22.4/plasma-integration-5.22.4/build/CMakeFiles/CMakeOutput.log".
            root [ /sources/KdeSoftwares-Main/Plasma-Integration/5.22.4/plasma-integration-5.22.4/
            build ]# echo $QT5DIR
            /opt/qt5
            

            So qt dir point to /opt/qt5.

            Have you got an idea why Qt generate libQtThemeSupport as static library ?

            JoeCFDJ 1 Reply Last reply
            0
            • F Fulgurance

              @JoeCFD said in qt 5.15.2 everywhere - Could not find Qt5ThemeSupport:

              message( "qt dir = $ENV{QT5DIR}" )
              target_link_libraries( PlasmaIntegration $ENV{QT5DIR}/lib/libQt5ThemeSupport.a )

              So I removed find and set and added your code, this is the result:

              root [ /sources/KdeSoftwares-Main/Plasma-Integration/5.22.4/plasma-integration-5.22.4/
              build ]# cmake -DCMAKE_INSTALL_PREFIX=/opt/kf5 -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=off -Wno-dev ..
              Installing in /opt/kf5. Run /sources/KdeSoftwares-Main/Plasma-Integration/5.22.4/plasma-integration-5.22.4/build/prefix.sh to set the environment for PlasmaIntegration.
              -- Warning: Property URL already set to "https://xcb.freedesktop.org/", overriding it with "https://xcb.freedesktop.org"
              qt dir = /opt/qt5
              CMake Error at CMakeLists.txt:45 (target_link_libraries):
                Cannot specify link libraries for target "PlasmaIntegration" which is not
                built by this project.
              
              
              -- Configuring incomplete, errors occurred!
              See also "/sources/KdeSoftwares-Main/Plasma-Integration/5.22.4/plasma-integration-5.22.4/build/CMakeFiles/CMakeOutput.log".
              root [ /sources/KdeSoftwares-Main/Plasma-Integration/5.22.4/plasma-integration-5.22.4/
              build ]# echo $QT5DIR
              /opt/qt5
              

              So qt dir point to /opt/qt5.

              Have you got an idea why Qt generate libQtThemeSupport as static library ?

              JoeCFDJ Offline
              JoeCFDJ Offline
              JoeCFD
              wrote on last edited by JoeCFD
              #16

              @Fulgurance said in qt 5.15.2 everywhere - Could not find Qt5ThemeSupport:

              Cannot specify link libraries for target "PlasmaIntegration" which is not
              built by this project

              An important detail is to place target_link_libraries after the add_executable.
              Did you add
              ~~
              target_link_libraries( PlasmaIntegration $ENV{QT5DIR}/lib/libQt5ThemeSupport.a )
              ~~
              after

              add_executable( ... )
              

              like
              ~~
              add_executable( ... )
              target_link_libraries( PlasmaIntegration $ENV{QT5DIR}/lib/libQt5ThemeSupport.a )
              ~~

              I have no idea why. But does it matter?

              F 1 Reply Last reply
              0
              • JoeCFDJ JoeCFD

                @Fulgurance said in qt 5.15.2 everywhere - Could not find Qt5ThemeSupport:

                Cannot specify link libraries for target "PlasmaIntegration" which is not
                built by this project

                An important detail is to place target_link_libraries after the add_executable.
                Did you add
                ~~
                target_link_libraries( PlasmaIntegration $ENV{QT5DIR}/lib/libQt5ThemeSupport.a )
                ~~
                after

                add_executable( ... )
                

                like
                ~~
                add_executable( ... )
                target_link_libraries( PlasmaIntegration $ENV{QT5DIR}/lib/libQt5ThemeSupport.a )
                ~~

                I have no idea why. But does it matter?

                F Offline
                F Offline
                Fulgurance
                wrote on last edited by Fulgurance
                #17

                @JoeCFD I don't have any line like:

                add_executable
                

                This is the CMakeLists file:

                root [ /sources/KdeSoftwares-Main/Plasma-Integration/5.22.4/plasma-integration-5.22.4/
                build ]# cat ../CMakeLists.txt 
                cmake_minimum_required(VERSION 3.16)
                
                project(PlasmaIntegration)
                set(PROJECT_VERSION "5.22.4")
                set(PROJECT_VERSION_MAJOR 5)
                
                set(QT_MIN_VERSION "5.15.0")
                set(KF5_MIN_VERSION "5.82")
                
                find_package(ECM ${KF5_MIN_VERSION}  REQUIRED NO_MODULE)
                set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules ${ECM_MODULE_PATH} )
                
                include(KDEInstallDirs)
                include(KDECMakeSettings)
                include(KDECompilerSettings NO_POLICY_SCOPE)
                include(FeatureSummary)
                include(GenerateExportHeader)
                include(KDEClangFormat)
                
                find_package(Qt5 ${QT_MIN_VERSION} CONFIG REQUIRED Widgets DBus X11Extras QuickControls2)
                find_package(Qt5Gui ${QT_MIN_VERSION} CONFIG REQUIRED Private)
                
                find_package(KF5 ${KF5_MIN_VERSION} REQUIRED COMPONENTS
                                Config ConfigWidgets I18n IconThemes KIO Notifications Wayland
                                WidgetsAddons WindowSystem ConfigWidgets
                )
                
                find_package(XCB COMPONENTS XCB)
                set_package_properties(XCB PROPERTIES
                    DESCRIPTION "X protocol C-language Binding"
                    URL "https://xcb.freedesktop.org"
                    TYPE REQUIRED
                    PURPOSE "Required to pass style properties to native Windows on X11 Platform"
                )
                
                find_package(Breeze 5 CONFIG)
                set_package_properties(Breeze PROPERTIES
                                       TYPE REQUIRED
                                       PURPOSE "For setting the default QStyle name")
                
                # dependencies for QPA plugin
                #find_package(Qt5ThemeSupport REQUIRED)
                #set(QT5PLATFORMSUPPORT_LIBS Qt5ThemeSupport::Qt5ThemeSupport)
                message(  "qt dir = $ENV{QT5DIR}" )
                target_link_libraries( PlasmaIntegration $ENV{QT5DIR}/lib/libQt5ThemeSupport.a )
                
                add_definitions(-DTRANSLATION_DOMAIN=\"plasmaintegration5\")
                if (IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/po")
                    ki18n_install(po)
                endif()
                add_subdirectory(src)
                add_subdirectory(autotests)
                add_subdirectory(tests)
                
                find_package(FontNotoSans)
                set_package_properties(FontNotoSans PROPERTIES
                    PURPOSE "Default sans-serif font -- this is not detected automatically, pass -DCMAKE_DISABLE_FIND_PACKAGE_FontNotoSans=true to mark it ignored."
                    URL "https://www.google.com/get/noto/"
                    TYPE RUNTIME
                )
                find_package(FontHack)
                set_package_properties(FontHack PROPERTIES
                    PURPOSE "Default monospace font -- this is not detected automatically, pass -DCMAKE_DISABLE_FIND_PACKAGE_FontHack=true to mark it ignored."
                    URL "https://sourcefoundry.org/hack/"
                    TYPE RUNTIME
                )
                
                # add clang-format target for all our real source files
                file(GLOB_RECURSE ALL_CLANG_FORMAT_SOURCE_FILES *.cpp *.h)
                kde_clang_format(${ALL_CLANG_FORMAT_SOURCE_FILES})
                
                feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES)
                

                It's just I would like my system full of dynamic library. Anyway, at the moment, we will try first to compile this :)

                If I put your code at the very end of the CMakeLists file, I have this error:

                root [ /sources/KdeSoftwares-Main/Plasma-Integration/5.22.4/plasma-integration-5.22.4/
                build ]# cmake -DCMAKE_INSTALL_PREFIX=/opt/kf5 -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=off -Wno-dev ..
                Installing in /opt/kf5. Run /sources/KdeSoftwares-Main/Plasma-Integration/5.22.4/plasma-integration-5.22.4/build/prefix.sh to set the environment for PlasmaIntegration.
                -- Warning: Property URL already set to "https://xcb.freedesktop.org/", overriding it with "https://xcb.freedesktop.org"
                -- Warning: Property URL already set to "https://xcb.freedesktop.org", overriding it with "https://xcb.freedesktop.org/"
                CMake Warning at CMakeLists.txt:55 (find_package):
                  By not providing "FindFontNotoSans.cmake" in CMAKE_MODULE_PATH this project
                  has asked CMake to find a package configuration file provided by
                  "FontNotoSans", but CMake did not find one.
                
                  Could not find a package configuration file provided by "FontNotoSans" with
                  any of the following names:
                
                    FontNotoSansConfig.cmake
                    fontnotosans-config.cmake
                
                  Add the installation prefix of "FontNotoSans" to CMAKE_PREFIX_PATH or set
                  "FontNotoSans_DIR" to a directory containing one of the above files.  If
                  "FontNotoSans" provides a separate development package or SDK, be sure it
                  has been installed.
                
                
                CMake Warning at CMakeLists.txt:61 (find_package):
                  By not providing "FindFontHack.cmake" in CMAKE_MODULE_PATH this project has
                  asked CMake to find a package configuration file provided by "FontHack",
                  but CMake did not find one.
                
                  Could not find a package configuration file provided by "FontHack" with any
                  of the following names:
                
                    FontHackConfig.cmake
                    fonthack-config.cmake
                
                  Add the installation prefix of "FontHack" to CMAKE_PREFIX_PATH or set
                  "FontHack_DIR" to a directory containing one of the above files.  If
                  "FontHack" provides a separate development package or SDK, be sure it has
                  been installed.
                
                
                -- The following OPTIONAL packages have been found:
                
                 * KF5Service (required version >= 5.85.0)
                 * KF5Completion (required version >= 5.85.0)
                 * KF5ItemViews (required version >= 5.85.0)
                 * KF5JobWidgets (required version >= 5.85.0)
                 * KF5Solid (required version >= 5.85.0)
                 * KF5XmlGui (required version >= 5.85.0)
                 * KF5CoreAddons (required version >= 5.85.0)
                 * KF5Auth (required version >= 5.85.0)
                 * Qt5Core (required version >= 5.15.0)
                 * KF5Codecs (required version >= 5.85.0)
                 * Freetype
                 * Fontconfig
                 * PkgConfig
                 * Qt5Test (required version >= 5.15.0)
                
                -- The following REQUIRED packages have been found:
                
                 * ECM (required version >= 5.82)
                 * Qt5QmlModels (required version >= 5.15.2)
                 * Qt5Quick (required version >= 5.15.2)
                 * Qt5QuickControls2
                 * Gettext
                 * KF5I18n (required version >= 5.82)
                 * KF5IconThemes (required version >= 5.82)
                 * Qt5Network (required version >= 5.15.0)
                 * KF5KIO (required version >= 5.82)
                 * KF5Notifications (required version >= 5.82)
                 * KF5Wayland (required version >= 5.82)
                 * Qt5Gui (required version >= 5.15.0)
                 * KF5WindowSystem (required version >= 5.82)
                 * Qt5DBus (required version >= 5.15.0)
                 * KF5Config (required version >= 5.85.0)
                 * Qt5Widgets (required version >= 5.15.0)
                 * KF5WidgetsAddons (required version >= 5.85.0)
                 * KF5ConfigWidgets (required version >= 5.82)
                 * KF5 (required version >= 5.82)
                 * Breeze (required version >= 5)
                   For setting the default QStyle name
                 * X11, Required for updating the Cursor theme on X11, <https://www.x.org>
                 * Qt5X11Extras
                 * Qt5 (required version >= 5.15.0)
                 * XCB, X protocol C-language Binding, <https://xcb.freedesktop.org/>
                   Required to pass style properties to native Windows on X11 Platform
                 * Qt5Qml (required version >= 5.15.0)
                
                -- The following RUNTIME packages have not been found:
                
                 * FontNotoSans, <https://www.google.com/get/noto/>
                   Default sans-serif font -- this is not detected automatically, pass -DCMAKE_DISABLE_FIND_PACKAGE_FontNotoSans=true to mark it ignored.
                 * FontHack, <https://sourcefoundry.org/hack/>
                   Default monospace font -- this is not detected automatically, pass -DCMAKE_DISABLE_FIND_PACKAGE_FontHack=true to mark it ignored.
                
                CMake Error at CMakeLists.txt:74 (target_link_libraries):
                  Cannot specify link libraries for target "PlasmaIntegration" which is not
                  built by this project.
                
                
                -- Configuring incomplete, errors occurred!
                See also "/sources/KdeSoftwares-Main/Plasma-Integration/5.22.4/plasma-integration-5.22.4/build/CMakeFiles/CMakeOutput.log".
                

                This is the archive if you want to have a look: https://download.kde.org/stable/plasma/5.22.4/plasma-integration-5.22.4.tar.xz

                JoeCFDJ 1 Reply Last reply
                0
                • F Fulgurance

                  @JoeCFD I don't have any line like:

                  add_executable
                  

                  This is the CMakeLists file:

                  root [ /sources/KdeSoftwares-Main/Plasma-Integration/5.22.4/plasma-integration-5.22.4/
                  build ]# cat ../CMakeLists.txt 
                  cmake_minimum_required(VERSION 3.16)
                  
                  project(PlasmaIntegration)
                  set(PROJECT_VERSION "5.22.4")
                  set(PROJECT_VERSION_MAJOR 5)
                  
                  set(QT_MIN_VERSION "5.15.0")
                  set(KF5_MIN_VERSION "5.82")
                  
                  find_package(ECM ${KF5_MIN_VERSION}  REQUIRED NO_MODULE)
                  set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules ${ECM_MODULE_PATH} )
                  
                  include(KDEInstallDirs)
                  include(KDECMakeSettings)
                  include(KDECompilerSettings NO_POLICY_SCOPE)
                  include(FeatureSummary)
                  include(GenerateExportHeader)
                  include(KDEClangFormat)
                  
                  find_package(Qt5 ${QT_MIN_VERSION} CONFIG REQUIRED Widgets DBus X11Extras QuickControls2)
                  find_package(Qt5Gui ${QT_MIN_VERSION} CONFIG REQUIRED Private)
                  
                  find_package(KF5 ${KF5_MIN_VERSION} REQUIRED COMPONENTS
                                  Config ConfigWidgets I18n IconThemes KIO Notifications Wayland
                                  WidgetsAddons WindowSystem ConfigWidgets
                  )
                  
                  find_package(XCB COMPONENTS XCB)
                  set_package_properties(XCB PROPERTIES
                      DESCRIPTION "X protocol C-language Binding"
                      URL "https://xcb.freedesktop.org"
                      TYPE REQUIRED
                      PURPOSE "Required to pass style properties to native Windows on X11 Platform"
                  )
                  
                  find_package(Breeze 5 CONFIG)
                  set_package_properties(Breeze PROPERTIES
                                         TYPE REQUIRED
                                         PURPOSE "For setting the default QStyle name")
                  
                  # dependencies for QPA plugin
                  #find_package(Qt5ThemeSupport REQUIRED)
                  #set(QT5PLATFORMSUPPORT_LIBS Qt5ThemeSupport::Qt5ThemeSupport)
                  message(  "qt dir = $ENV{QT5DIR}" )
                  target_link_libraries( PlasmaIntegration $ENV{QT5DIR}/lib/libQt5ThemeSupport.a )
                  
                  add_definitions(-DTRANSLATION_DOMAIN=\"plasmaintegration5\")
                  if (IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/po")
                      ki18n_install(po)
                  endif()
                  add_subdirectory(src)
                  add_subdirectory(autotests)
                  add_subdirectory(tests)
                  
                  find_package(FontNotoSans)
                  set_package_properties(FontNotoSans PROPERTIES
                      PURPOSE "Default sans-serif font -- this is not detected automatically, pass -DCMAKE_DISABLE_FIND_PACKAGE_FontNotoSans=true to mark it ignored."
                      URL "https://www.google.com/get/noto/"
                      TYPE RUNTIME
                  )
                  find_package(FontHack)
                  set_package_properties(FontHack PROPERTIES
                      PURPOSE "Default monospace font -- this is not detected automatically, pass -DCMAKE_DISABLE_FIND_PACKAGE_FontHack=true to mark it ignored."
                      URL "https://sourcefoundry.org/hack/"
                      TYPE RUNTIME
                  )
                  
                  # add clang-format target for all our real source files
                  file(GLOB_RECURSE ALL_CLANG_FORMAT_SOURCE_FILES *.cpp *.h)
                  kde_clang_format(${ALL_CLANG_FORMAT_SOURCE_FILES})
                  
                  feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES)
                  

                  It's just I would like my system full of dynamic library. Anyway, at the moment, we will try first to compile this :)

                  If I put your code at the very end of the CMakeLists file, I have this error:

                  root [ /sources/KdeSoftwares-Main/Plasma-Integration/5.22.4/plasma-integration-5.22.4/
                  build ]# cmake -DCMAKE_INSTALL_PREFIX=/opt/kf5 -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=off -Wno-dev ..
                  Installing in /opt/kf5. Run /sources/KdeSoftwares-Main/Plasma-Integration/5.22.4/plasma-integration-5.22.4/build/prefix.sh to set the environment for PlasmaIntegration.
                  -- Warning: Property URL already set to "https://xcb.freedesktop.org/", overriding it with "https://xcb.freedesktop.org"
                  -- Warning: Property URL already set to "https://xcb.freedesktop.org", overriding it with "https://xcb.freedesktop.org/"
                  CMake Warning at CMakeLists.txt:55 (find_package):
                    By not providing "FindFontNotoSans.cmake" in CMAKE_MODULE_PATH this project
                    has asked CMake to find a package configuration file provided by
                    "FontNotoSans", but CMake did not find one.
                  
                    Could not find a package configuration file provided by "FontNotoSans" with
                    any of the following names:
                  
                      FontNotoSansConfig.cmake
                      fontnotosans-config.cmake
                  
                    Add the installation prefix of "FontNotoSans" to CMAKE_PREFIX_PATH or set
                    "FontNotoSans_DIR" to a directory containing one of the above files.  If
                    "FontNotoSans" provides a separate development package or SDK, be sure it
                    has been installed.
                  
                  
                  CMake Warning at CMakeLists.txt:61 (find_package):
                    By not providing "FindFontHack.cmake" in CMAKE_MODULE_PATH this project has
                    asked CMake to find a package configuration file provided by "FontHack",
                    but CMake did not find one.
                  
                    Could not find a package configuration file provided by "FontHack" with any
                    of the following names:
                  
                      FontHackConfig.cmake
                      fonthack-config.cmake
                  
                    Add the installation prefix of "FontHack" to CMAKE_PREFIX_PATH or set
                    "FontHack_DIR" to a directory containing one of the above files.  If
                    "FontHack" provides a separate development package or SDK, be sure it has
                    been installed.
                  
                  
                  -- The following OPTIONAL packages have been found:
                  
                   * KF5Service (required version >= 5.85.0)
                   * KF5Completion (required version >= 5.85.0)
                   * KF5ItemViews (required version >= 5.85.0)
                   * KF5JobWidgets (required version >= 5.85.0)
                   * KF5Solid (required version >= 5.85.0)
                   * KF5XmlGui (required version >= 5.85.0)
                   * KF5CoreAddons (required version >= 5.85.0)
                   * KF5Auth (required version >= 5.85.0)
                   * Qt5Core (required version >= 5.15.0)
                   * KF5Codecs (required version >= 5.85.0)
                   * Freetype
                   * Fontconfig
                   * PkgConfig
                   * Qt5Test (required version >= 5.15.0)
                  
                  -- The following REQUIRED packages have been found:
                  
                   * ECM (required version >= 5.82)
                   * Qt5QmlModels (required version >= 5.15.2)
                   * Qt5Quick (required version >= 5.15.2)
                   * Qt5QuickControls2
                   * Gettext
                   * KF5I18n (required version >= 5.82)
                   * KF5IconThemes (required version >= 5.82)
                   * Qt5Network (required version >= 5.15.0)
                   * KF5KIO (required version >= 5.82)
                   * KF5Notifications (required version >= 5.82)
                   * KF5Wayland (required version >= 5.82)
                   * Qt5Gui (required version >= 5.15.0)
                   * KF5WindowSystem (required version >= 5.82)
                   * Qt5DBus (required version >= 5.15.0)
                   * KF5Config (required version >= 5.85.0)
                   * Qt5Widgets (required version >= 5.15.0)
                   * KF5WidgetsAddons (required version >= 5.85.0)
                   * KF5ConfigWidgets (required version >= 5.82)
                   * KF5 (required version >= 5.82)
                   * Breeze (required version >= 5)
                     For setting the default QStyle name
                   * X11, Required for updating the Cursor theme on X11, <https://www.x.org>
                   * Qt5X11Extras
                   * Qt5 (required version >= 5.15.0)
                   * XCB, X protocol C-language Binding, <https://xcb.freedesktop.org/>
                     Required to pass style properties to native Windows on X11 Platform
                   * Qt5Qml (required version >= 5.15.0)
                  
                  -- The following RUNTIME packages have not been found:
                  
                   * FontNotoSans, <https://www.google.com/get/noto/>
                     Default sans-serif font -- this is not detected automatically, pass -DCMAKE_DISABLE_FIND_PACKAGE_FontNotoSans=true to mark it ignored.
                   * FontHack, <https://sourcefoundry.org/hack/>
                     Default monospace font -- this is not detected automatically, pass -DCMAKE_DISABLE_FIND_PACKAGE_FontHack=true to mark it ignored.
                  
                  CMake Error at CMakeLists.txt:74 (target_link_libraries):
                    Cannot specify link libraries for target "PlasmaIntegration" which is not
                    built by this project.
                  
                  
                  -- Configuring incomplete, errors occurred!
                  See also "/sources/KdeSoftwares-Main/Plasma-Integration/5.22.4/plasma-integration-5.22.4/build/CMakeFiles/CMakeOutput.log".
                  

                  This is the archive if you want to have a look: https://download.kde.org/stable/plasma/5.22.4/plasma-integration-5.22.4.tar.xz

                  JoeCFDJ Offline
                  JoeCFDJ Offline
                  JoeCFD
                  wrote on last edited by JoeCFD
                  #18

                  @Fulgurance said in qt 5.15.2 everywhere - Could not find Qt5ThemeSupport:

                  "FontNotoSans", but CMake did not find one.

                  "FontNotoSans", but CMake did not find one.
                  sudo apt-get install fonts-noto

                  https://packages.ubuntu.com/search?keywords=fonts-noto

                  if there is still error when the file is put to the end of the cmake file, that could mean you have a few cmake files. Try
                  grep -RHi add_executable
                  to find which cmake file has add_executable. Then add
                  target_link_libraries( PlasmaIntegration $ENV{QT5DIR}/lib/libQt5ThemeSupport.a )
                  just below that line in that file.

                  F 1 Reply Last reply
                  0
                  • JoeCFDJ JoeCFD

                    @Fulgurance said in qt 5.15.2 everywhere - Could not find Qt5ThemeSupport:

                    "FontNotoSans", but CMake did not find one.

                    "FontNotoSans", but CMake did not find one.
                    sudo apt-get install fonts-noto

                    https://packages.ubuntu.com/search?keywords=fonts-noto

                    if there is still error when the file is put to the end of the cmake file, that could mean you have a few cmake files. Try
                    grep -RHi add_executable
                    to find which cmake file has add_executable. Then add
                    target_link_libraries( PlasmaIntegration $ENV{QT5DIR}/lib/libQt5ThemeSupport.a )
                    just below that line in that file.

                    F Offline
                    F Offline
                    Fulgurance
                    wrote on last edited by Fulgurance
                    #19
                    This post is deleted!
                    1 Reply Last reply
                    0
                    • F Offline
                      F Offline
                      Fulgurance
                      wrote on last edited by Fulgurance
                      #20

                      I finally found how to do, just pass explicitely some libraries dir to cmake:

                      -DCMAKE_INSTALL_PREFIX=/opt/kf5
                                                  -DQt5ThemeSupport_LIBRARY=/opt/qt5/lib/libQt5ThemeSupport.a
                                                  -DQt5ThemeSupport_INCLUDE_DIR=/opt/qt5/include/QtThemeSupport/5.15.2
                                                  -DQt5DBus_DIR=/opt/qt5/lib/cmake/Qt5DBus
                                                  -DCMAKE_BUILD_TYPE=Release
                                                  -DBUILD_TESTING=OFF
                                                  -Wno-dev
                      

                      It was a bit tricky to be honest. Thanks for your help

                      1 Reply Last reply
                      0

                      • Login

                      • Login or register to search.
                      • First post
                        Last post
                      0
                      • Categories
                      • Recent
                      • Tags
                      • Popular
                      • Users
                      • Groups
                      • Search
                      • Get Qt Extensions
                      • Unsolved