M
M
Mars362021-10-02 17:13:06
CMake
Mars36, 2021-10-02 17:13:06

How to correctly build several ExternalProjects in cmake if there is a dependency between them?

There are three dependencies, two of them are dependencies for the third one. Dependencies are built using ExternalProject. The first two dependencies consist of ready-made libs that need to be unpacked into the folder of the third dependency, and at the time the build of the third dependency begins, the first two should already be present in the desired folder. But when the queue reaches the third dependency, the folder is cleared, respectively, removing ready-made dependencies, which causes the build to fail. Tried adding PRE_BUILD steps but it didn't help. I also indicated DEPENDS inside the ExternalProject of the third dependency, tried manually additionally copying the files (copy_directory) to the folder with the third one, but this also did not help.

How can I fix this?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question