imported cmake target does not contain include directory
envgap__zeux__pugixml-126
01 / FAILURE SIGNATURE
As reported upstream
No identifying execution failure has been captured.
Not a benchmark task.
- The project already builds and runs before the fix, so there is nothing to repair.
02 / ENVIRONMENT RECIPE
- Base commit
05edb250ee309400ddcbc287a98d2e83004ca8b2- Manifest
CMakeLists.txt- Reproduce
Awaiting issue-specific recipe- Run under trace
Awaiting a meaningful runtime command
03 / ORIGINAL ISSUE TEXT
zeux/pugixml #126 · read the original issue
Instead of just linking pugixml in a using CMakeLists.txt File by
`target_link_libraries(myExe pugixml)`
I addtionally have to set the include path of pugixml
`target_include_directories(myExe ${pathtopugiinclude})`, which (pathtopugiinclude) I have to manually set (it can be derived from Imported_location, but that is tedious)
If the following line:
`target_include_directories(pugixml $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}${INSTALL_SUFFIX}>)`
was added in the CMakeLists.txt around line 58 before
`install(EXPORT pugixml-config DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/pugixml)`
and after
`if(BUILD_PKGCONFIG)
# Install library into its own directory under LIBDIR
set(INSTALL_SUFFIX /pugixml-${PUGIXML_VERSION_STRING})
endif()`
Now `target_link_libraries(myExe pugixml)` would be enough....
tested with pugixml 1.7 and 1.8 relases04 / LABELS
Labels from the report text only; not yet run
No supported category has been assigned.
Label rules and the text that matched
[]