Open KerstinKeller opened 1 year ago
Thank you. Sure, if you have a PR ready, I would integrate this. I don't know all CMake details, so every input is welcome. Please note that we currently can only use CMake up to 3.10 (preferably a bit lower) because of the packaging for old distributions.
When you build and install
libde265
with CMake, you cannot properly use the library after usingtarget_link_libraries
, because the include directories are not propagated properly.The reason is this line: https://github.com/strukturag/libde265/blob/0b1752abff97cb542941d317a0d18aa50cb199b1/libde265/CMakeLists.txt#L132
You also need to state where the header files can be found in the installed case, for an example like this: https://github.com/eclipse-ecal/tcp_pubsub/blob/4ceafb6b55ce41149ed9473dae7e8ea37235a3cc/tcp_pubsub/CMakeLists.txt#L96-L103
Sample CMakeLists.txt file to use libde265:
Building a sample then fails:
Would you accept a PR to address this issue? At the same time I would recommend to export targets into a namespace so they can be linked with
libde265::libde265
, to make clear to CMake that this target is imported and then it gets better diagnostics if it cannot be found.