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 project, untill external project install is done, application will not start building up.
Logically Application can start building once third party project is downloaded and header files are available. To Achieve the same, I can have a step which depends on configure/download
ExternalProject_Add_Step(CopyHeaderFileStep DEPENDS configure)
However since it is just a step, not target, I am not able to specify dependecy of CopyHeaderFileStep in my application CMake.
I looked upon cmake third party documentation throughtly but no help. Is there any way out here ?
Exactly for that purpose there is a function
ExternalProject_Add_StepTargets
, which creates normal CMake targets for the steps of the ExternalProject. From documentation:Example: