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
1
vote
1 answer

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 = ${SOURCE_DIR}") How would I save this to another…
CiaranWelsh
  • 7,014
  • 10
  • 53
  • 106
1
vote
2 answers

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.cpp | - include/ | | - mylib/ | | | - a.h | …
patyx
  • 324
  • 1
  • 3
  • 17
1
vote
1 answer

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: ExternalProject_Add(CryptoPP SOURCE_DIR ${CRYPTOPP_SRC_DIR} …
Tibi
  • 4,015
  • 8
  • 40
  • 64
1
vote
0 answers

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: ExternalProject_Add(qt5_build DOWNLOAD_COMMAND "" UPDATE_COMMAND…
Captain GouLash
  • 1,257
  • 3
  • 20
  • 33
1
vote
1 answer

cmake third party project step

We are using a vendor code as third party project in our source code. The Vendor code uses Makefile, for which we wrote new CMake add_custom_target for vendor source code. To copy library from vendor specific build/lib dir to Our CMAKE…
ekchom
  • 113
  • 13
1
vote
0 answers

CMAKE ExternalProject_Add (How to specify search path for plugin)

I'm using a Ubuntu 16.04 and CMake's ExternalProject_Add to install both the software PCL and PDAL for my own project. I want to link PDAL and PCL as PDAL have an option to build PCL as an plugin. Basically my CMake script for PCL will execute…
Denzel
  • 358
  • 5
  • 19
1
vote
2 answers

How Do I Flatten A CMake Superbuild?

While arduously learning how to make CMake do what I need in Visual Studio for a cross-platform project, I learned about ExternalProject_Add and it solved all my needs beautifully. Excerpt: ExternalProject_Add(googletest PREFIX…
Brent
  • 4,153
  • 4
  • 30
  • 63
1
vote
1 answer

Share ExternalProject between multiple projects in CMake

I would like to share an ExternalProject between different CMake projects. Imagine a structure like the following: prj1 |- CMakeLists.txt |- ... prj2 |- CMakeLists.txt |- ... lib |- ext |- gtest |- CMakeLists.txt |- googletest |_…
mydriasis
  • 71
  • 1
  • 6
1
vote
2 answers

CMake & ExternalProject: Fails to find specific file

We have some dependency libraries in our repository. The main part is build with cmake. Now the cmake-makefiles shall build the dependency libraries, which do not have a cmake build system. For one specific library there is a "Makefile.squirrel"…
Enrico
  • 61
  • 5
1
vote
1 answer

Multiple Cmake_Prefix_Paths from ExternalProject

So, if I'm running cmake from the command line... cmake .. "-DCMAKE_PREFIX_PATH=path1;path2" This works fine. But if I try to do the same thing from a cmake-based ExternalProject... ExternalProject_Add( epname URL https://some.url …
Jeff M
  • 2,492
  • 3
  • 22
  • 38
1
vote
2 answers

Using cmake as the configure tool (CONFIGURE_COMMAND) in CMakes "Add_External_Project" function

I am having an issue with CMakes Add_External_Project functionality (more of an annoyance than anything else). Specifically, I do not understand the keys CONFIGURE_COMMAND, BUILD_COMMAND and INSTALL_COMMAND. In the following (working) example, which…
Sigve Karolius
  • 1,356
  • 10
  • 26
1
vote
1 answer

cmake : use ExternalProject_Add and specify the output folder

I'm currently using one CMakeLists.txt file that will execute an external CMakeLists.txt (and dependency). For this I use the ExternalProject_Add command, but I can't find a way to specify where the ".sln" file will be generated. Here is the command…
CDZ
  • 813
  • 1
  • 11
  • 27
1
vote
0 answers

CMake ExternalProject GIT_REPOSITORY Failed to unstash changes

I'm trying to use CMake v3.7's ExternalProject to clone the GSL git repo, but it's failing with the error "Failed to unstash changes". Does anyone know what's happening? Am I doing something wrong? Is CMake or GSL doing something…
Jeff M
  • 2,492
  • 3
  • 22
  • 38
1
vote
2 answers

CMake ExternalProject_add with CMakeLists on subfolder

I'm trying to download and build DevIL with an ExternalProject_Add command, from cmake, but for some reason, the git repo has the CMakeLists.txt file inside a subfolder of the project. I can't seem to find a way to make ExternalProject_add to invoke…
Joao Pincho
  • 939
  • 2
  • 11
  • 26
0
votes
0 answers

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 download and build the library without any…
xarxarx
  • 21
  • 5