Closed stefi07 closed 2 months ago
Hi @stefi07 , thanks a lot for your contribution (I'll take a deeper look asap)! Can you clarify what is the intended goal? Faster, more modular install, or am I missing something?
Hi @DasVinch, thanks for considering my contribution.
The existing install procedure for milk creates a pkgconf dir with .pc files that allow pkg-conf
to retrieve information about the installed library. In a CMakeLists.txt file, however, this requires first to call find_package
on PkgConfig (i.e. including the line find_package(PkgConfig REQUIRED)
).
This PR (and the symmetrical one for ImageStreamIO) adds direct support for CMake’s find_package
(https://cmake.org/cmake/help/v3.0/command/find_package.html) by adding to the install procedure the creation of .cmake config files that are installed in a cmake dir (in the same parent dir as the pkgconf dir). With find_package
the library is included as an imported target, which makes it easier to manage dependencies downstream.
Looks good to me! Just holding on the ISIO PR.
Export all libraries to milkTargets.cmake, which gets installed in lib/cmake (following pkgconfig). Also create milk_all alias for a collective target that would include all libraries in client project. Generate milkConfigVersion.cmake and milkConfig.cmake, which are also installed in lib/cmake.