Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow "development" installation/packaging with headers, OVM, and required CMake metadata #66

Open
mhthies opened this issue Aug 24, 2021 · 3 comments

Comments

@mhthies
Copy link
Collaborator

mhthies commented Aug 24, 2021

A limitation of the new CMake build system is that custom OV libraries must only be build in a CMake project together with the OV core libraries. (Or, as an alternative, the OV core project has been built before on the same machine and its build tree is included via CMake's find_package().) This limitation is caused by the mechanism for automatic generation of the .ovm include paths for ov_codegen, which relies on CMake build metadata (a custom CMake PROPERTY "OV_MODEL_INCLUDE_DIRECTORIES" on every OV library target).

It would be convenient, if we could use make install (based on CMake's INSTALL() commands) to install OV to a system directory (or package the install tree into a software package for installation – see #63), including all .ovm and header files and the exported CMake build metadata to allow including the installed artifacts into custom OV library projects via find_package().

This would require that the exported CMake metadata is adapted to the install path of the artifiacts – as compared to the build path. For CMake's internal properties, such as INCLUDE_DIRECTORIES, this is possible via the $<INSTALL_INTERFACE:...> generator expressions. However, generator expressions are not supported for custom CMake properties (see CMake Documentation on EXPORT_PROPERTIES). Asking for help on Stackoverflow didn't give me any clues how to solve this: https://stackoverflow.com/questions/58432845

@bjoernhoeper
Copy link

Maybe you want to take a look at vcpkg (https://github.com/microsoft/vcpkg). In my opinion it is one of the best possibilities to make prebuilt libraries and headers available. If you need some pointers on how to get started you can reach out to me.

@mhthies
Copy link
Collaborator Author

mhthies commented Aug 24, 2021

Maybe you want to take a look at vcpkg (https://github.com/microsoft/vcpkg).

As far as I understand the concept, packaging with vcpkg would be yet another task/issue. This issue here is more about making the CMake properties used for ov_codegen "portable", so compiling libraries with a packaged/installed OV core works in general. Depending on the way how CMake artifacts are handled in vcpkg packages, using vcpkg may even require this issue to be solved first.

@bjoernhoeper
Copy link

I agree that it is an additional step / task. The rationale behind my comment thou was that it may be beneficial to directly keep the approach for packaging up the libraries in mind. From my experience packaging the base libraries is of great benefit especially when working with different versions and also it greatly reduces the amount of work that needs to be done to set up a development environmen on different platforms.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants