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
Qt 6.11 is out! See what's new in the release blog

qt 5.15.2 everywhere - Could not find Qt5ThemeSupport

Scheduled Pinned Locked Moved Unsolved Installation and Deployment
20 Posts 2 Posters 4.8k 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.
  • F Offline
    F Offline
    Fulgurance
    wrote on last edited by Fulgurance
    #1

    Hi, I am Fulgurance and I am actually coding a package manager able to build all from sources. During some tests, I was building the plasma kde desktop environment, I almost finished to compile all packages. I just need to build now plasma-integration and plasma-desktop.

    But when I started to compile plasma-integration, I had this error:

    Could NOT find Qt5ThemeSupport
    

    I built yet Qt, I think about a missing flag, but I feel it's very strange because normally qt by default is configured with the -gui support.
    What flag maybe I missed ?

    ( I am following the LFS linux book 11.0)

    This is my project: https://github.com/Fulgurance/ISM

    This is the default flags I used:

    --prefix (with the prefix I setted)
    --sysconfdir
    --confirm-license
    --dbus-linked
    --openssl-linked
    -system-harfbuzz
    -xcb
    --nomake=examples
    --no-rpath
    --syslog
    --skip=qtwebengine
    
    JoeCFDJ 1 Reply Last reply
    0
    • F Fulgurance

      Hi, I am Fulgurance and I am actually coding a package manager able to build all from sources. During some tests, I was building the plasma kde desktop environment, I almost finished to compile all packages. I just need to build now plasma-integration and plasma-desktop.

      But when I started to compile plasma-integration, I had this error:

      Could NOT find Qt5ThemeSupport
      

      I built yet Qt, I think about a missing flag, but I feel it's very strange because normally qt by default is configured with the -gui support.
      What flag maybe I missed ?

      ( I am following the LFS linux book 11.0)

      This is my project: https://github.com/Fulgurance/ISM

      This is the default flags I used:

      --prefix (with the prefix I setted)
      --sysconfdir
      --confirm-license
      --dbus-linked
      --openssl-linked
      -system-harfbuzz
      -xcb
      --nomake=examples
      --no-rpath
      --syslog
      --skip=qtwebengine
      
      JoeCFDJ Offline
      JoeCFDJ Offline
      JoeCFD
      wrote on last edited by JoeCFD
      #2

      @Fulgurance on Linux use command to find it:
      locate Qt5ThemeSupport

      On Ubuntu 22.04 cmake file is located at
      /usr/lib/x86_64-linux-gnu/cmake/Qt5ThemeSupport/
      after you install it.

      F 1 Reply Last reply
      0
      • JoeCFDJ JoeCFD

        @Fulgurance on Linux use command to find it:
        locate Qt5ThemeSupport

        On Ubuntu 22.04 cmake file is located at
        /usr/lib/x86_64-linux-gnu/cmake/Qt5ThemeSupport/
        after you install it.

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

        @JoeCFD This is what I have:

        root [ / ]# locate Qt5ThemeSupport
        /opt/qt5/lib/cmake/Qt5ThemeSupport
        /opt/qt5/lib/cmake/Qt5ThemeSupport/Qt5ThemeSupportConfig.cmake
        /opt/qt5/lib/cmake/Qt5ThemeSupport/Qt5ThemeSupportConfigVersion.cmake
        /opt/qt5/lib/libQt5ThemeSupport.a
        /opt/qt5/lib/libQt5ThemeSupport.la
        /opt/qt5/lib/libQt5ThemeSupport.prl
        /sources/KdeSoftwares-Main/Plasma-Integration/5.22.4/v5.22.4/cmake/modules/FindQt5ThemeSupport.cmake
        

        It's strange because it's installed...

        This is the error I have:

        >_ Checking Plasma-Integration
        >_ Extracting Plasma-Integration
        >_ Patching Plasma-Integration
        >_ Preparing Plasma-Integration
        >_ Configuring Plasma-Integration
        -- The C compiler identification is GNU 11.2.0
        -- The CXX compiler identification is GNU 11.2.0
        -- Detecting C compiler ABI info
        -- Detecting C compiler ABI info - done
        -- Check for working C compiler: /usr/bin/cc - skipped
        -- Detecting C compile features
        -- Detecting C compile features - done
        -- Detecting CXX compiler ABI info
        -- Detecting CXX compiler ABI info - done
        -- Check for working CXX compiler: /usr/bin/c++ - skipped
        -- Detecting CXX compile features
        -- Detecting CXX compile features - done
        Installing in /opt/kf5. Run /sources/KdeSoftwares-Main/Plasma-Integration/5.22.4/v5.22.4/build/prefix.sh to set the environment for PlasmaIntegration.
        fatal: not a git repository (or any of the parent directories): .git
        -- Looking for __GLIBC__
        -- Looking for __GLIBC__ - found
        -- Performing Test _OFFT_IS_64BIT
        -- Performing Test _OFFT_IS_64BIT - Success
        -- Performing Test HAVE_DATE_TIME
        -- Performing Test HAVE_DATE_TIME - Success
        -- Found KF5Config: /opt/kf5/lib/cmake/KF5Config/KF5ConfigConfig.cmake (found version "5.85.0") 
        -- Found KF5ConfigWidgets: /opt/kf5/lib/cmake/KF5ConfigWidgets/KF5ConfigWidgetsConfig.cmake (found version "5.85.0") 
        -- Found Gettext: /usr/bin/msgmerge (found version "0.21") 
        -- Found KF5I18n: /opt/kf5/lib/cmake/KF5I18n/KF5I18nConfig.cmake (found version "5.85.0") 
        -- Found KF5IconThemes: /opt/kf5/lib/cmake/KF5IconThemes/KF5IconThemesConfig.cmake (found version "5.85.0") 
        -- Found KF5KIO: /opt/kf5/lib/cmake/KF5KIO/KF5KIOConfig.cmake (found version "5.85.0") 
        -- Found KF5Notifications: /opt/kf5/lib/cmake/KF5Notifications/KF5NotificationsConfig.cmake (found version "5.85.0") 
        -- Found KF5Wayland: /opt/kf5/lib/cmake/KF5Wayland/KF5WaylandConfig.cmake (found version "5.85.0") 
        -- Found KF5WidgetsAddons: /opt/kf5/lib/cmake/KF5WidgetsAddons/KF5WidgetsAddonsConfig.cmake (found version "5.85.0") 
        -- Found KF5WindowSystem: /opt/kf5/lib/cmake/KF5WindowSystem/KF5WindowSystemConfig.cmake (found version "5.85.0") 
        -- Found KF5: success (found suitable version "5.85.0", minimum required is "5.82") found components: Config ConfigWidgets I18n IconThemes KIO Notifications Wayland WidgetsAddons WindowSystem ConfigWidgets 
        -- Found XCB_XCB: /usr/lib/libxcb.so (found version "1.14") 
        -- Found XCB: /usr/lib/libxcb.so (found version "1.14") found components: XCB 
        -- Warning: Property URL already set to "https://xcb.freedesktop.org/", overriding it with "https://xcb.freedesktop.org"
        -- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.2") 
        CMake Error at /usr/share/cmake-3.21/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
          Could NOT find Qt5ThemeSupport (missing: Qt5ThemeSupport_LIBRARY
          Qt5ThemeSupport_INCLUDE_DIR) (found version "5.15.2")
        Call Stack (most recent call first):
          /usr/share/cmake-3.21/Modules/FindPackageHandleStandardArgs.cmake:594 (_FPHSA_FAILURE_MESSAGE)
          cmake/modules/FindQt5ThemeSupport.cmake:90 (find_package_handle_standard_args)
          CMakeLists.txt:42 (find_package)
        
        
        -- Configuring incomplete, errors occurred!
        See also "/sources/KdeSoftwares-Main/Plasma-Integration/5.22.4/v5.22.4/build/CMakeFiles/CMakeOutput.log".
        [!] Failed to run cmake -DCMAKE_INSTALL_PREFIX=/opt/kf5 -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=OFF -Wno-dev .. in /sources/KdeSoftwares-Main/Plasma-Integration/5.22.4/v5.22.4//build with given environment
        

        I have a main file ld.so.conf like that, with the qt5.conf like that:

        root [ / ]# cat /etc/ld.so.conf
        include /etc/ld.so.conf.d/*.conf
        root [ / ]# cat /etc/ld.so.conf.d/qt5.conf 
        /opt/qt5/lib
        

        Is it possible I have this bug because I set a temporary prefix into an another directory (I set --prefix=/tmp/ism/builtsoftwares/opt/qt5) ?
        I did that because I didn't found any support under qt for the DESTDIR variable

        JoeCFDJ 1 Reply Last reply
        0
        • F Fulgurance

          @JoeCFD This is what I have:

          root [ / ]# locate Qt5ThemeSupport
          /opt/qt5/lib/cmake/Qt5ThemeSupport
          /opt/qt5/lib/cmake/Qt5ThemeSupport/Qt5ThemeSupportConfig.cmake
          /opt/qt5/lib/cmake/Qt5ThemeSupport/Qt5ThemeSupportConfigVersion.cmake
          /opt/qt5/lib/libQt5ThemeSupport.a
          /opt/qt5/lib/libQt5ThemeSupport.la
          /opt/qt5/lib/libQt5ThemeSupport.prl
          /sources/KdeSoftwares-Main/Plasma-Integration/5.22.4/v5.22.4/cmake/modules/FindQt5ThemeSupport.cmake
          

          It's strange because it's installed...

          This is the error I have:

          >_ Checking Plasma-Integration
          >_ Extracting Plasma-Integration
          >_ Patching Plasma-Integration
          >_ Preparing Plasma-Integration
          >_ Configuring Plasma-Integration
          -- The C compiler identification is GNU 11.2.0
          -- The CXX compiler identification is GNU 11.2.0
          -- Detecting C compiler ABI info
          -- Detecting C compiler ABI info - done
          -- Check for working C compiler: /usr/bin/cc - skipped
          -- Detecting C compile features
          -- Detecting C compile features - done
          -- Detecting CXX compiler ABI info
          -- Detecting CXX compiler ABI info - done
          -- Check for working CXX compiler: /usr/bin/c++ - skipped
          -- Detecting CXX compile features
          -- Detecting CXX compile features - done
          Installing in /opt/kf5. Run /sources/KdeSoftwares-Main/Plasma-Integration/5.22.4/v5.22.4/build/prefix.sh to set the environment for PlasmaIntegration.
          fatal: not a git repository (or any of the parent directories): .git
          -- Looking for __GLIBC__
          -- Looking for __GLIBC__ - found
          -- Performing Test _OFFT_IS_64BIT
          -- Performing Test _OFFT_IS_64BIT - Success
          -- Performing Test HAVE_DATE_TIME
          -- Performing Test HAVE_DATE_TIME - Success
          -- Found KF5Config: /opt/kf5/lib/cmake/KF5Config/KF5ConfigConfig.cmake (found version "5.85.0") 
          -- Found KF5ConfigWidgets: /opt/kf5/lib/cmake/KF5ConfigWidgets/KF5ConfigWidgetsConfig.cmake (found version "5.85.0") 
          -- Found Gettext: /usr/bin/msgmerge (found version "0.21") 
          -- Found KF5I18n: /opt/kf5/lib/cmake/KF5I18n/KF5I18nConfig.cmake (found version "5.85.0") 
          -- Found KF5IconThemes: /opt/kf5/lib/cmake/KF5IconThemes/KF5IconThemesConfig.cmake (found version "5.85.0") 
          -- Found KF5KIO: /opt/kf5/lib/cmake/KF5KIO/KF5KIOConfig.cmake (found version "5.85.0") 
          -- Found KF5Notifications: /opt/kf5/lib/cmake/KF5Notifications/KF5NotificationsConfig.cmake (found version "5.85.0") 
          -- Found KF5Wayland: /opt/kf5/lib/cmake/KF5Wayland/KF5WaylandConfig.cmake (found version "5.85.0") 
          -- Found KF5WidgetsAddons: /opt/kf5/lib/cmake/KF5WidgetsAddons/KF5WidgetsAddonsConfig.cmake (found version "5.85.0") 
          -- Found KF5WindowSystem: /opt/kf5/lib/cmake/KF5WindowSystem/KF5WindowSystemConfig.cmake (found version "5.85.0") 
          -- Found KF5: success (found suitable version "5.85.0", minimum required is "5.82") found components: Config ConfigWidgets I18n IconThemes KIO Notifications Wayland WidgetsAddons WindowSystem ConfigWidgets 
          -- Found XCB_XCB: /usr/lib/libxcb.so (found version "1.14") 
          -- Found XCB: /usr/lib/libxcb.so (found version "1.14") found components: XCB 
          -- Warning: Property URL already set to "https://xcb.freedesktop.org/", overriding it with "https://xcb.freedesktop.org"
          -- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.2") 
          CMake Error at /usr/share/cmake-3.21/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
            Could NOT find Qt5ThemeSupport (missing: Qt5ThemeSupport_LIBRARY
            Qt5ThemeSupport_INCLUDE_DIR) (found version "5.15.2")
          Call Stack (most recent call first):
            /usr/share/cmake-3.21/Modules/FindPackageHandleStandardArgs.cmake:594 (_FPHSA_FAILURE_MESSAGE)
            cmake/modules/FindQt5ThemeSupport.cmake:90 (find_package_handle_standard_args)
            CMakeLists.txt:42 (find_package)
          
          
          -- Configuring incomplete, errors occurred!
          See also "/sources/KdeSoftwares-Main/Plasma-Integration/5.22.4/v5.22.4/build/CMakeFiles/CMakeOutput.log".
          [!] Failed to run cmake -DCMAKE_INSTALL_PREFIX=/opt/kf5 -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=OFF -Wno-dev .. in /sources/KdeSoftwares-Main/Plasma-Integration/5.22.4/v5.22.4//build with given environment
          

          I have a main file ld.so.conf like that, with the qt5.conf like that:

          root [ / ]# cat /etc/ld.so.conf
          include /etc/ld.so.conf.d/*.conf
          root [ / ]# cat /etc/ld.so.conf.d/qt5.conf 
          /opt/qt5/lib
          

          Is it possible I have this bug because I set a temporary prefix into an another directory (I set --prefix=/tmp/ism/builtsoftwares/opt/qt5) ?
          I did that because I didn't found any support under qt for the DESTDIR variable

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

          @Fulgurance Qt5 is under /opt, but likely not set in the path.
          https://doc.qt.io/qt-5/cmake-get-started.html
          one of the followings should work.

          1. Set your CMAKE_PREFIX_PATH environment variable to the Qt 5 installation prefix. This is the recommended way.
            export CMAKE_PREFIX_PATH=/opt/qt5/
          2. Set the Qt5_DIR in the CMake cache to the location of the Qt5Config.cmake file.
            export Qt5_DIR=/opt/qt5/lib/cmake/Qt5
          F 1 Reply Last reply
          0
          • JoeCFDJ JoeCFD

            @Fulgurance Qt5 is under /opt, but likely not set in the path.
            https://doc.qt.io/qt-5/cmake-get-started.html
            one of the followings should work.

            1. Set your CMAKE_PREFIX_PATH environment variable to the Qt 5 installation prefix. This is the recommended way.
              export CMAKE_PREFIX_PATH=/opt/qt5/
            2. Set the Qt5_DIR in the CMake cache to the location of the Qt5Config.cmake file.
              export Qt5_DIR=/opt/qt5/lib/cmake/Qt5
            F Offline
            F Offline
            Fulgurance
            wrote on last edited by
            #5

            @JoeCFD Is it possible as well I have this bug because I set a temporary prefix into an another directory (I set --prefix=/tmp/ism/builtsoftwares/opt/qt5) ?
            I did that because I didn't found any support under qt for the DESTDIR variable

            JoeCFDJ 1 Reply Last reply
            0
            • F Fulgurance

              @JoeCFD Is it possible as well I have this bug because I set a temporary prefix into an another directory (I set --prefix=/tmp/ism/builtsoftwares/opt/qt5) ?
              I did that because I didn't found any support under qt for the DESTDIR variable

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

              @Fulgurance prefix is normally installation destination. Your build is looking for Qt5 and its env variables are not set. That is my understanding.

              F 1 Reply Last reply
              0
              • JoeCFDJ JoeCFD

                @Fulgurance prefix is normally installation destination. Your build is looking for Qt5 and its env variables are not set. That is my understanding.

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

                @JoeCFD I tried both of your solutions, no one solved my problems, got same error again.

                I forgot to provide you one more information, my environment.

                This is my /etc/profile and /etc/profile.d/qt5.sh files:

                root [ / ]# cat /etc/profile
                pathremove () {
                local IFS=':'
                local NEWPATH
                local DIR
                local PATHVARIABLE=${2:-PATH}
                for DIR in ${!PATHVARIABLE} ; do
                        if [ "$DIR" != "$1" ] ; then
                        NEWPATH=${NEWPATH:+$NEWPATH:}$DIR
                        fi
                done
                export $PATHVARIABLE="$NEWPATH"
                }
                
                pathprepend () {
                        pathremove $1 $2
                        local PATHVARIABLE=${2:-PATH}
                        export $PATHVARIABLE="$1${!PATHVARIABLE:+:${!PATHVARIABLE}}"
                }
                
                pathappend () {
                        pathremove $1 $2
                        local PATHVARIABLE=${2:-PATH}
                        export $PATHVARIABLE="${!PATHVARIABLE:+${!PATHVARIABLE}:}$1"
                }
                
                export -f pathremove pathprepend pathappend
                
                export PATH=/usr/bin
                
                if [ ! -L /bin ]; then
                        pathappend /bin
                fi
                
                if [ $EUID -eq 0 ] ; then
                        pathappend /usr/sbin
                        if [ ! -L /sbin ]; then
                                pathappend /sbin
                        fi
                        unset HISTFILE
                fi
                
                export HISTSIZE=1000
                export HISTIGNORE="&:[bf]g:exit"
                
                #export XDG_DATA_DIRS=${XDG_DATA_DIRS:-/usr/share/}
                #export XDG_CONFIG_DIRS=${XDG_CONFIG_DIRS:-/etc/xdg/}
                #export XDG_RUNTIME_DIR=${XDG_RUNTIME_DIR:-/tmp/xdg-$USER}
                
                NORMAL="\[\e[0m\]"
                RED="\[\e[1;31m\]"
                GREEN="\[\e[1;32m\]"
                if [[ $EUID == 0 ]] ; then
                PS1="$RED\u [ $NORMAL\w$RED ]# $NORMAL"
                else
                PS1="$GREEN\u [ $NORMAL\w$GREEN ]\$ $NORMAL"
                fi
                
                for script in /etc/profile.d/*.sh ; do
                        if [ -r $script ] ; then
                                . $script
                        fi
                done
                
                unset script RED GREEN NORMALroot [ / ]# cat /etc/profile
                profile    profile.d/ 
                root [ / ]# cat /etc/profile.d/qt5.sh 
                QT5DIR=/opt/qt5
                pathappend $QT5DIR/bin           PATH
                pathappend $QT5DIR/lib/pkgconfig PKG_CONFIG_PATH
                export QT5DIR
                
                JoeCFDJ 1 Reply Last reply
                0
                • F Fulgurance

                  @JoeCFD I tried both of your solutions, no one solved my problems, got same error again.

                  I forgot to provide you one more information, my environment.

                  This is my /etc/profile and /etc/profile.d/qt5.sh files:

                  root [ / ]# cat /etc/profile
                  pathremove () {
                  local IFS=':'
                  local NEWPATH
                  local DIR
                  local PATHVARIABLE=${2:-PATH}
                  for DIR in ${!PATHVARIABLE} ; do
                          if [ "$DIR" != "$1" ] ; then
                          NEWPATH=${NEWPATH:+$NEWPATH:}$DIR
                          fi
                  done
                  export $PATHVARIABLE="$NEWPATH"
                  }
                  
                  pathprepend () {
                          pathremove $1 $2
                          local PATHVARIABLE=${2:-PATH}
                          export $PATHVARIABLE="$1${!PATHVARIABLE:+:${!PATHVARIABLE}}"
                  }
                  
                  pathappend () {
                          pathremove $1 $2
                          local PATHVARIABLE=${2:-PATH}
                          export $PATHVARIABLE="${!PATHVARIABLE:+${!PATHVARIABLE}:}$1"
                  }
                  
                  export -f pathremove pathprepend pathappend
                  
                  export PATH=/usr/bin
                  
                  if [ ! -L /bin ]; then
                          pathappend /bin
                  fi
                  
                  if [ $EUID -eq 0 ] ; then
                          pathappend /usr/sbin
                          if [ ! -L /sbin ]; then
                                  pathappend /sbin
                          fi
                          unset HISTFILE
                  fi
                  
                  export HISTSIZE=1000
                  export HISTIGNORE="&:[bf]g:exit"
                  
                  #export XDG_DATA_DIRS=${XDG_DATA_DIRS:-/usr/share/}
                  #export XDG_CONFIG_DIRS=${XDG_CONFIG_DIRS:-/etc/xdg/}
                  #export XDG_RUNTIME_DIR=${XDG_RUNTIME_DIR:-/tmp/xdg-$USER}
                  
                  NORMAL="\[\e[0m\]"
                  RED="\[\e[1;31m\]"
                  GREEN="\[\e[1;32m\]"
                  if [[ $EUID == 0 ]] ; then
                  PS1="$RED\u [ $NORMAL\w$RED ]# $NORMAL"
                  else
                  PS1="$GREEN\u [ $NORMAL\w$GREEN ]\$ $NORMAL"
                  fi
                  
                  for script in /etc/profile.d/*.sh ; do
                          if [ -r $script ] ; then
                                  . $script
                          fi
                  done
                  
                  unset script RED GREEN NORMALroot [ / ]# cat /etc/profile
                  profile    profile.d/ 
                  root [ / ]# cat /etc/profile.d/qt5.sh 
                  QT5DIR=/opt/qt5
                  pathappend $QT5DIR/bin           PATH
                  pathappend $QT5DIR/lib/pkgconfig PKG_CONFIG_PATH
                  export QT5DIR
                  
                  JoeCFDJ Offline
                  JoeCFDJ Offline
                  JoeCFD
                  wrote on last edited by JoeCFD
                  #8

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

                  QT5DIR

                  libQt5ThemeSupport has only a static one, no dynamic so. Does it matter in your build?
                  And Qt5ThemeSupport_LIBRARY can not be found with PKG_CONFIG_PATH because
                  $QT5DIR/lib/pkgconfig does not have Qt5ThemeSupport.pc

                  F 1 Reply Last reply
                  0
                  • JoeCFDJ JoeCFD

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

                    QT5DIR

                    libQt5ThemeSupport has only a static one, no dynamic so. Does it matter in your build?
                    And Qt5ThemeSupport_LIBRARY can not be found with PKG_CONFIG_PATH because
                    $QT5DIR/lib/pkgconfig does not have Qt5ThemeSupport.pc

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

                    @JoeCFD Is it a problem if I would like libQt5ThemeSupport as dynamic library ?

                    Anyway, how can I fix this problem ? I am a bit lost now.

                    Is it possible for example to build Qt and make it generate Qt5ThemeSupport.pc ?

                    JoeCFDJ 1 Reply Last reply
                    0
                    • F Fulgurance

                      @JoeCFD Is it a problem if I would like libQt5ThemeSupport as dynamic library ?

                      Anyway, how can I fix this problem ? I am a bit lost now.

                      Is it possible for example to build Qt and make it generate Qt5ThemeSupport.pc ?

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

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

                      F 1 Reply Last reply
                      0
                      • 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