I can post a longer example of this issue if needed but I wanted to see if what I am doing is just not expected to work. I have a CMakeLists.txt
like
target_sources(HelloWorld PUBLIC
FILE_SET generated_export_headers
TYPE HEADERS
BASE_DIRS
$<BUILD_INTERFACE:${CMAKE_BINARY_DIR}/HelloWorld>
$<INSTALL_INTERFACE:${CMAKE_BINARY_DIR}>
FILES ${CMAKE_BINARY_DIR}/HelloWorld/helloworld_export.h)
When I use this it seems whatever I do the BUILD_INTERFACE
is used in the install step. That is the install happens in the root install include directory never in a subdirectory called “HelloWorld” which is what I would have expected.
I assume I am doing something very dumb but in my defense BASE_DIRS
is barley documented at all.
So should I expect generator expressions to work in BASE_DIRS
?