108
questions
0
votes
0
answers
13
views
CMake:method:find_package can't be executed correctly when I use it to find Boost [duplicate]
Details
I was trying to download,compile and add Boost into my program through CMakeLists.txt,however,the method:find_package() can't be executed correctly even though I've dadjusted the CMakeLists....
1
vote
1
answer
93
views
VulkanSDK Fetching the library with CMake
I am currently trying to link vulkan to my project in CMake. I want to download the VulkanSDK with CMake without depending anything but CMake.
I tried to use FetchContent but it only downloads the ...
0
votes
0
answers
50
views
Passing list to CMAKE_CXX_FLAGS in ExternalProject_Add
When passing list of flags to CMAKE_CXX_FLAGS in ExternalProject_Add configure command, the list becomes formatted and all semicolons are replaced with spaces. My goal is to define preprocessor macros ...
1
vote
0
answers
434
views
Combining CMake FetchContent and git --single-branch
I have a git repository with various dependencies distributed over separate branches (some of which take a lot of space). In a separate repository I have a CMake project which utilizes FetchContent to ...
0
votes
0
answers
118
views
CMake: How to use ExternalProject_Add( ) to download, build and correctly link libraries?
I'm trying to download, build and link external libraries using ExternalProject_Add(). Currently I'm trying to import Volk library https://github.com/zeux/volk with it. I got to the point, where I can ...
1
vote
1
answer
2k
views
cmake FetchContent SOURCE_DIR
I am trying to use a small subproject in a cmake master project using the FetchContent method. Specifically, in the CMakeLists.txt of my master project, I have the lines
include(FetchContent)
...
0
votes
0
answers
239
views
Using FetchContent with interdependent libraries yields "prefixed in the build directory" error
Consider the following: I have a project which depends on libwebsockets which is itself dependends on mbedtls. I pull everything in from github using FetchContent, which establishes the dependencies ...
0
votes
1
answer
743
views
Installing openssl 3.0.5 in windows 10 using CMake externalproject failing due to config.com file
I was trying to install openssl in external project using CMake in ubuntu , android and Windows. Its working fine in ubuntu . but in windows , Its failing with the following line
Performing ...
1
vote
1
answer
487
views
CMake run custom command with externalproject's target
I have a subproject in my project for generating code used in the project, however i want to include it using ExternalProject so it can be built and ran regardless of the toolchain i use for the main ...
2
votes
0
answers
443
views
Install IPOPT locally into C++ codebase with CMake ExternalProject
I would like to use Ipopt in a CMake-based project using ExternalProject. The library should be installed locally and automatically in the build folder so that the user must not go through any hassle.
...
1
vote
1
answer
732
views
Integrate pre-compiled libraries into C++ codebase with CMake ExternalProject
I want to integrate CasADi into a CMake-based C++ codebase as an ExternalProject. For this purpose, I would like to use pre-compiled libraries because building from source is not recommended. So far, ...
0
votes
1
answer
279
views
Bazel doesn't exit after build when called from CMake (ExternalProject_Add)
I am trying to build an external project that uses Bazel as its build system from CMake with Ninja. I am doing this by using ExternalProject_Add
ExternalProject_Add(bazel_proj
SOURCE_DIR "${...
0
votes
1
answer
174
views
CMake: Can I wrap an ExternalProject in some object that I can just link to my target?
I'm including this library as an external project. Based on the documentation, with some small tweaks, I have this:
# LIEF dependency
# ===========================
set(LIEF_PREFIX "${...
0
votes
1
answer
174
views
CMake SWIG dependency on headers of external project
I have a project "A" that depends on another project "B".
ProjectB installs some headers, for example B1.h, B2.h.
ProjectA tries to create a Python wrapper of B1.h and B2.h, using ...
0
votes
0
answers
230
views
What is a proper way to handle multiple level dependency of third-party libraries in CMake
I am developing a CMake project depending on multiple third-party libraries, and these libraries may further depend on other third-party libraries. The dependencies are all built as static libraries. ...
0
votes
0
answers
180
views
Building external dependency with CMake
I'm trying to compile a C++ project which depends on a 3rd party library, called Foo for example. I'm using the ExternalProject_Add() command in a CMakeLists.txt file for this purpose. However, this ...
1
vote
0
answers
247
views
Import targets from external CMakeLists.txt file, having already built the external source
I am trying to integrate the Refinitiv Real-Time SDK into my own application.
I have downloaded the source code and built the libraries.
Typically you would then expect there to be an INSTALL target, ...
0
votes
0
answers
35
views
ExternalProject_Add: how to use build dependencies in your project? [duplicate]
I am trying to build a 3rd-party dependency using ExternalProject_Add (in this case libpqxx):
ExternalProject_Add(libpqxx_ext
GIT_REPOSITORY
https://github.com/jtv/libpqxx
GIT_TAG
...
0
votes
0
answers
129
views
How to make ExternalProject_Add default build not invoke install
I am adding CMake build support to a make based project. I am using ExternalProject_Add for this. EVerything up to INSTALL_COMMAND works fine. But I want the default target (I guess all target) to not ...
0
votes
0
answers
297
views
preventing 'make clean' from ExternalProject or add a custom clean with CMake
My project has an external project that I add with its own CMake with the CMake ExternalProject_Add command.
Every time I add flags or do a rebuild the external project is also rebuilt and it takes a ...
6
votes
1
answer
6k
views
FetchContent vs ExternalProject
I am building a project with Cmake and use FetchContent to manage dependencies. For several reasons I cannot depend on system-wide installed packages, so this package helps a lot. It allows me to do ...
5
votes
3
answers
2k
views
Is there an easy way of skip download_step if folder exists, in cmake ExternalProject_Add
I need the ExternalProject_Add in CMakeLists.txt to skip download_step for git downloads if there is already a folder with the repo cloned, like the update_step if you provide a GIT_TAG, but don't ...
1
vote
2
answers
1k
views
ExternalProject_Add for Makefile project error during build
I am trying to add Postgresql as a dependency for my project for which I am using ExternalProject module to download the source from github and build, but the build step fails when running from cmake (...
0
votes
0
answers
137
views
Add slow external project to cmake
I am using an external dependency that is shipped as a tar archive inside the source tree. I am building the autotools project by using
ExternalProject_Add
This project will almost never change but ...
0
votes
1
answer
183
views
How to build projects that aren't in the Visual Studio Solution?
Is there a way to tell Visual Studio to build projects that aren't part of its solution? We've been looking into many different options without success such as nested projects, shared projects, and ...
3
votes
0
answers
3k
views
get_property could not find TARGET, from ExternalProject
I'm running into a CMake issue that I am a little stumped by. It involves a CMake project that builds dependencies for an application I develop at work. I now have to add a new dependency, libnest2d, ...
1
vote
1
answer
529
views
CMake: Best practices for differing lib paths with ExternalProject_Add
I have a small project whose CMakeLists.txt looks something like this:
include(ExternalProject)
ExternalProject_Add(gainput_project
PREFIX gainput
GIT_REPOSITORY https://github.com/jkuhlmann/...
1
vote
1
answer
2k
views
CMake - unwanted rebuilding when there are no changes
I am working on a project that uses ExternalProject, with BUILD_IN_SOURCE=TRUE, and the entire project (all of the sources and targets) are rebuilt every time, as though make is unable to see that the ...
1
vote
1
answer
3k
views
How to use CMake to download specific header file from git to create a new interface target?
I'm not sure if this is even the right command, but every google search brings me back to ExternalProject_Add. I thought, based on the documentation, that the only thing I would have to do to ...
0
votes
0
answers
175
views
Transitive dependencies through Cmake External Projects
Is there a way to make an external dependency depend of two others external dependencies of a project ?
Here is my situation
core depdends on boost_program_options and on quetzal
quetzal depends on ...
0
votes
0
answers
114
views
Adding CFLAGS="-std=gnu90" to CMakeLists.txt creates error that the file "-std=gnu90" is not found [duplicate]
I am trying to build a project that includes UCL, and from what I have been able to figure out the error here can be resolved by setting std=gnu90 for the UCL project.
However, adding the flag for the ...
2
votes
0
answers
2k
views
Why doesn't CMake's `ExternalProject_Add` command build this autotools library?
I'm trying to use CMake's ExternalProject_Add command to build an Autotools project on Ubuntu 18.04 using cmake 3.15.7. Here is the command I'm using:
set(THIRD_PARTY_DIRS ${CMAKE_SOURCE_DIR}/...
1
vote
1
answer
292
views
How to define variable derived from a target built with ExternalProject_add in cmake?
You can get a property of a CMake target that was built using ExternalProject_add using something like this:
ExternalProject_Get_property(zipper SOURCE_DIR)
message("Source dir of myExtProj = ${...
5
votes
1
answer
2k
views
What is the relationship between use of `git submodules` and `ExternalProject_Add` for dependency mangement in CMake?
I've spent a lot of time recently following a long gone developer's vague and incorrect build instructions for a C++ project I'm working on. Therefore, I'm writing a new build system and I'm looking ...
4
votes
1
answer
1k
views
How do I set CMake policy and property on an external project added using ExternalProject_Add
I have a cmake project that uses an external project using CMake's ExternalProject_Add feature. Is there a way to set policy and property on the external project?
I would like following policy and ...
2
votes
1
answer
2k
views
Getting external dependency with cmake
I am writing a small library in c++ with no external dependencies, except for testing where I want to use catch2. So I'd rather not include the project and thought I could just download it when needed ...
6
votes
1
answer
5k
views
Ninja: No CMAKE_RC_COMPILER could be found
CMake is not finding the clang rc compiler. It is possible to set it for cmake, which makes it run successfully, but ninja will fail while trying to compile gtest.
Hello, i am trying to set up a ...
4
votes
1
answer
1k
views
CMake ExternalProject_Add rebuilds every time
I have OpenSSL as a part of my CMake project. Since it does not have its own CMake file I build it as an ExternalProject. Unfortunately every time I rebuild my project the ExternalProject is also ...
10
votes
1
answer
2k
views
How to request a password for GIT_REPOSITORY using HTTPS URL
The URL understood by the git command can be in the format HTTPS or SSH.
In CMake, using ExternalProject_Add for the specified GIT_REPOSITORY any URL understood by the git command may be used.
Using ...
2
votes
1
answer
2k
views
CMake: Download and unpack multiple files in ExternalProject_Add
I would like to compile OpenSSL automatically on Windows using the ExternalProject features of CMake. In the configuration, I can specify one download URL. But I need multiple additional files which I'...
3
votes
2
answers
483
views
Error linking library built with ExternalProject_Add to project configured with CMAKE_CXX_COMPILER
My CMake project uses the gtest library which I add using the ExternalProject module. This normally works but when I configure the project to use the Clang 3.8 tool chain, e.g.:
cmake -...
0
votes
1
answer
2k
views
Difference in behavior between between "normal" build and ExternalProject_Add
I am trying to build the ceres-solver on linux using CMake's external project feature.
I have a specific version of Eigen that I built and the other dependencies are installed through my packet ...
0
votes
0
answers
151
views
CMake ExternalProject Dependency Collisions
I am in the process of moving an existing C++ build system to CMake and I have a question regarding External Project dependencies.
The scenario is that we have two projects A and B.
Project A pulls ...
0
votes
1
answer
917
views
Build project from ExternalProject_Add using dockcross
I am trying to build tinyxml2 using ExternalProject_Add. It works fine on my main system (Arch Linux), but I have some issues when running it inside dockcross (more specifically, dockcross/linux-armv6)...
3
votes
1
answer
2k
views
CMake: How to build an external project using all cores on *nix systems?
I'm working on a CMake based project that has a dependency on a gigantic third party codebase that also uses CMake. I'm including the third party project via the ExternalProject_Add mechanism. That ...
1
vote
2
answers
3k
views
CMake: Build and install locally stored submodule
There are numerous similar questions on Stack Overflow, but none come near to answering my question.
I have a C++ library built using CMake:
mylib
| - CMakeLists.txt
| - src/
| | - m.h
| | - m....
1
vote
1
answer
5k
views
CMake - How can I pass the windows SDK version to an ExternalProject built with msbuild?
I have a CMake project which has an external dependency (Crypto++). The external project has a vcxproj file provided, so in order to add it to the build process, I added it like this:
...
0
votes
2
answers
435
views
CMake linking to external project
I am new to cmake and want to use the following external project in my program. (https://github.com/mfontanini/cppkafka)
The idea is to download from git and build using cmake, which I have managed ...
1
vote
0
answers
499
views
CMake External Project QT
I can not find any example on how to download, build and link Qt5 in a cmake project with the ExternalProject_Add command.
I found some snippets but they are in itself not very useful:
...
0
votes
1
answer
346
views
cmake3 external project add step loop
Currently I have External_Project_Add_Step to copy directory from "source dir" to "dest dir". Lately I have realized that I am copying around 4 GB for data in this process, while I would actually ...