Update CMakeLists Targets for integration #1227
Open
+40
−4
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I have just added some configuration in the
src/CMakeLists.txt
file to get a more user-friendly integration when using the API in other applications. The modifications are :INCLUDE_DIR
as a variable, depending on the CMake usage (BUILD/INSTALL)EXPORT
parameter oninstall
command to generateOpenVRTargets.cmake
OpenVRConfig.cmake
, including itself the generatedOpenVRTargets.cmake
fileBuild:
Output:
Integration:
Notes
FindOpenVR.cmake
file anymore.OpenVRConfig.cmake
instead of directly have the generated content in the file is for extensibility purposes, we can always overwrite things made by CMake.openvr_api
can break things in the workflow. It seems to be a huge change, but it makes life easier during integration, as the API has the same name, no matter the platform. Also in your distribution, the library for WIndows 64bits is not namedopenvr_api64
butopenvr_api
(see inlib/win64
andbin/win64
folder).I am of course open to any change if you have better ideas to get a successful merge.