iLCSoft / LCIO

Linear Collider I/O
BSD 3-Clause "New" or "Revised" License
17 stars 34 forks source link

Make sure to populat the include_dirs of the lcio target #180

Closed tmadlener closed 7 months ago

tmadlener commented 7 months ago

BEGINRELEASENOTES

ENDRELEASENOTES

This is a leftover from #177 that went undiscovered until now.

jmcarcell commented 7 months ago

Where was this an issue? I have built some packages using LCIO::lcio and didn't have issues

tmadlener commented 7 months ago

I stumbled over this when trying to build against only LCIO. I have the suspicion that this went unnoticed, because something else populated this on the fly and then things worked (e.g. DD4hep creates this target, which is why we never saw it in k4geo).

arummler commented 7 months ago

I was just now trying to change the way we consume lcio from shipping an old copy to FetchContent: https://github.com/eudaq/eudaq/issues/703 and stumbled over the same thing using the latest tag. Your commit partially resolves it as e.g. lcio.h is found linking just against the target LCIO::lcio but I believe it is not complete for in source builds. The include files under EVENT are not found:

[ 16%] Built target sio Consolidate compiler generated dependencies of target lcio [ 54%] Built target lcio [ 54%] Building CXX object main/lib/lcio/CMakeFiles/lcio_interface.dir/src/LCEventConverter.cc.o In file included from /home/rummler/Software/eudaq-master/main/lib/lcio/include/eudaq/LCEventConverter.hh:8, from /home/rummler/Software/eudaq-master/main/lib/lcio/src/LCEventConverter.cc:1: /home/rummler/Software/eudaq-master/build/_deps/extern_lcio-src/src/cpp/include/lcio.h:12:10: fatal error: EVENT/LCIO.h: No such file or directory 12 | #include "EVENT/LCIO.h" | ^~~~~~ compilation terminated. make[2]: [main/lib/lcio/CMakeFiles/lcio_interface.dir/build.make:76: main/lib/lcio/CMakeFiles/lcio_interface.dir/src/LCEventConverter.cc.o] Error 1 make[1]: [CMakeFiles/Makefile2:1692: main/lib/lcio/CMakeFiles/lcio_interface.dir/all] Error 2 make: *** [Makefile:146: all] Error 2