mirror of
https://github.com/microsoft/regorus.git
synced 2026-08-05 02:16:11 +00:00
Make the bindings/cpp CMake project installable (#416)
This leverages the still-undocumented `corrosion_install` to get an installable ffi binding that can be consumed by other projects, e.g. from yocto: ``` $ ninja install [4/5] Install the project... -- Install configuration: "Debug" -- Up-to-date: /home/milian/projects/compiled/regorus-test/lib/libregorus_ffi.so -- Up-to-date: /home/milian/projects/compiled/regorus-test/include/regorus_ffi/regorus.hpp -- Up-to-date: /home/milian/projects/compiled/regorus-test/include/regorus_ffi/regorus.ffi.hpp -- Up-to-date: /home/milian/projects/compiled/regorus-test/lib/cmake/regorus_ffi/regorus_ffi_targets.cmake -- Up-to-date: /home/milian/projects/compiled/regorus-test/lib/cmake/regorus_ffi/regorus_ffiConfig.cmake -- Up-to-date: /home/milian/projects/compiled/regorus-test/lib/cmake/regorus_ffi/regorus_ffiCorrosion.cmake ``` This can then be consumed as such: ``` find_package(regorus_ffi CONFIG REQUIRED) add_executable(test test.cpp) target_link_libraries(test PRIVATE regorus_ffi::regorus_ffi) ```
This commit is contained in:
3
bindings/cpp/regorus_ffiConfig.cmake.in
Normal file
3
bindings/cpp/regorus_ffiConfig.cmake.in
Normal file
@@ -0,0 +1,3 @@
|
||||
@PACKAGE_INIT@
|
||||
include("${CMAKE_CURRENT_LIST_DIR}/regorus_ffi_targets.cmake")
|
||||
include("${CMAKE_CURRENT_LIST_DIR}/regorus_ffiCorrosion.cmake")
|
||||
Reference in New Issue
Block a user