My cmake version is 2.8.12.2: #YCStats CmakeList. Any help or working cmake file would be appreciated. Probably it will be easiest to diagnose this for Linux or MacOS, so please show for one of those two platforms. Also show the exact output that demonstrates that Qt is not being found. It seems to be the find_package(Qt5Gui.) in QtWidget which use androidx86 path instead of clang_64 path but I dont know why it won't go with the clang_64 path even when using the NO_DEFAULT_PATH option. Please post the command line you are using to set CMAKEPREFIXPATH and show the findpackage () calls you are using to find Qt. Users/guillaume/Qt/5.2.1/clang_64/lib/cmake/Qt5Widgets/Qt5WidgetsConfig.cmake:88 (find_package) Users/guillaume/Qt/5.2.1/android_x86/lib/cmake/Qt5Gui/Qt5GuiConfig.cmake:143 (include) There is a better way, and it makes many of these things simpler again: findpackage. Users/guillaume/Qt/5.2.1/android_x86/lib/cmake/Qt5Gui/Qt5GuiConfigExtras.cmake:51 (_qt5gui_find_extra_libs) It also led to either using âCMAKEPREFIXPATHâ to specify the prefix Qt 5 was installed in, or passing in âQt5CoreDIRâ, âQt5WidgetsDIRâ, etc for the directory containing each and every Qt 5 config module normally all within a common prefix. Pass the name of the library target to target_link_libraries to use the respective library.I'm trying to build a Qt5 project using cmake but I keep having the same error for a while now: CMake Error at /Users/guillaume/Qt/5.2.1/android_x86/lib/cmake/Qt5Gui/Qt5GuiConfigExtras.cmake:16 (message):įailed to find "GLESv2" in "" with CMAKE_CXX_LIBRARY_ARCHITECTURE "". The target names start with Qt5::, followed by the module name. Imported library targetsÄ®ach Qt module that is loaded defines a CMake library target. For more details, see CMake AUTOMOC documentation. The CMAKE_AUTOMOC setting runs moc automatically when required. Those screenshots show that you did not clear your build directory first, so it was just using the same location if found before instead of the new location you specified (see my previous comment: make sure you remove any previous build the first time you do this or it will continue to use the system Qt it found previously). Set the Qt5_DIR in the CMake cache to the location of the Qt5Config.cmake file. Please post the command line you are using to set CMAKEPREFIXPATH and show the findpackage () calls you are using to find Qt.Set your CMAKE_PREFIX_PATH environment variable to the Qt 5 installation prefix. cmake-3.13.0-Linux-x8664.sh -skip-license -prefix/usr Go to the Beam project folder and start the release build export PATH/opt/qt511/bin:PATH.If 'Qt5' provides a separate development package or SDK, be sure it. If 'Qt5' provides a separate development package or SDK, be sure it has been installed. 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 CMAKEPREFIXPATH or set 'Qt5DIR' to a directory containing one of the above files. Target_link_libraries(helloworld Qt5::Widgets)įor find_package to be successful, CMake must find the Qt installation in one of the following ways: Search in cache variables: CMAKEPREFIXPATH, CMAKEFRAMEWORKPATH, CMAKEAPPBUNDLEPATH Search in environment variables: DIR, CMAKEPREFIXPATH, CMAKEFRAMEWORKPATH, CMAKEAPPBUNDLEPATH. 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 CMAKEPREFIXPATH or set 'Qt5DIR' to a directory containing one of the above files.Each command will add appropriate subdirectories (like bin, lib, or include) as specified in its own documentation. Project(helloworld VERSION 1.0.0 LANGUAGES CXX)įind_package(Qt5 COMPONENTS Widgets REQUIRED) Semicolon-separated list of directories specifying installation prefixes to be searched by the findpackage (), findprogram (), findlibrary (), findfile (), and findpath () commands.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |