I have a space separated string that represents include directories I'd like to add, let's call it ${MYSTRING}
, and let's say it contains the stringmy/dir1 my/dir2 my/dir3
.
Using:
include_directories(${MYSTRING})
Results in an incorrect makefile, as the CXX_FLAGS
that is added is:
-Imy/dir1 my/dir2 my/dir3
Rather than:
-Imy/dir1 -Imy/dir2 -Imy/dir3
Is there anyway I can work around this? the string is generated via an external command, and I'd rather not have to depend on external tools such as sed
.