Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. CMake QT_INSTALL_BIN_DIR not set to the value of CMAKE_INSTALL_BINDIR as expected
Forum Updated to NodeBB v4.3 + New Features

CMake QT_INSTALL_BIN_DIR not set to the value of CMAKE_INSTALL_BINDIR as expected

Scheduled Pinned Locked Moved Unsolved General and Desktop
3 Posts 2 Posters 411 Views 1 Watching
  • 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.
  • PerdrixP Offline
    PerdrixP Offline
    Perdrix
    wrote on last edited by Perdrix
    #1

    My CMakeLists.txt starts like this:

    set(PROJECT_NAME DeepSkyStacker)
    
    set(COMPILE_WARNING_AS_ERROR YES)
    set(CMAKE_INSTALL_BINDIR ".")
    
    find_package(Qt6 6.8 REQUIRED COMPONENTS Core Gui Widgets Network Charts LinguistTools)
    qt_standard_project_setup()
    

    Later on I have:

    message ("Qt Deploy Bin Dir: " ${QT_DEPLOY_BIN_DIR})
    message ("Target filename:"  $<TARGET_FILE_NAME:DeepSkyStacker>)
    set(executable_path "\${QT_DEPLOY_BIN_DIR}/$<TARGET_FILE_NAME:DeepSkyStacker>")
    message ("executable_path: " ${executable_path})
     qt_generate_deploy_script(
         TARGET DeepSkyStacker
         OUTPUT_SCRIPT deploy_script
         CONTENT "
     qt_deploy_runtime_dependencies(
         EXECUTABLE \"${executable_path}\"
         GENERATE_QT_CONF
         VERBOSE
     )")
    

    The generate step produces output:

    1> [CMake] System Name is: Windows prefix path: C:/Qt/6.8.0/msvc2022_64
    1> [CMake] x64 architecture in use
    1> [CMake] Install prefix set to: C:/Users/amonra/Documents/GitHub/DSS/x64/Debug
    1> [CMake] -- Could NOT find WrapVulkanHeaders (missing: Vulkan_INCLUDE_DIR) 
    1> [CMake] -- Could NOT find WrapVulkanHeaders (missing: Vulkan_INCLUDE_DIR) 
    1> [CMake] -- Could NOT find WrapVulkanHeaders (missing: Vulkan_INCLUDE_DIR) 
    1> [CMake] Qt Deploy Bin Dir: 
    1> [CMake] Target filename:$<TARGET_FILE_NAME:DeepSkyStacker>
    1> [CMake] executable_path: ${QT_DEPLOY_BIN_DIR}/$<TARGET_FILE_NAME:DeepSkyStacker>
    

    Note that QT_INSTALL_BIN_DIR is empty, NOT the character .

    The result is that the install fails:

      -- Installing: C:/Users/amonra/Documents/GitHub/DSS/x64/Debug/./DeepSkyStacker.exe
      -- Writing C:/Users/amonra/Documents/GitHub/DSS/x64/Debug/./qt.conf
      -- Running Qt deploy tool for /DeepSkyStacker.exe in working directory 'C:/Users/amonra/Documents/GitHub/DSS/x64/Debug'
      'C:/Qt/6.8.0/msvc2022_64/bin/windeployqt.exe' '/DeepSkyStacker.exe' '--verbose' '2' '--dir' '.' '--libdir' '--plugindir' 'plugins' '--qml-deploy-dir' 'qml' '--translationdir' 'translations' '--force' '--qtpaths' 'C:/Qt/6.8.0/msvc2022_64/bin/qtpaths6.exe'
      Running: C:/Qt/6.8.0/msvc2022_64/bin/qtpaths6.exe -query
      Trying to read translation catalogs from "C:/Qt/6.8.0/msvc2022_64/translations/catalogs.json".
      Found catalog "qtbase".
       :
       :
      readPeExecutable: C:\Qt\6.8.0\msvc2022_64\plugins\tls\qschannelbackend.dll 64 bit, release
      readPeExecutable: C:\Qt\6.8.0\msvc2022_64\plugins\tls\qschannelbackendd.dll 64 bit, debug
      "\DeepSkyStacker.exe" does not exist.
      
      readPeExecutable: C:\Qt\6.8.0\msvc2022_64\plugins\webview\qtwebview_webengine.dll 64 bit, release
      readPeExecutable: C:\Qt\6.8.0\msvc2022_64\plugins\webview\qtwebview_webengined.dll 64 bit, debug
      CMake Error at C:/Qt/6.8.0/msvc2022_64/lib/cmake/Qt6Core/Qt6CoreDeploySupport.cmake:535 (message):
        Executing C:/Qt/6.8.0/msvc2022_64/bin/windeployqt.exe failed: 1
    

    which isn't surprising because it was looking for /DeepSkyStacker.exe, when it should have been looking for ./DeepSkyStacker.exe

    So why was QT_INSTALL_BIN_DIR not set to the value of CMAKE_INSTALL_BINDIR?

    jsulmJ 1 Reply Last reply
    0
    • PerdrixP Perdrix

      My CMakeLists.txt starts like this:

      set(PROJECT_NAME DeepSkyStacker)
      
      set(COMPILE_WARNING_AS_ERROR YES)
      set(CMAKE_INSTALL_BINDIR ".")
      
      find_package(Qt6 6.8 REQUIRED COMPONENTS Core Gui Widgets Network Charts LinguistTools)
      qt_standard_project_setup()
      

      Later on I have:

      message ("Qt Deploy Bin Dir: " ${QT_DEPLOY_BIN_DIR})
      message ("Target filename:"  $<TARGET_FILE_NAME:DeepSkyStacker>)
      set(executable_path "\${QT_DEPLOY_BIN_DIR}/$<TARGET_FILE_NAME:DeepSkyStacker>")
      message ("executable_path: " ${executable_path})
       qt_generate_deploy_script(
           TARGET DeepSkyStacker
           OUTPUT_SCRIPT deploy_script
           CONTENT "
       qt_deploy_runtime_dependencies(
           EXECUTABLE \"${executable_path}\"
           GENERATE_QT_CONF
           VERBOSE
       )")
      

      The generate step produces output:

      1> [CMake] System Name is: Windows prefix path: C:/Qt/6.8.0/msvc2022_64
      1> [CMake] x64 architecture in use
      1> [CMake] Install prefix set to: C:/Users/amonra/Documents/GitHub/DSS/x64/Debug
      1> [CMake] -- Could NOT find WrapVulkanHeaders (missing: Vulkan_INCLUDE_DIR) 
      1> [CMake] -- Could NOT find WrapVulkanHeaders (missing: Vulkan_INCLUDE_DIR) 
      1> [CMake] -- Could NOT find WrapVulkanHeaders (missing: Vulkan_INCLUDE_DIR) 
      1> [CMake] Qt Deploy Bin Dir: 
      1> [CMake] Target filename:$<TARGET_FILE_NAME:DeepSkyStacker>
      1> [CMake] executable_path: ${QT_DEPLOY_BIN_DIR}/$<TARGET_FILE_NAME:DeepSkyStacker>
      

      Note that QT_INSTALL_BIN_DIR is empty, NOT the character .

      The result is that the install fails:

        -- Installing: C:/Users/amonra/Documents/GitHub/DSS/x64/Debug/./DeepSkyStacker.exe
        -- Writing C:/Users/amonra/Documents/GitHub/DSS/x64/Debug/./qt.conf
        -- Running Qt deploy tool for /DeepSkyStacker.exe in working directory 'C:/Users/amonra/Documents/GitHub/DSS/x64/Debug'
        'C:/Qt/6.8.0/msvc2022_64/bin/windeployqt.exe' '/DeepSkyStacker.exe' '--verbose' '2' '--dir' '.' '--libdir' '--plugindir' 'plugins' '--qml-deploy-dir' 'qml' '--translationdir' 'translations' '--force' '--qtpaths' 'C:/Qt/6.8.0/msvc2022_64/bin/qtpaths6.exe'
        Running: C:/Qt/6.8.0/msvc2022_64/bin/qtpaths6.exe -query
        Trying to read translation catalogs from "C:/Qt/6.8.0/msvc2022_64/translations/catalogs.json".
        Found catalog "qtbase".
         :
         :
        readPeExecutable: C:\Qt\6.8.0\msvc2022_64\plugins\tls\qschannelbackend.dll 64 bit, release
        readPeExecutable: C:\Qt\6.8.0\msvc2022_64\plugins\tls\qschannelbackendd.dll 64 bit, debug
        "\DeepSkyStacker.exe" does not exist.
        
        readPeExecutable: C:\Qt\6.8.0\msvc2022_64\plugins\webview\qtwebview_webengine.dll 64 bit, release
        readPeExecutable: C:\Qt\6.8.0\msvc2022_64\plugins\webview\qtwebview_webengined.dll 64 bit, debug
        CMake Error at C:/Qt/6.8.0/msvc2022_64/lib/cmake/Qt6Core/Qt6CoreDeploySupport.cmake:535 (message):
          Executing C:/Qt/6.8.0/msvc2022_64/bin/windeployqt.exe failed: 1
      

      which isn't surprising because it was looking for /DeepSkyStacker.exe, when it should have been looking for ./DeepSkyStacker.exe

      So why was QT_INSTALL_BIN_DIR not set to the value of CMAKE_INSTALL_BINDIR?

      jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @Perdrix said in CMake QT_INSTALL_BIN_DIR not set to the value of CMAKE_INSTALL_BINDIR as expected:

      set(executable_path "${QT_DEPLOY_BIN_DIR}/$<TARGET_FILE_NAME:DeepSkyStacker>")

      Why is there \ in front of ${QT_DEPLOY_BIN_DIR}?

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • PerdrixP Offline
        PerdrixP Offline
        Perdrix
        wrote on last edited by Perdrix
        #3

        Hmm - good question but it was there until a few moments back and removing it didn't change the behaviour. This thread now superseded, please see:

        https://forum.qt.io/topic/159565/problems-with-qt_deploy_runtime_dependencies

        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