I need to exclude a file when installing directory in CMake if the condition is met. So I need something like this:
install(
DIRECTORY include
COMPONENT dev
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
PATTERN $<$<NOT:$<STREQUAL:${MY_VAR},SOME_VALUE>>:my_header.h> EXCLUDE
)
But unfortunately it doesn't work