project_options
project_options copied to clipboard
`target_link_system_directories` dosen't support generator expressions that have semicolons
I used Ninja Multi-Config as the generator and linked a library that has multiple header directories (SDL2 using conan 2.0). That is,
lib="SDL2::SDL2";
lib_include_dirs="
$<$<CONFIG:Debug>:/Users/feignclaims/.conan2/p/sdl5ab8a88787389/p/include;/Users/feignclaims/.conan2/p/sdl5ab8a88787389/p/include/SDL2>;
$<$<CONFIG:Release>:/Users/feignclaims/.conan2/p/sdl88e5402c853dd/p/include;/Users/feignclaims/.conan2/p/sdl88e5402c853dd/p/include/SDL2>
"
Notice semicolons inside the generator expressions. When calling target_include_directories inside target_include_system_directories, the expression is split to the following during the loop, which is apparently not the expected behaviour.
"$<$<CONFIG:Debug>:/Users/feignclaims/.conan2/p/sdl5ab8a88787389/p/include"
"/Users/feignclaims/.conan2/p/sdl5ab8a88787389/p/include/SDL2>"
"$<$<CONFIG:Release>:/Users/feignclaims/.conan2/p/sdl88e5402c853dd/p/include"
"/Users/feignclaims/.conan2/p/sdl88e5402c853dd/p/include/SDL2>"
The solution might be to use a regex to split these expression. I haven't figured it out for now.
Upvote & Fund
-
I am using Polar.sh so you can upvote and help fund this issue. The funding is received once the issue is completed & confirmed by you.
-
Thank you in advance for helping prioritize & fund our backlog.