Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Cannot find Qt libraries using QtCreator and CMake for Android

Cannot find Qt libraries using QtCreator and CMake for Android

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
1 Posts 1 Posters 760 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.
  • D Offline
    D Offline
    Devoo
    wrote on last edited by Devoo
    #1

    Hey,
    Simple test project(empty project generated by QtCreator) cannot be parsed using QtCreator and CMake for Android.
    Logs:

    -- The CXX compiler identification is Clang 9.0.8
    -- Check for working CXX compiler: E:/IT/Android/Sdk/ndk-bundle/toolchains/llvm/prebuilt/windows-x86_64/bin/clang++.exe
    -- Check for working CXX compiler: E:/IT/Android/Sdk/ndk-bundle/toolchains/llvm/prebuilt/windows-x86_64/bin/clang++.exe - works
    -- Detecting CXX compiler ABI info
    -- Detecting CXX compiler ABI info - done
    -- Detecting CXX compile features
    -- Detecting CXX compile features - done
    CMake Error at CMakeLists.txt:27 (find_package):
      By not providing "FindQt5.cmake" in CMAKE_MODULE_PATH this project has
      asked CMake to find a package configuration file provided by "Qt5", but
      CMake did not find one.
    
      Could not find a package configuration file provided by "Qt5" with any of
      the following names:
    
        Qt5Config.cmake
        qt5-config.cmake
    
      Add the installation prefix of "Qt5" to CMAKE_PREFIX_PATH or set "Qt5_DIR"
      to a directory containing one of the above files.  If "Qt5" provides a
      separate development package or SDK, be sure it has been installed.
    
    
    -- Configuring incomplete, errors occurred!
    See also "C:/Users/Awaria/AppData/Local/Temp/QtCreator-tXBHHs/qtc-cmake-qRdZsmFP/CMakeFiles/CMakeOutput.log".
    CMake process exited with exit code 1.
    Elapsed time: 00:02.
    

    Toolset:
    OS: Windows 10 Education
    visual studio 2017 Enterprise
    visual studio 2019 Community
    QtCreator 4.12.4
    Qt 5.15.0
    NDK: 21.1.6352462
    JDK: 1.8
    CMake generator: NMake Makefiles JOM
    CMake: 3.17.1

    This is a really strange issue because everything works fine on my laptop ....

    I tried to add:

    set(CMAKE_PREFIX_PATH "E:/IT/Qt/5.15.0/android")
    set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ON)
    list(APPEND CMAKE_FIND_ROOT_PATH "E:/IT/Qt/5.15.0/android")
    

    Result of these changes:

    - The CXX compiler identification is Clang 9.0.8
    -- Check for working CXX compiler: E:/IT/Android/Sdk/ndk-bundle/toolchains/llvm/prebuilt/windows-x86_64/bin/clang++.exe
    -- Check for working CXX compiler: E:/IT/Android/Sdk/ndk-bundle/toolchains/llvm/prebuilt/windows-x86_64/bin/clang++.exe -- works
    -- Detecting CXX compiler ABI info
    -- Detecting CXX compiler ABI info - done
    -- Detecting CXX compile features
    -- Detecting CXX compile features - done
    CMake Error at E:/IT/Qt/5.15.0/android/lib/cmake/Qt5Core/Qt5CoreConfig.cmake:14 (message):
      The imported target "Qt5::Core" references the file
    
         "E:/IT/Qt/5.15.0/android/lib/libQt5Core_.so"
    
      but this file does not exist.  Possible reasons include:
    
      * The file was deleted, renamed, or moved to another location.
    
      * An install or uninstall procedure did not complete successfully.
    
      * The installation package was faulty and contained
    
         "E:/IT/Qt/5.15.0/android/lib/cmake/Qt5Core/Qt5CoreConfig.cmake"
    
      but not all the files it references.
    
    Call Stack (most recent call first):
      E:/IT/Qt/5.15.0/android/lib/cmake/Qt5Core/Qt5CoreConfig.cmake:32 (_qt5_Core_check_file_exists)
      E:/IT/Qt/5.15.0/android/lib/cmake/Qt5Core/Qt5CoreConfig.cmake:209 (_populate_Core_target_properties)
      E:/IT/Qt/5.15.0/android/lib/cmake/Qt5/Qt5Config.cmake:28 (find_package)
      CMakeLists.txt:31 (find_package)
    
    
    -- Configuring incomplete, errors occurred!
    See also "C:/Users/Awaria/AppData/Local/Temp/QtCreator-DWVuuP/qtc-cmake-VYvlUrRj/CMakeFiles/CMakeOutput.log".
    CMake process exited with exit code 1.
    Elapsed time: 00:02.
    
    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