Generator expression support for INSTALL_DIR in ExternalProject_Add
Hello,
I discovered that if I do something like this:
if(NOT "${CMAKE_BUILD_TYPE}" STREQUAL "")
set(install_path "C:/my/proj/prefix/${CMAKE_BUILD_TYPE}")
else()
set(install_path "C:/my/proj/prefix/$<$<NOT:$<CONFIG:Debug>>:Release>$<$<CONFIG:Debug>:Debug>")
endif()
ExternalProject_Add(
PREFIX C:/my/proj/prefix
INSTALL_DIR "${install_path}"
CMAKE_ARGS
-DCMAKE_INSTALL_PREFIX="${install_path}"
)
CMake configuration fails saying it cannot create the install directory. Will it be possible to support generator expression for the _DIR params passed to ExternalProject_Add, because I definitely need to use generator expression on Windows/MSVC for the install path during configuration. I am also considering to ignore the INSTALL_DIR when using generator expression. When I use Visual Studios with CMake Tools, I have no issues, but I think it is possibly because in this mode, ${CMAKE_BUILD_TOOLS} is not empty.
Thanks in advance for any help.
Abhishek