I have a CMakeLists.txt file in which there are multiple external projects I need to build. I am using the ExternalProject_Add feature of CMake.
I need to set an environment variable in one of the ExternalProject_Add project modules. The project needs it to perform a build.
I have tried using the ${CMAKE_COMMAND} -E env option and that has not worked:
CONFIGURE_COMMAND
${CMAKE_COMMAND} -E env ANDROID_SDK_ROOT="/home/subbu/Android/Sdk"
${CMAKE_COMMAND} -E env ANDROID_API_VERSION="android-22"
<SOURCE_DIR>/configure
-prefix <INSTALL_DIR>
-debug
I am not able to find examples on the web.
Please advise.
Thanks for your help in advance.
Subbu