wrong toolchain of QT in cmake









up vote
0
down vote

favorite












I am trying to build project which has capabilities of being build cross platform.
As such it requires multiple versions of QT as its dependancy. It has 3 versions of qt to be more precise:



  • gcc_64

  • android_x86

  • android_armv7

I am trying to build on linux so I am expecting the gcc_64 to be selected.
However when I



find_package(Qt5Widgets REQUIRED)
find_package(Qt5OpenGL REQUIRED)


The ccmake seems to be picking the android_armv7.
The paths which I am geting are following:




Qt5OpenGL_DIR /opt/apps/Qt/5.6/android_armv7/lib/cmake/Qt5OpenGL




And this bring me to the question, is there a method of influencing the cmake to find specific alternative?



If this is dependant on some variable which is specifying the target platform/arch/toolchain, it is entirely likely that it is wrongly set so if you know what might be causing the wrong version to be selected please point me in the direction of the wrong flag.










share|improve this question

























    up vote
    0
    down vote

    favorite












    I am trying to build project which has capabilities of being build cross platform.
    As such it requires multiple versions of QT as its dependancy. It has 3 versions of qt to be more precise:



    • gcc_64

    • android_x86

    • android_armv7

    I am trying to build on linux so I am expecting the gcc_64 to be selected.
    However when I



    find_package(Qt5Widgets REQUIRED)
    find_package(Qt5OpenGL REQUIRED)


    The ccmake seems to be picking the android_armv7.
    The paths which I am geting are following:




    Qt5OpenGL_DIR /opt/apps/Qt/5.6/android_armv7/lib/cmake/Qt5OpenGL




    And this bring me to the question, is there a method of influencing the cmake to find specific alternative?



    If this is dependant on some variable which is specifying the target platform/arch/toolchain, it is entirely likely that it is wrongly set so if you know what might be causing the wrong version to be selected please point me in the direction of the wrong flag.










    share|improve this question























      up vote
      0
      down vote

      favorite









      up vote
      0
      down vote

      favorite











      I am trying to build project which has capabilities of being build cross platform.
      As such it requires multiple versions of QT as its dependancy. It has 3 versions of qt to be more precise:



      • gcc_64

      • android_x86

      • android_armv7

      I am trying to build on linux so I am expecting the gcc_64 to be selected.
      However when I



      find_package(Qt5Widgets REQUIRED)
      find_package(Qt5OpenGL REQUIRED)


      The ccmake seems to be picking the android_armv7.
      The paths which I am geting are following:




      Qt5OpenGL_DIR /opt/apps/Qt/5.6/android_armv7/lib/cmake/Qt5OpenGL




      And this bring me to the question, is there a method of influencing the cmake to find specific alternative?



      If this is dependant on some variable which is specifying the target platform/arch/toolchain, it is entirely likely that it is wrongly set so if you know what might be causing the wrong version to be selected please point me in the direction of the wrong flag.










      share|improve this question













      I am trying to build project which has capabilities of being build cross platform.
      As such it requires multiple versions of QT as its dependancy. It has 3 versions of qt to be more precise:



      • gcc_64

      • android_x86

      • android_armv7

      I am trying to build on linux so I am expecting the gcc_64 to be selected.
      However when I



      find_package(Qt5Widgets REQUIRED)
      find_package(Qt5OpenGL REQUIRED)


      The ccmake seems to be picking the android_armv7.
      The paths which I am geting are following:




      Qt5OpenGL_DIR /opt/apps/Qt/5.6/android_armv7/lib/cmake/Qt5OpenGL




      And this bring me to the question, is there a method of influencing the cmake to find specific alternative?



      If this is dependant on some variable which is specifying the target platform/arch/toolchain, it is entirely likely that it is wrongly set so if you know what might be causing the wrong version to be selected please point me in the direction of the wrong flag.







      qt cmake






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Nov 9 at 12:50









      cerkiewny

      1,800622




      1,800622






















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          1
          down vote



          accepted










          Turns out you can manipulate the include with DCMAKE_PREFIX_PATH to affect the version found. This + cleaning cmake cache resolved issue fro me.



          I have passed it to cmake as:




          -DCMAKE_PREFIX_PATH=/opt/apps/Qt/5.6/gcc_64







          share|improve this answer




















          • Yesterday, I just stumbled into a similar issue. After installing Qt5, and CMake on my Windows 10 laptop, I tried to prepare a minimal Qt5 project. CMake complained about missing Qt5 until I prepared an environment variable CMAKE_PREFIX_PATH and the resp. Qt5 path (which had to be the parent folder of the resp. Qt5 bin folder according to my intended dest. platform.) After having set this env. var. properly, CMake started to build the solution/projects.
            – Scheff
            yesterday










          Your Answer






          StackExchange.ifUsing("editor", function ()
          StackExchange.using("externalEditor", function ()
          StackExchange.using("snippets", function ()
          StackExchange.snippets.init();
          );
          );
          , "code-snippets");

          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "1"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader:
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          ,
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );













           

          draft saved


          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53226029%2fwrong-toolchain-of-qt-in-cmake%23new-answer', 'question_page');

          );

          Post as a guest






























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          up vote
          1
          down vote



          accepted










          Turns out you can manipulate the include with DCMAKE_PREFIX_PATH to affect the version found. This + cleaning cmake cache resolved issue fro me.



          I have passed it to cmake as:




          -DCMAKE_PREFIX_PATH=/opt/apps/Qt/5.6/gcc_64







          share|improve this answer




















          • Yesterday, I just stumbled into a similar issue. After installing Qt5, and CMake on my Windows 10 laptop, I tried to prepare a minimal Qt5 project. CMake complained about missing Qt5 until I prepared an environment variable CMAKE_PREFIX_PATH and the resp. Qt5 path (which had to be the parent folder of the resp. Qt5 bin folder according to my intended dest. platform.) After having set this env. var. properly, CMake started to build the solution/projects.
            – Scheff
            yesterday














          up vote
          1
          down vote



          accepted










          Turns out you can manipulate the include with DCMAKE_PREFIX_PATH to affect the version found. This + cleaning cmake cache resolved issue fro me.



          I have passed it to cmake as:




          -DCMAKE_PREFIX_PATH=/opt/apps/Qt/5.6/gcc_64







          share|improve this answer




















          • Yesterday, I just stumbled into a similar issue. After installing Qt5, and CMake on my Windows 10 laptop, I tried to prepare a minimal Qt5 project. CMake complained about missing Qt5 until I prepared an environment variable CMAKE_PREFIX_PATH and the resp. Qt5 path (which had to be the parent folder of the resp. Qt5 bin folder according to my intended dest. platform.) After having set this env. var. properly, CMake started to build the solution/projects.
            – Scheff
            yesterday












          up vote
          1
          down vote



          accepted







          up vote
          1
          down vote



          accepted






          Turns out you can manipulate the include with DCMAKE_PREFIX_PATH to affect the version found. This + cleaning cmake cache resolved issue fro me.



          I have passed it to cmake as:




          -DCMAKE_PREFIX_PATH=/opt/apps/Qt/5.6/gcc_64







          share|improve this answer












          Turns out you can manipulate the include with DCMAKE_PREFIX_PATH to affect the version found. This + cleaning cmake cache resolved issue fro me.



          I have passed it to cmake as:




          -DCMAKE_PREFIX_PATH=/opt/apps/Qt/5.6/gcc_64








          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Nov 9 at 13:01









          cerkiewny

          1,800622




          1,800622











          • Yesterday, I just stumbled into a similar issue. After installing Qt5, and CMake on my Windows 10 laptop, I tried to prepare a minimal Qt5 project. CMake complained about missing Qt5 until I prepared an environment variable CMAKE_PREFIX_PATH and the resp. Qt5 path (which had to be the parent folder of the resp. Qt5 bin folder according to my intended dest. platform.) After having set this env. var. properly, CMake started to build the solution/projects.
            – Scheff
            yesterday
















          • Yesterday, I just stumbled into a similar issue. After installing Qt5, and CMake on my Windows 10 laptop, I tried to prepare a minimal Qt5 project. CMake complained about missing Qt5 until I prepared an environment variable CMAKE_PREFIX_PATH and the resp. Qt5 path (which had to be the parent folder of the resp. Qt5 bin folder according to my intended dest. platform.) After having set this env. var. properly, CMake started to build the solution/projects.
            – Scheff
            yesterday















          Yesterday, I just stumbled into a similar issue. After installing Qt5, and CMake on my Windows 10 laptop, I tried to prepare a minimal Qt5 project. CMake complained about missing Qt5 until I prepared an environment variable CMAKE_PREFIX_PATH and the resp. Qt5 path (which had to be the parent folder of the resp. Qt5 bin folder according to my intended dest. platform.) After having set this env. var. properly, CMake started to build the solution/projects.
          – Scheff
          yesterday




          Yesterday, I just stumbled into a similar issue. After installing Qt5, and CMake on my Windows 10 laptop, I tried to prepare a minimal Qt5 project. CMake complained about missing Qt5 until I prepared an environment variable CMAKE_PREFIX_PATH and the resp. Qt5 path (which had to be the parent folder of the resp. Qt5 bin folder according to my intended dest. platform.) After having set this env. var. properly, CMake started to build the solution/projects.
          – Scheff
          yesterday

















           

          draft saved


          draft discarded















































           


          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53226029%2fwrong-toolchain-of-qt-in-cmake%23new-answer', 'question_page');

          );

          Post as a guest














































































          Popular posts from this blog

          Use pre created SQLite database for Android project in kotlin

          Darth Vader #20

          Ondo