rnp icon indicating copy to clipboard operation
rnp copied to clipboard

CI: RNP CMake/CPack scripts export dependencies on the privately defined entities

Open maxirmx opened this issue 1 year ago • 0 comments

RNP CMake/CPack scripts export dependencies on INTERFACE_LINK_LIBRARIES JSON-C::JSON-C and Botan2::Botan2 targets that are valid only within the scope of RNP CI scripts and are not supported by json-c and botan2 packages

Prcatically it means that CI script using standard CMake directive find_package(rnp) must emulate rnp development environment with quite unusual aliasing like:

        pkg_check_modules(JSONC IMPORTED_TARGET json-c12)
        if(NOT JSONC_FOUND)
            pkg_check_modules(JSONC REQUIRED IMPORTED_TARGET json-c)
        endif(NOT JSONC_FOUND)

        add_library(JSON-C::JSON-C INTERFACE IMPORTED)
        set_target_properties(JSON-C::JSON-C PROPERTIES INTERFACE_LINK_LIBRARIES PkgConfig::JSONC)

        pkg_check_modules(Botan REQUIRED IMPORTED_TARGET botan-2)
        add_library(Botan2::Botan2  INTERFACE IMPORTED)
        set_target_properties(Botan2::Botan2 PROPERTIES INTERFACE_LINK_LIBRARIES PkgConfig::Botan)

maxirmx avatar Mar 15 '23 20:03 maxirmx