forked from mathieu/osgQt
-
Notifications
You must be signed in to change notification settings - Fork 111
export target osg-qt::osgQOpenGL to cmake #63
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
Open
yanzixiang
wants to merge
6
commits into
openscenegraph:master
Choose a base branch
from
yanzixiang:cmake-target
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
62bdcca
export target osg-qt::osgQOpenGL to cmake
yanzixiang 2afd77a
Export Target fixes for transitive properties: Include directory now …
emminizer bfa769f
CMakeLists: Use GNUInstallDirs to fix Linux duplication issue of lib6…
emminizer 3666058
Merge pull request #1 from emminizer/cmake-transitive-target
yanzixiang 9954ba6
Update osgQOpenGLConfig.cmake.in
yanzixiang a204392
Update osgQOpenGLConfig.cmake.in
yanzixiang File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
if(TARGET osg-qt::osgQOpenGL) | ||
set(_OSGQOPENGL_ALREADY_DEFINED ON) | ||
endif() | ||
|
||
include(CMakeFindDependencyMacro) | ||
|
||
find_dependency(Qt5 COMPONENTS Widgets OpenGL) | ||
# Instead of checking OPENSCENEGRAPH_LIBRARIES, check osgViewer and osgUtil specifically | ||
if(NOT DEFINED OSGUTIL_LIBRARIES OR NOT DEFINED OSGVIEWER_LIBRARIES OR NOT DEFINED OPENSCENEGRAPH_INCLUDE_DIRS) | ||
find_dependency(OpenSceneGraph COMPONENTS osgUtil osgViewer) | ||
endif() | ||
|
||
include("${CMAKE_CURRENT_LIST_DIR}/osg-qtTargets.cmake") | ||
|
||
if(NOT _OSGQOPENGL_ALREADY_DEFINED) | ||
# Replace the interface link libraries with those found by OSG, to allow this to be more easily relocatable. | ||
# Without this, absolute paths to OSG are stored in the target, making the output library non-relocatable | ||
# to other machines unless they have OSG in the exact same location. | ||
set_target_properties(osg-qt::osgQOpenGL PROPERTIES INTERFACE_LINK_LIBRARIES "Qt5::Widgets;Qt5::OpenGL") | ||
target_link_libraries(osg-qt::osgQOpenGL INTERFACE ${OPENSCENEGRAPH_LIBRARIES}) | ||
target_include_directories(osg-qt::osgQOpenGL INTERFACE ${OPENSCENEGRAPH_INCLUDE_DIRS}) | ||
endif() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
osg-qt provides CMake targets: | ||
|
||
find_package(osg-qt REQUIRED) | ||
target_link_libraries(main PRIVATE osg-qt::osgQOpenGL) |
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.
Uh oh!
There was an error while loading. Please reload this page.