Closed agalbachicar closed 2 years ago
I enjoy seeing people improving the project. So yes, I highly appreciate PRs.
But since you put some work in preparing this issue, I want look deeper in what you did in order to be able to give a more valueable feedback. I will try to provide the feedback until the end of the week. However, since I am aware of the poor design of my CMake-scripts, which already got improved in https://github.com/xR3b0rn/dbcppp/pull/93 , the odds are very good that I will accept your PR.
Not much to say. I will accept your PR.
Thanks!
Accepted and merged in #97
This issue can be seen as a follow up of #92
I think package configuration can be improved by using
target_include_directories
withlibdbcppp
and make it point to the base header file path in the install space.In particular, when taking a look at this header file inclusion, it allows to build the library and other targets because of similar usage for the targets under that CMakeLists.txt file but fails to properly export them. Consequently, when doing
find_package(libdbcppp REQUIRED)
it fails to find the path the header files if instead of using globalinclude_directories()
calls, one uses:It is worth noting that I am working in a
colcon
workspace (see here) and using its tools because this is part of a larger robotics project.Find below the key difference between the exported cmake configuration files:
install_space/libdbcppp/lib/cmake/libdbcppp/libdbcpppTargets.cmake
set_target_properties(libdbcppp PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX}/include/" INTERFACE_LINK_LIBRARIES "libxmlmm" ) [...]