sol2
sol2 copied to clipboard
[v4] the cmake target lost sol2:: prefix
A user of existing sol 3.2.3 uses the library like this:
find_package(sol2 CONFIG REQUIRED)
target_link_libraries(foo PRIVATE sol2::sol2)
But it doesn't work anymore in v4 because the sol2:: prefix got lost in the installed target.
Looks like this was removed from CMakeLists.txt
set_target_properties(sol2
PROPERTIES
EXPORT_NAME sol2::sol2)
Though the recommended way to achieve the same is
install(EXPORT sol2 NAMESPACE sol2::)
(currently https://github.com/ThePhD/sol2/blob/50b62c9346750b7c2c406c9e4c546f96b0bf021d/CMakeLists.txt#L118-L120 is callled without NAMESPACE either)
ping: this issue already went into the 3.3.0 release
This should be completed. Thanks for the PR.