Category "cmake"

How to compile HLSL Shaders during build with Cmake?

I'm working on a d3d application and i would like to compile my .hlsl shaders during to build using cmake. I have no idea where to start. this is my current CMa

How to use Clang-CL LLVM with VS2019 CMAKE?

As of writing clang has this documentation on their user manual for Visual Studio: cmake -G"Visual Studio 2017" -T LLVM .. This doesn't work. I get this mess o

Can't use command make for makefile on Visual Studio Code

Backround I have been coding (mostly C) on Linux so far but i want to be able to code on Windows as well. So i searched for a better editor than notepad and fou

"In-source builds are not allowed" in cmake

I'm new to cmake, and I'm only using it to install opencv on my ubuntu linux. Here's the command I ran: cmake -DCMAKE_BUILD_TYPE=Release DCMAKE_INSTALL_PREFIX=/

What's the right cmake command to cross-compile for Raspberry Pi from M1 Mac?

My title seems general but I need to compile a project for my Raspberry Pi 3b. I want to use Telegram's Bot API server on it, but it takes a lot of time to comp

Calling existing make command in cmake file

I have a large project with multiple subdirectories. In the parent directory, I have a CMakeLists.txt file which calls functions defined in other cmake files in

How to link shared library on linux using cmake?

How to link shared library on linux platform? I downloaded sfml library using apt cmd and I tried to run simple example: main.cpp #include <SFML/Graphics.hpp

How do I stop project with boost dependency finding the wrong ${Boost_INCLUDE_DIRS} location, when building in Visual Studio 2019 with CMake

I am attempting to build the fruit library - https://github.com/google/fruit, in Visual Studio 2019 When I ran the install step for the first time it was unable

Why does CMake set -no-fat-lto-objects when I enable LTO/IPO?

I'm enabling IPO (inter-procedural optimization) for a C compilation of mine, using CMake: set_property(TARGET foo PROPERTY INTERPROCEDURAL_OPTIMIZATION TRUE)

Copying assets directory from source to build directory in CMake

I am trying to write a game for practice in C++. I am using CMake for this, and my project gets built in a separate build directory automatically by my IDE. How

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