I have my own code, which depends on third-party libraries, for example, yaml-cpp. I want to download these third-party libraries before compiling my own sources. However, I am unable to do this with CMake.
I managed to load yaml-cpp as follows:
ExternalProject_Add(yaml-cpp
URL https:
PREFIX ${CMAKE_CURRENT_BINARY_DIR}/yaml-cpp
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX:PATH=<INSTALL_DIR>
But when I type
cmake ..
make
my sources are compiled earlier. In fact, yaml-cpp loads in the last step.
Do you know how to tell CMake to load third-party libraries in the first stage of construction?
Thank!
source
share