Category "cmake"

grpc can't find protobuf library

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 CMakeLi

Qt6 build error from source. Multi-config build is only supported by Xcode, Ninja Multi-Config and Visual Studio generators

I'm trying to build Qt6.3.0 from sources. I'm new in qt and trying to build static version. I'm use this tree: C:/Qt/6.3.0/Src C:/Qt/6.3.0/static In C:/Qt/6.3.0

CMake can not find Boost Python

I'm trying to build 3d party application using CMake 3.17.5. I have boost installed by vcpkg (on Windows). I checked I have boost-python installed by vcpkg. I g

cmake on Android (NDK): meaning of -D?

I use NDK and cmake for my Android app. Typical cmake commande is like this: cmake -DCMAKE_TOOLCHAIN_FILE=$ANDROID_NDK/build/cmake/android.toolchain.cmake -DAND

What is the "VERSION" in "cmake_minimum_required(VERSION 3.10)”

I know the meaning of below CMake statement: cmake_minimum_required(VERSION 3.10) I am just wondering what the VERSION part is syntactically? Is it a unquoted

CMake could not find SDL2

I want to add this library to my project. However, it does not come with pre-compiled files. It asks me to build the library myself with cmake, which I am not f

cmake v3.15.3 cannot find boost v1.71.0

I am trying to build from source the following software in Windows 10: https://github.com/FreeOpcUa/freeopcua. I have also installed the latest version of the b

CMake - How to stop building every dependency every time I build my project

I have a cmake list file that is pulling in dependencies via ExternalProject_Add. On initial compilation of my project (which uses these dependencies) I would e

CMake have a target depend on a generated file in a subdirectory

I have a scenario that I think is very similar to this one: CMake add_custom_command/_target in different directories for cross-compilation, however the solutio

Anaconda confuses C/C++ linker with duplicate libraries

This is happening on a Linux system. Anaconda comes with several C libraries, like libz, or libgomp. I have most of these libraries also installed globally on m

CMake set environment variable

According to the CMake documentation https://cmake.org/cmake/help/v3.3/command/set.html One can do set(ENV{<variable>} <value>) but this gives the

How to generate CMakeLists.txt in Clion when I create project from existing sources?

Idk how to make it automaticly - the only option is to specify where the file is - not to generate it, but I don't wan't to write it by my own, because there ar

How to use FFTW library in cmake?

I have C++ code which uses FFTW 3.3.4. Ubuntu 16.04, cmake version 3.7.2 $ locate *fftw*.so /usr/lib/libsfftw.so /usr/lib/libsfftw_mpi.so /usr/lib/libsfftw_th

Flutter Linux build error when executing flutter run -d linux

Flutter doctor did not show any issues. What could be wrong? executing: flutter run -d linux Shows the following: CMake Error at /snap/flutter/81/usr/share/cmak

What is the #cmakedefine preprocessor directive?

I am looking through the source-code for ZeroMQ, which I want to build from source. Inside I found platform.hpp.in, which contains: ... #cmakedefine ZMQ_HAVE_

target_link_libraries and add_dependencies

Is there any use case in which target_link_libraries(my-lib x y z) add_dependencies(my-lib x) # this is not just a waste of bytes? If so, can someone explai

CMake - how to build Boost after downloading it with FetchContent?

My goal is to download the Boost repository if it isn't found and then build it the default way, i.e. using boostrap and b2 tools. I know, I can download it l

How to add _ITERATOR_DEBUG_LEVEL to CMake?

I am new to CMake, and I want to set _ITERATOR_DEBUG_LEVEL to 0 for Release build, and 2 for Debug build, to fix issues when trying to compile a project that de

What is the proper use of CMake FindThreads with modern C++?

The source for the CMake (https://github.com/Kitware/CMake/blob/master/Modules/FindThreads.cmake) claims the following about the "FindThreads" functionality:

CMake does not find the source directory (installing Eigen)

I was installing the library Eigen on Ubuntu. I followed the instructions by creating a "build directory" alongside the downloaded source directory. That is, I