cmake

Cmake Could not find wxWigets

ぐ巨炮叔叔 提交于 2020-07-09 16:51:35
问题 I want to compile a source code on windows using CMake, it uses wxWigets library. I downloaded the wxWigets from the page: https://www.wxwidgets.org/ After building by Visual Studio, I got the library /lib file. I have already set PATH for wxWidgets_LIBRARIES and wxWidgets_INCLUDE_DIRS. But the following errors cannot be resolved. CMake Error at C:/Program Files/CMake/share/cmake-3.11/Modules/FindPackageHandleStandardArgs.cmake:137 (message): Could NOT find wxWidgets (missing: wxWidgets

Cmake Could not find wxWigets

…衆ロ難τιáo~ 提交于 2020-07-09 16:50:25
问题 I want to compile a source code on windows using CMake, it uses wxWigets library. I downloaded the wxWigets from the page: https://www.wxwidgets.org/ After building by Visual Studio, I got the library /lib file. I have already set PATH for wxWidgets_LIBRARIES and wxWidgets_INCLUDE_DIRS. But the following errors cannot be resolved. CMake Error at C:/Program Files/CMake/share/cmake-3.11/Modules/FindPackageHandleStandardArgs.cmake:137 (message): Could NOT find wxWidgets (missing: wxWidgets

grpc can't find protobuf libray

大憨熊 提交于 2020-07-09 11:57:46
问题 I went over the grpc installation and finished building and installation. Now when I try to: find_package(gRPC CONFIG REQUIRED) I get CMake Error at CMakeLists.txt:15 (find_package): Found package configuration file: /usr/lib64/cmake/grpc/gRPCConfig.cmake but it set gRPC_FOUND to FALSE so package "gRPC" is considered to be NOT FOUND. Reason given by package: The following imported targets are referenced, but are missing: protobuf::libprotobuf protobuf::libprotoc Event though find_package

Undefined reference using external library with CMake and Conan

喜你入骨 提交于 2020-07-09 11:51:08
问题 I am trying to develop a program that communicates with a PCSC USB reader using Conan and CMake with the LibLogicalAccess library. I followed the instructions of building and installing the library which seemed to have gone fine. I created a small simple console project with a "main.cpp" file. Following the C++ guide on the wiki of the library I tried to call a function from the library which resulted in a "Undefined reference to function . I know there are a lot of topics covering this but I

Why doesn't CMake detect dependency on my generated file?

ⅰ亾dé卋堺 提交于 2020-07-09 06:58:47
问题 I'm trying to generate a header with a custom command. The header should be updated on each rebuild, so that the source file which includes it would also be rebuilt. (Actual command is a script, but here is a simplified version.) Here's my project: CMakeLists.txt cmake_minimum_required(VERSION 2.8) set(test_SOURCES test.c) include_directories("${CMAKE_BINARY_DIR}") set(VERSION_H_PATH "${CMAKE_BINARY_DIR}/version.h") message("VERSION_H_PATH: ${VERSION_H_PATH}") add_custom_command(OUTPUT "$

How to fix 'Could not load the Qt platform plugin “xcb” in “” even though it was found.' after fixup_bundle macro?

断了今生、忘了曾经 提交于 2020-07-08 11:48:12
问题 I'm trying to setting up a standalone binary archive (.tar.gz) that can run on most Linux distros (ex. Blender). I'm still not familiar with CMake. As far as I know, all the dependencies can be resolved at the install step with fixup_bundle macro. And I assume that the install directory should become a standalone app that can be copied and run on other computers without Qt installed? I'm not sure about the role of CPack here. What I've tried My Qt installation path is /home/<user>/Qt5.12.2/5

How to use GTest with CMake ? Linkage problem when following Google's guide

本秂侑毒 提交于 2020-07-07 11:40:57
问题 I started to use boost test for my project, but I need to mock static methods, so I try to switch to GTest and GMock. I followed the really clear guide from google, and the CMakeLists seems to be doing its job : CMakeLists.txt cmake_minimum_required(VERSION 3.15) project(POC_V4) set(CMAKE_CXX_STANDARD 14) set(CMAKE_CXX_STANDARD_REQUIRED TRUE) # Specifying we are using pthread for UNIX systems. set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${TORCH_CXX_FLAGS} -pthread -Wall") find_package(OpenCV

How to use GTest with CMake ? Linkage problem when following Google's guide

假装没事ソ 提交于 2020-07-07 11:40:46
问题 I started to use boost test for my project, but I need to mock static methods, so I try to switch to GTest and GMock. I followed the really clear guide from google, and the CMakeLists seems to be doing its job : CMakeLists.txt cmake_minimum_required(VERSION 3.15) project(POC_V4) set(CMAKE_CXX_STANDARD 14) set(CMAKE_CXX_STANDARD_REQUIRED TRUE) # Specifying we are using pthread for UNIX systems. set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${TORCH_CXX_FLAGS} -pthread -Wall") find_package(OpenCV

Target requires the language dialect “CXX17” (with compiler extensions), but CMake does not know the compile flags to use to enable it

落花浮王杯 提交于 2020-07-06 09:09:11
问题 So I've been trying to include the <filesystem> into my project, which seem to be a bigger problem than I thought. <filesystem> should be part of c++17, I need to add that definition into my CMakeList. My root CmakeLists look like this: MESSAGE(“In src CMAKELIST”) # # Build everything in include/ directory add_subdirectory(include) # #set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib) #set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib) set(CMAKE_RUNTIME_OUTPUT_DIRECTORY $

Target requires the language dialect “CXX17” (with compiler extensions), but CMake does not know the compile flags to use to enable it

浪子不回头ぞ 提交于 2020-07-06 09:08:26
问题 So I've been trying to include the <filesystem> into my project, which seem to be a bigger problem than I thought. <filesystem> should be part of c++17, I need to add that definition into my CMakeList. My root CmakeLists look like this: MESSAGE(“In src CMAKELIST”) # # Build everything in include/ directory add_subdirectory(include) # #set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib) #set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib) set(CMAKE_RUNTIME_OUTPUT_DIRECTORY $