Questions tagged [external-project]

CMake's support for obtaining, building and installation of projects distinct from the one currently being processed.

The build management tool CMake supports obtaining, building and installing projects - distinct and separate from the current one it is processing - using the ExternalProjcect() command.

Use this tag for questions regarding this feature.

106 questions
7
votes
3 answers

CMake ExternalProject_Add Git

I have a git-bare-repository on my desktop and I would like to clone it with CMake. My repository has this path C:\Users\demoUser\Desktop\learnGIT\prog. My CMakeLists.txt looks like this: cmake_minimum_required(VERSION…
user3841904
  • 71
  • 1
  • 1
  • 4
7
votes
2 answers

When does ExternalProject_Add build?

I want to build openssl and link my project against it. In my project, I have a library called net which is the part that uses openssl. So in my net\CMakeList, I added include_directories( ../ + ../../../ext/openssl/inc32/ ) add_library(net…
Jerry
  • 1,704
  • 5
  • 20
  • 40
6
votes
1 answer

Use ExternalProject_Add to include Opus in Android

This is probably quite simple. I have an Android project that uses NDK. I will like to include the opus source code in the native code. I have tried using the ExternalProject_Add property of CMake but my native code still cannot import headers from…
Korogba
  • 105
  • 9
6
votes
1 answer

CMake: GLFW as ExternalProject

Issue I am trying to make a project that uses GLFW. For this project I am using CMake as a build system. I would like to make it so the user just has to build my project with CMake, and as part of the process GLFW will get built and linked…
Noah Huppert
  • 4,028
  • 6
  • 36
  • 58
5
votes
1 answer

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 things like this: cmake_minimum_required(VERSION…
Ondřej Navrátil
  • 453
  • 1
  • 4
  • 11
5
votes
3 answers

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 want to write a custom DOWNLOAD_COMMAND. Basically…
5
votes
1 answer

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 for the best way to do it. I've settled on using…
CiaranWelsh
  • 7,014
  • 10
  • 53
  • 106
5
votes
2 answers

CMake error with ExternalProject

Two days ago, I added an External Project to compile a project using autotools. It was perfectly working until today... I have a weird error: CMake Error at /usr/share/cmake-2.8/Modules/ExternalProject.cmake:710 (message): error: no download…
Julio Guerra
  • 5,523
  • 9
  • 51
  • 75
5
votes
2 answers

How do i use add_subdirectory() after ExternalProject_Add() has finished downloading?

I basically ask the same question as has been ask here. The question has however not been answered. I want to use googletest in my project. For this I'm using ExternalProject_Add() which clones the testsuite with git. After that, I like to use…
dani
  • 3,677
  • 4
  • 26
  • 60
5
votes
1 answer

Passing CMake Variables to ExternalProject_Add

I'm building an external library using CMake with ExternalProject_Add. I've used the answer here to generate the following (which captures command line input to CMake in order to pass it to the ExternalProject_Add…
sklum
  • 537
  • 1
  • 6
  • 13
5
votes
2 answers

ExternalProject_Add doesn't install the Release configuration of the project

EDIT: I have found a probable cause but I do not understand why: the last line in the below script Project(Externals) when removed fixes my issue. So the question now why?? cmake_minimum_required(VERSION…
Ed Rowlett-Barbu
  • 1,611
  • 10
  • 27
4
votes
1 answer

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 property that is set in my project to be forwarded…
harish
  • 1,836
  • 3
  • 21
  • 26
4
votes
1 answer

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 simple test project using Ninja, CMake and Clang. I am…
Timo
  • 81
  • 1
  • 7
4
votes
1 answer

using autogen.sh with ExternalProject_Add

I try to set ExternalProject_Add in CMakeLists.txt, for doing this I found this question : What is the correct usage of CMake EXTERNALPROJECT_ADD with a Git repository? But I have an issue, I can't call CONFIGURE_COMMAND configure, because I have to…
The Unholy Metal Machine
  • 1,093
  • 2
  • 17
  • 36
4
votes
2 answers

Strange behaviour of ExternalProject_Add with a command containing a space

I need to compile boost libraries with ExternalProject_Add, and the build command needs c++11 flags on MacOS platform with Clang. The command should look like this: ./bin/b2 debug release cxxflags="-std=c++11 -stdlib=libc++"…
watson
  • 395
  • 1
  • 5
  • 14