![]() ![]() usr/lib/x86_64-linux-gnu/qtchooser/default. usr/share/doc/qt5-default/LGPL_EXCEPTION.txt I tried to get information via dpkg -L qt5-default Tried so far: set (CMAKE_PREFIX_PATH "/usr/lib/x86_64-linux-gnu/cmake/Qt5Widgets/") As this is anyway the solution I dont prefer, I would like to set CMAKE_PREFIX_PATH to the installation folder.īut I dont have a clue where I need to link to. I dont know how to set "QT5Widgets_DIR" to this folder. Set the Qt5DIR in the CMake cache to the location of the Qt5Config.cmake file. ![]() Set your CMAKEPREFIXPATH environment variable to the Qt 5 installation prefix. While I know that the file QT5WidgetsConfig.cmake is contained in For findpackage to be successful, CMake must find the Qt installation in one of the following ways. I did install the Ubuntu package via: sudo apt-get install qt5-default Conan. If 'Qt5Svg' CMake provides a separate development package or SDK, be sure it has been CMake installed. "QT5Widgets" provides a separate development package or SDK, be sure it CMake CMake Add the installation prefix of 'Qt5Svg' to CMAKEPREFIXPATH or set CMake 'Qt5SvgDIR' to a directory containing one of the above files. "QT5Widgets_DIR" to a directory containing one of the above files. "QT5Widgets", but CMake did not find one.Ĭould not find a package configuration file provided by "QT5Widgets" withĪdd the installation prefix of "QT5Widgets" to CMAKE_PREFIX_PATH or set Has asked CMake to find a package configuration file provided by instead of QT5.)Īlready gives me By not providing "FindQT5Widgets.cmake" in CMAKE_MODULE_PATH this project find_package(QT5Widgets REQUIRED) EDIT HERE IS A TYPO problem solved (Qt5. Cyclic dependencies are allowed only among static libraries.I have a CMake project. In conclusion, there are two main errors: Attempt to add a custom rule to outputĪnd At least one of these targets is not a STATIC_LIBRARY. Until now, run Cmake in QtCreator, these errors will show up. This will be useful to the findpackage call, but even more so in this case might be to set CMAKEPREFIXPATH. Setting CMAKEINCLUDEPATH extends the list of paths CMake tries when doing findpath and findfile calls only. And using following CMakeLists.txt: cmake_minimum_required(VERSION 3.5)įind_package(QT NAMES Qt6 Qt5 COMPONENTS Widgets REQUIRED)įind_package(Qt$) Putting the path in quotes has no effect in this case, but it's a good habit to get into in case the path contains spaces. To reproduce that problem, you only need to create a minimal default desktop application program with QtCreator, named Test, built by cmake. Here I notice that timestamp and a cycle link problem, but they are not created or needed by me on myself side(Maybe they are auto generated by qt?). Build files cannot be regenerated correctly. Cyclic dependencies are allowed only among static libraries.ĬMake Generate step failed. ![]() "Test_autogen_timestamp_deps" of type UTILITYĪt least one of these targets is not a STATIC_LIBRARY. hmĮ:/test/build-test-Desktop_Qt_5_15_1_MSVC2019_64bit-Debug/CMakeFiles/test_autogenĬMake Error: The inter-target dependency graph contains the following strongly connected component (cycle):ĭepends on "Test_autogen_timestamp_deps" (strong) Build files have been written to: E:/test/build-test-Desktop_Qt_5_15_1_MSVC2019_64bit-Debug However the cmake complains some errors: Running D:\Qt\Tools\CMake_64\bin\cmake.exe -S E:/test/test -B E:/test/build-test-Desktop_Qt_5_15_1_MSVC2019_64bit-Debug in E:\test\build-test-Desktop_Qt_5_15_1_MSVC2019_64bit-Debug. In my project, I want to build my main source files into libraries and then link it into executable(meaningful when we are cooperating in a large project). I'm porting my codes onto windows which is built and ran on Ubuntu(with cmake in qt 5.15.1). ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |