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

update osg-qt from Qt4 tag to master branch(Qt5) #14761

Merged
merged 8 commits into from
Apr 29, 2021
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions ports/osg-qt/CMakeLists.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
diff --git a/src/osgQOpenGL/CMakeLists.txt b/src/osgQOpenGL/CMakeLists.txt
--- a/src/osgQOpenGL/CMakeLists.txt
+++ b/src/osgQOpenGL/CMakeLists.txt
@@ -14,7 +14,11 @@
${HEADER_PATH}/OSGRenderer
)

- qt5_wrap_cpp(SOURCES_H_MOC ${SOURCE_H} #[[OPTIONS ${MOC_OPTIONS}]])
+ FOREACH(HEADER_FILE ${SOURCE_H})
+ get_filename_component(HEADER_FILE_NAME "${CMAKE_CURRENT_LIST_DIR}/${HEADER_FILE}" NAME)
+ qt5_wrap_cpp(HEADER_FILE_MOC ${HEADER_FILE} OPTIONS "-f<osgQOpenGL/${HEADER_FILE_NAME}>")
+ LIST(APPEND SOURCES_H_MOC ${HEADER_FILE_MOC})
+ ENDFOREACH()

SET(TARGET_H
${SOURCE_H}
7 changes: 3 additions & 4 deletions ports/osg-qt/CONTROL
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
Source: osg-qt
Version: Qt4
Port-Version: 3
Description: osgQt - Qt project for making use of OpenSceneGraph(OSG)
Build-Depends: osg, protobuf, qt5-base[core]
Version: Qt5
Description: osgQt - Qt project for making use of OpenSceneGraph(OSG)
Build-Depends: osg, protobuf, qt5-base[core]
4 changes: 2 additions & 2 deletions ports/osg-qt/OsgMacroUtils.patch
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
--- a/CMakeModules/OsgMacroUtils.cmake
+++ b/CMakeModules/OsgMacroUtils.cmake
@@ -88,7 +88,7 @@ MACRO(LINK_CORELIB_DEFAULT CORELIB_NAME)
@@ -92,7 +92,7 @@ MACRO(LINK_CORELIB_DEFAULT CORELIB_NAME)
ENDIF()

LINK_EXTERNAL(${CORELIB_NAME} ${ALL_GL_LIBRARIES})
- LINK_WITH_VARIABLES(${CORELIB_NAME} OPENTHREADS_LIBRARY)
+ #LINK_WITH_VARIABLES(${CORELIB_NAME} OPENTHREADS_LIBRARY)
Expand Down
16 changes: 8 additions & 8 deletions ports/osg-qt/fix-static-install.patch
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,24 @@ diff --git a/CMakeModules/ModuleInstall.cmake b/CMakeModules/ModuleInstall.cmake
index eb26ba2..14b8bca 100644
--- a/CMakeModules/ModuleInstall.cmake
+++ b/CMakeModules/ModuleInstall.cmake
@@ -40,10 +40,10 @@ INSTALL(
@@ -40,10 +40,10 @@
ARCHIVE DESTINATION ${INSTALL_ARCHIVEDIR} COMPONENT libopenscenegraph-dev
)

-IF(MSVC AND NOT CMAKE_BUILD_TYPE STREQUAL "Release")
+IF(MSVC AND NOT CMAKE_BUILD_TYPE STREQUAL "Release" AND DYNAMIC_OPENSCENEGRAPH)
GET_TARGET_PROPERTY(PREFIX ${LIB_NAME} PREFIX)
INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/${PREFIX}${LIB_NAME}${CMAKE_BUILD_POSTFIX}.pdb DESTINATION ${INSTALL_BINDIR} COMPONENT libopenscenegraph)
-ENDIF(MSVC AND NOT CMAKE_BUILD_TYPE STREQUAL "Release")
+ENDIF(MSVC AND NOT CMAKE_BUILD_TYPE STREQUAL "Release" AND DYNAMIC_OPENSCENEGRAPH)

IF(NOT OSG_COMPILE_FRAMEWORKS)
INSTALL (
diff --git a/CMakeModules/OsgMacroUtils.cmake b/CMakeModules/OsgMacroUtils.cmake
index 5688f8f..329f862 100644
--- a/CMakeModules/OsgMacroUtils.cmake
+++ b/CMakeModules/OsgMacroUtils.cmake
@@ -327,9 +327,9 @@ MACRO(SETUP_PLUGIN PLUGIN_NAME)
@@ -333,9 +333,9 @@ MACRO(SETUP_PLUGIN PLUGIN_NAME)
RUNTIME DESTINATION bin COMPONENT ${PACKAGE_COMPONENT}
ARCHIVE DESTINATION lib/${OSG_PLUGINS} COMPONENT libopenscenegraph-dev
LIBRARY DESTINATION bin/${OSG_PLUGINS} COMPONENT ${PACKAGE_COMPONENT})
Expand All @@ -31,7 +31,7 @@ index 5688f8f..329f862 100644
ELSE(WIN32)
INSTALL(TARGETS ${TARGET_TARGETNAME}
RUNTIME DESTINATION bin COMPONENT ${PACKAGE_COMPONENT}
@@ -432,9 +432,9 @@ MACRO(SETUP_APPLICATION APPLICATION_NAME)
@@ -436,9 +436,9 @@ MACRO(SETUP_APPLICATION APPLICATION_NAME)
INSTALL(TARGETS ${TARGET_TARGETNAME} RUNTIME DESTINATION bin BUNDLE DESTINATION bin)
ELSE(APPLE)
INSTALL(TARGETS ${TARGET_TARGETNAME} RUNTIME DESTINATION bin COMPONENT openscenegraph )
Expand All @@ -41,9 +41,9 @@ index 5688f8f..329f862 100644
- ENDIF(MSVC AND NOT CMAKE_BUILD_TYPE STREQUAL "Release")
+ ENDIF(MSVC AND NOT CMAKE_BUILD_TYPE STREQUAL "Release" AND DYNAMIC_OPENSCENEGRAPH)
ENDIF(APPLE)

ENDMACRO(SETUP_APPLICATION)
@@ -464,9 +464,9 @@ MACRO(SETUP_EXAMPLE EXAMPLE_NAME)
@@ -468,9 +468,9 @@ MACRO(SETUP_EXAMPLE EXAMPLE_NAME)
INSTALL(TARGETS ${TARGET_TARGETNAME} RUNTIME DESTINATION share/OpenSceneGraph/bin BUNDLE DESTINATION share/OpenSceneGraph/bin )
ELSE(APPLE)
INSTALL(TARGETS ${TARGET_TARGETNAME} RUNTIME DESTINATION share/OpenSceneGraph/bin COMPONENT openscenegraph-examples )
Expand All @@ -53,5 +53,5 @@ index 5688f8f..329f862 100644
- ENDIF(MSVC AND NOT CMAKE_BUILD_TYPE STREQUAL "Release")
+ ENDIF(MSVC AND NOT CMAKE_BUILD_TYPE STREQUAL "Release" AND DYNAMIC_OPENSCENEGRAPH)
ENDIF(APPLE)

ENDMACRO(SETUP_EXAMPLE)
7 changes: 4 additions & 3 deletions ports/osg-qt/portfile.cmake
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO openscenegraph/osgQt
REF Qt4
SHA512 426a4ba88f680978d24817248b99c68cafa4517144e6e3d2480612870c4a224bb955539cacb438274d4ee1c93c36d94f8437d142070b2ecde2b81517bf357e71
REF 2cb70673a4e83a618290e7ee66d52402a94ec3f6
SHA512 29aeb5b31e70d5b12e69de7970b36ab7d1541c984873384a46c6468394e8562688c46ef39179820990817c94f283c7836c2c6ff207eefe385086d850ba3f8306
HEAD_REF master
PATCHES
OsgMacroUtils.patch
fix-static-install.patch
CMakeLists.patch
)

if(VCPKG_TARGET_IS_OSX)
Expand Down Expand Up @@ -35,4 +36,4 @@ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)

# Handle License
file(COPY ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT})
file(RENAME ${CURRENT_PACKAGES_DIR}/share/${PORT}/LICENSE.txt ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright)
file(RENAME ${CURRENT_PACKAGES_DIR}/share/${PORT}/LICENSE.txt ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright)
4 changes: 2 additions & 2 deletions versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -4449,8 +4449,8 @@
"port-version": 6
},
"osg-qt": {
"baseline": "Qt4",
"port-version": 3
"baseline": "Qt5",
"port-version": 0
},
"osgearth": {
"baseline": "3.1",
Expand Down
5 changes: 5 additions & 0 deletions versions/o-/osg-qt.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "81a81a658f8396c5a7d37931b93ed45207ba3278",
"version-string": "Qt5",
"port-version": 0
},
{
"git-tree": "0cb876c38973571d755b0c92b17c8d1359027d07",
"version-string": "Qt4",
Expand Down