cmake-modules

Cmake: accessing qtvirtual keyboard module

我的梦境 提交于 2019-12-24 09:04:38
问题 Can anyone do a simple example of including qtvirtualkeyboard module into a cmake file? I want to access the classes but I cannot figure out how to include it. 回答1: This example should work. It was compiled using CMake 3.1.1 and Qt 5.11.1 The code is available in my GitHub account. The QML example is based on the example provided by Qt. Main CMakeLists.txt cmake_minimum_required(VERSION 3.1) # 3rd party tools find_package(Qt5 COMPONENTS Widgets Qml Quick REQUIRED) # Directory with the source

How to deploy a Find*.cmake file for an Autotools library in the correct place for Yocto?

≡放荡痞女 提交于 2019-12-13 04:27:39
问题 I created a new layer over an existing Yocto git for my company project. In this layer I added a few external autotools based libraries. A few applications need to link against this libraries and the application projects are all cmake based. Taking one of this libraries (e.g. libcoap) I could easily find some FindCoAP.cmake to add to my library recipe. Now if I was running on PC, it would simply be a matter of placing this FindCoAP.cmake file in cmake 's ${CMAKE_ROOT}/Modules dir, but how

CMake: How to implement version check in a config file?

被刻印的时光 ゝ 提交于 2019-12-13 03:48:45
问题 I Customize CMake package configure file OpenCLConfig.cmake for opencl-icd. refer to Create CMake XXConfig.cmake let other cmake project invoke Now, I encounter a problem: How to implement version check in a config file. I create OpenCLConfigVersion.cmake beside OpenCLConfig.cmake , which content is: #OpenCLConfigVersion.cmake set(OpenCL_VERSION 2.2) set(OpenCL_VERSION_MAJOR 2) set(OpenCL_VERSION_MINOR 2) SET(OpenCV_VERSION_PATCH 0) SET(OpenCV_VERSION_TWEAK 0) While I invoke it opencl-icd in

CMake find_package: where did it find the package?

前提是你 提交于 2019-12-10 18:18:49
问题 In my CMake package, there is a call to find_package . This succeeds, great! However, it turns out to be the wrong version of the package. I now want to go and delete that package. However, I have no idea where the heck it is on my system, nor where the -config.cmake file is that CMake must have found somewhere. Is there a way to get find_package to give me this information? Or at least verbosely tell me where it is searching? I though this might be in the variable CMAKE_MODULE_PATH , however