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
0
votes
0 answers

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 gdal and boost_filesystem and…
WaterFox
  • 850
  • 6
  • 18
0
votes
0 answers

Adding CFLAGS="-std=gnu90" to CMakeLists.txt creates error that the file "-std=gnu90" is not found

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 C version causes an error stating that the file…
Bob R
  • 605
  • 1
  • 13
  • 25
0
votes
1 answer

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 manager (BLAS, LAPACK and Suitesparse). If I build…
Ebatsin
  • 552
  • 5
  • 17
0
votes
0 answers

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 in googletest as an external project with the below…
miles.sherman
  • 171
  • 3
  • 11
0
votes
1 answer

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). The following minimal CMakeLists.txt works…
JonasVautherin
  • 7,297
  • 6
  • 49
  • 95
0
votes
2 answers

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 already. At the end of it, I am left with a .so…
saiftyfirst
  • 111
  • 2
  • 7
0
votes
1 answer

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 need to copy selective files ( many files but total…
ekchom
  • 113
  • 13
0
votes
1 answer

cmake third party step dependency

We are using a vendor code as third party project in our source code. This party project is hosted on different server. Our application needs to include header file from third party project. So far, application cmake has dependecy on external…
ekchom
  • 113
  • 13
0
votes
1 answer

How do I export a target, then use it in another project via ExternalProject?

I have a CMake project named proj1, which I want to use as an external project in another project, proj2. Now, the (relevant) command in proj1's CMakeLists.txt is: install( TARGETS proj1 ARCHIVE DESTINATION lib EXPORT proj1_library …
einpoklum
  • 118,144
  • 57
  • 340
  • 684
0
votes
1 answer

CMake ExternalProject_Add() that uses a parent folder in its include_directories()

I have an 'int_tester' CMake project that makes use of ExternalProject_Add for its 'drv' dependency. Now, this 'drv' is also built using CMake, and it uses a parent directory in its include_directories(). Trouble is that I do not know how to copy…
0
votes
1 answer

Link imported libraries to CMake ExternalProject

I'm trying to create a superbuild to compile the dependencies (zlib, nifticlib and boost) and then compile my project, depending on all these libraries. Here is my CMakeLists: cmake_minimum_required(VERSION…
whiteShadow
  • 369
  • 4
  • 19
0
votes
1 answer

code builds cleanly with cmake, fails when added as an external project

Question summary. I have a project A that I build using CMake, which compiles cleanly. However, when I pull A into another project B using CMake's ExternalProject_Add command, compilation fails when it reaches the point of building A. The kind of…
dow
  • 513
  • 2
  • 5
  • 16
0
votes
1 answer

ExternalProject_add: Some files are not copied with INSTALL_COMMAND

We have an external project we want to fetch using cmake using ExternalProject_add. Let's say the external project has a structure: External_Project ├── myClass.hpp ├── myClass.cpp ├── userOfClass.hpp ├── userOfClass.cpp We're fetching…
0
votes
2 answers

CMake Link error 1 using ExternalProject_Add

I recently switched the build system of my C++ project to CMake. I am trying to use the ExternalProject_Add function to download the required libraries(there are currently 3 of them, GLM and TINYOBJ are static and GLFW can be either static or…
VERT9x
  • 372
  • 2
  • 13
0
votes
1 answer

Cmake ExternalProject Installer

I have an external project where the windows distribution is an .exe installer rather than a tarball. I could run the .exe from the command line, but cmake of course complains that it can't find a tarball filename in the URL. Is there some way to…
Jeff M
  • 2,492
  • 3
  • 22
  • 38