Skip to content

Commit

Permalink
[Qt3D] add missing qt port (microsoft#26928)
Browse files Browse the repository at this point in the history
* bump qtbase

* add qt3d

* format manifest

* test features in CI

* pass ci baseline stuff

* vulkan is skip in ci so cannot force it.

* remove extra ,

* fix deps

* try to fix promotion

* gstreamer adjustments.

* fix gstreamer on linux

* fix gstreamer stuff

* fix x264 api import macro

* fix gst-rsp-server

* correctly replace

* promote targets....

* enable arm64 qtwebengine

* --trace-expand

* install wrapper for egl.

* add newline

* remove opengl from skip list

* add gl to link

* another try

* retry again

* test dynamic angle linkage

* retry

* link XNVCtrl

* retry

* add libxnvctrl

* retry

* retry again...

* move wrapper to angle

* revert changes to egl-reg

* more debugging

* try again

* fix stuff

* add missing ,

* egl stuff

* wrapper stuff

* fix angle

* remove double dep

* remove libxnvctrl

* format manifest

* revert trace

* bump version

* bump v

* v db

* remove trace

* v db

* refine supports

* v db

* remove qtmultimedia from baseline
  • Loading branch information
Neumann-A authored Oct 12, 2022
1 parent 2827262 commit e1a1ddd
Show file tree
Hide file tree
Showing 28 changed files with 299 additions and 47 deletions.
29 changes: 16 additions & 13 deletions ports/angle/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,8 @@ file(GLOB ANGLE_COMMON_SOURCES
"src/common/third_party/xxhash/*.h"
"src/common/third_party/xxhash/*.c"
"src/common/third_party/smhasher/src/*.h"
"src/common/third_party/smhasher/src/*.cpp")
"src/common/third_party/smhasher/src/*.cpp"
)
list(FILTER ANGLE_COMMON_SOURCES EXCLUDE REGEX "_unittest|event_tracer|${ANGLE_COMMON_PLATFORM_FILTER}")
add_library(angle_common OBJECT ${ANGLE_COMMON_SOURCES})
target_include_directories(angle_common PUBLIC "$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/src/common/third_party/base>")
Expand Down Expand Up @@ -442,6 +443,18 @@ file(GLOB ANGLE_GPU_INFO_UTIL_SOURCES
"src/gpu_info_util/SystemInfo_internal.h"
"src/gpu_info_util/SystemInfo.cpp"
)

if(LINUX)
find_package(X11 COMPONENTS Xext Xi REQUIRED)
include_directories(${X11_INCLUDE_DIR})
list(APPEND LIBANGLE_RENDERER_PLATFORM ${X11_LIBRARIES})
set(LIBANGLE_RENDERER_COMPILEDEF
-DANGLE_USE_X11
)
else()
set(LIBANGLE_RENDERER_COMPILEDEF )
endif()

add_library(angle_gpu_info_util OBJECT ${ANGLE_GPU_INFO_UTIL_SOURCES})
if(WIN32)
target_sources(angle_gpu_info_util PRIVATE "src/gpu_info_util/SystemInfo_win.cpp")
Expand All @@ -457,8 +470,9 @@ elseif(APPLE)
target_link_libraries(angle_gpu_info_util PRIVATE ${IOKit} ${CoreFoundation} ${CoreGraphics})
elseif(LINUX)
target_sources(angle_gpu_info_util PRIVATE "src/gpu_info_util/SystemInfo_linux.cpp" "src/gpu_info_util/SystemInfo_x11.cpp")
target_sources(angle_gpu_info_util PRIVATE "src/third_party/libXNVCtrl/NVCtrl.c")
target_compile_definitions(angle_gpu_info_util PRIVATE GPU_INFO_USE_X11)
target_link_libraries(angle_gpu_info_util PRIVATE X11 Xi Xext)
target_link_libraries(angle_gpu_info_util PRIVATE X11::X11 X11::Xi X11::Xext)
elseif(ANDROID)
target_sources(angle_gpu_info_util PRIVATE "src/gpu_info_util/SystemInfo_android.cpp")
endif()
Expand Down Expand Up @@ -547,17 +561,6 @@ else()
set(LIBANGLE_RENDERER_PLATFORM )
endif()

if(LINUX)
find_package(X11)
include_directories(${X11_INCLUDE_DIR})
list(APPEND LIBANGLE_RENDERER_PLATFORM ${X11_LIBRARIES})
set(LIBANGLE_RENDERER_COMPILEDEF
-DANGLE_USE_X11
)
else()
set(LIBANGLE_RENDERER_COMPILEDEF )
endif()

add_library(libANGLE STATIC ${LIBANGLE_SOURCES})
target_link_libraries(libANGLE PRIVATE
angle::common
Expand Down
19 changes: 8 additions & 11 deletions ports/angle/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ vcpkg_from_github(
003-fix-mingw.patch
)

file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
file(COPY ${CMAKE_CURRENT_LIST_DIR}/angle_commit.h DESTINATION ${SOURCE_PATH})
file(COPY ${CMAKE_CURRENT_LIST_DIR}/angle_commit.h DESTINATION ${SOURCE_PATH}/src/common)
file(COPY "${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt" DESTINATION "${SOURCE_PATH}")
file(COPY "${CMAKE_CURRENT_LIST_DIR}/angle_commit.h" DESTINATION "${SOURCE_PATH}")
file(COPY "${CMAKE_CURRENT_LIST_DIR}/angle_commit.h" DESTINATION "${SOURCE_PATH}/src/common")

function(checkout_in_path_with_patches PATH URL REF PATCHES)
if(EXISTS "${PATH}")
Expand All @@ -53,21 +53,20 @@ checkout_in_path_with_patches(
"third-party-zlib-far-undef.patch"
)

vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS_DEBUG -DDISABLE_INSTALL_HEADERS=1
OPTIONS
-D${ANGLE_CPU_BITNESS}=1
)

vcpkg_install_cmake()
vcpkg_cmake_install()

vcpkg_fixup_cmake_targets(CONFIG_PATH share/unofficial-angle TARGET_PATH share/unofficial-angle)
vcpkg_cmake_config_fixup(CONFIG_PATH share/unofficial-angle PACKAGE_NAME unofficial-angle)

vcpkg_copy_pdbs()

file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)

# File conflict with opengl-registry! Make sure headers are similar on Update!
# angle defines some additional entrypoints.
Expand Down Expand Up @@ -95,5 +94,3 @@ foreach(_file ${_double_files})
file(REMOVE "${CURRENT_PACKAGES_DIR}/${_file}")
endif()
endforeach()


22 changes: 21 additions & 1 deletion ports/angle/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,35 @@
{
"name": "angle",
"version-string": "chromium_4472",
"port-version": 4,
"port-version": 5,
"description": [
"A conformant OpenGL ES implementation for Windows, Mac and Linux.",
"The goal of ANGLE is to allow users of multiple operating systems to seamlessly run WebGL and other OpenGL ES content by translating OpenGL ES API calls to one of the hardware-supported APIs available for that platform. ANGLE currently provides translation from OpenGL ES 2.0 and 3.0 to desktop OpenGL, OpenGL ES, Direct3D 9, and Direct3D 11. Support for translation from OpenGL ES to Vulkan is underway, and future plans include compute shader support (ES 3.1) and MacOS support."
],
"homepage": "https://github.com/google/angle",
"dependencies": [
"egl-registry",
{
"name": "libx11",
"platform": "linux"
},
{
"name": "libxext",
"platform": "linux"
},
{
"name": "libxi",
"platform": "linux"
},
"opengl-registry",
{
"name": "vcpkg-cmake",
"host": true
},
{
"name": "vcpkg-cmake-config",
"host": true
},
"zlib"
]
}
2 changes: 2 additions & 0 deletions ports/egl-registry/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,5 @@ file(
DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}"
RENAME copyright
)

configure_file("${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake" "${CURRENT_PACKAGES_DIR}/share/egl/vcpkg-cmake-wrapper.cmake" @ONLY)
8 changes: 8 additions & 0 deletions ports/egl-registry/vcpkg-cmake-wrapper.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
if(UNIX)
_find_package(OpenGL COMPONENTS EGL)
if(OPENGL_egl_LIBRARY) # Only defined for Linux with GLVND
set(EGL_LIBRARY "${OPENGL_egl_LIBRARY}" CACHE STRING "")
set(EGL_INCLUDE_DIR "${OPENGL_EGL_INCLUDE_DIRS}" CACHE STRING "")
endif()
endif()
_find_package(${ARGS})
1 change: 1 addition & 0 deletions ports/egl-registry/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "egl-registry",
"version-date": "2021-11-23",
"port-version": 1,
"description": "the EGL API and Extension Registry",
"homepage": "https://github.com/KhronosGroup/EGL-Registry"
}
19 changes: 17 additions & 2 deletions ports/qt/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,25 @@
{
"name": "qt",
"version": "6.3.2",
"port-version": 1,
"description": "Qt",
"homepage": "https://www.qt.io/",
"license": null,
"dependencies": [
{
"name": "qt3d",
"default-features": false,
"features": [
"animation",
"assimp",
"extras",
"input",
"logic",
"qml",
"render",
"rhi"
]
},
{
"name": "qt5compat",
"default-features": false,
Expand Down Expand Up @@ -142,7 +157,7 @@
"spellchecker",
"webchannel"
],
"platform": "!static"
"platform": "!static & !(windows & arm)"
},
{
"name": "qtwebsockets",
Expand All @@ -164,7 +179,7 @@
"features": [
"webengine"
],
"platform": "!static"
"platform": "!static & !(windows & arm)"
}
],
"default-features": [
Expand Down
35 changes: 35 additions & 0 deletions ports/qt3d/portfile.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
set(SCRIPT_PATH "${CURRENT_INSTALLED_DIR}/share/qtbase")
include("${SCRIPT_PATH}/qt_install_submodule.cmake")

# General features:
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
FEATURES
"qml" CMAKE_REQUIRE_FIND_PACKAGE_Qt6Quick
"vulkan" CMAKE_REQUIRE_FIND_PACKAGE_Vulkan
"vulkan" FEATURE_qt3d_vulkan
"rhi" FEATURE_qt3d_rhi_renderer
"render" FEATURE_qt3d_render
"input" FEATURE_qt3d_input
"logic" FEATURE_qt3d_logic
"extras" FEATURE_qt3d_extras
"animation" FEATURE_qt3d_animation
INVERTED_FEATURES
"qml" CMAKE_DISABLE_FIND_PACKAGE_Qt6Quick
"vulkan" CMAKE_DISABLE_FIND_PACKAGE_Vulkan
)

if("assimp" IN_LIST FEATURES)
list(APPEND FEATURE_OPTIONS -DINPUT_assimp=system)
else()
list(APPEND FEATURE_OPTIONS -DINPUT_assimp=no)
endif()

qt_install_submodule(PATCHES ${${PORT}_PATCHES}
CONFIGURE_OPTIONS
${FEATURE_OPTIONS}
#-DINPUT_fbxsdk=no
-DFEATURE_qt3d_fbxsdk=OFF # OpenFBX? Probably not!
-DCMAKE_FIND_PACKAGE_TARGETS_GLOBAL=ON
CONFIGURE_OPTIONS_RELEASE
CONFIGURE_OPTIONS_DEBUG
)
106 changes: 106 additions & 0 deletions ports/qt3d/vcpkg.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
{
"name": "qt3d",
"version": "6.3.2",
"description": "Qt wrapper for existing OPC UA stacks",
"homepage": "https://www.qt.io/",
"license": null,
"dependencies": [
"assimp",
{
"name": "qtbase",
"default-features": false,
"features": [
"concurrent",
"gui",
"network",
"widgets"
]
}
],
"default-features": [
"animation",
"assimp",
"extras",
"input",
"logic",
"render"
],
"features": {
"animation": {
"description": "Use the 3D Animation Aspect library",
"dependencies": [
{
"name": "qt3d",
"default-features": false,
"features": [
"render"
]
}
]
},
"assimp": {
"description": "Build with assimp",
"dependencies": [
"assimp"
]
},
"extras": {
"description": "Use the 3D Extra library",
"dependencies": [
{
"name": "qt3d",
"default-features": false,
"features": [
"input",
"logic",
"render"
]
}
]
},
"input": {
"description": "Use the 3D Input Aspect library"
},
"logic": {
"description": "Use the 3D Logic Aspect library"
},
"qml": {
"description": "Build QML imports",
"dependencies": [
{
"name": "qtbase",
"default-features": false,
"features": [
"gui"
]
},
{
"name": "qtdeclarative",
"default-features": false
}
]
},
"render": {
"description": "Use the 3D Render Aspect library"
},
"rhi": {
"description": "Enable RHI renderer",
"dependencies": [
"qtshadertools"
]
},
"vulkan": {
"description": "Build with vulkan support",
"dependencies": [
{
"name": "qt3d",
"default-features": false,
"features": [
"rhi"
]
},
"vulkan"
]
}
}
}
1 change: 1 addition & 0 deletions ports/qtbase/cmake/qt_port_data.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,6 @@ set(qtwebsockets_HASH "b57621b00d0919c57ced9eabd553a624585b16f9b061366af53abdd00
set(qtwebview_HASH "39cb4bf67818e4d462fbdd180a802052b3637578a8b99a943359749f15b721f2e0b0354d90ceaaff99a57eba1c57c1ee271e4fd0a553d42c8093c665b9192688")
set(qtinterfaceframework_REF a83bc81486891170750a3048e6b58d15903e6f9c)
set(qtapplicationmanager_HASH "79a8e7588ec168d6cbccd921bc46b48a25512591b65e1602dd7cf461a7692472498301eea299808a08b7ed7f5efaa69f9a0b9ab86f9ea8f18cb4421c562c3f20")
set(qt3d_HASH "1856aaf3ae7f91129b7eb0524497b0505f7ba9e1a7cbfee5eec26400d8ea36f88115f8d49ad93b3ef94c09f1ee11246482d6ab0416972a56431bd084cab44aa8")

set(qtlocation_HASH "a5508da406ec6fb413dc63aa29ddffed0dbd10f0344c8f10231e68178d21b6986e4cf983eb180a40bfd48bef1731e295c0722b31b6495aebe6edc18f7fa55629")
3 changes: 2 additions & 1 deletion ports/qtbase/cmake/qt_port_details.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ set(QT_PORTS qt
qtopcua
qtimageformats
qtmqtt
qtnetworkauth)
qtnetworkauth
qt3d)
# qtquickcontrols2 -> moved into qtdeclarative
if(QT_VERSION VERSION_GREATER_EQUAL 6.1)
list(APPEND QT_PORTS
Expand Down
1 change: 1 addition & 0 deletions ports/qtbase/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "qtbase",
"version": "6.3.2",
"port-version": 1,
"description": "Qt Application Framework Base Module. Includes Core, GUI, Widgets, Networking, SQL, Concurrent and other essential qt components.",
"homepage": "https://www.qt.io/",
"license": null,
Expand Down
3 changes: 3 additions & 0 deletions ports/qtinterfaceframework/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,7 @@ qt_install_copyright("${SOURCE_PATH}")
if(NOT VCPKG_CROSSCOMPILING)
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/bin/ifcodegen")
file(RENAME "${CURRENT_PACKAGES_DIR}/bin/ifcodegen" "${CURRENT_PACKAGES_DIR}/tools/Qt6/bin/ifcodegen")
if(NOT VCPKG_TARGET_IS_WINDOWS)
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin")
endif()
endif()
1 change: 1 addition & 0 deletions ports/qtinterfaceframework/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "qtinterfaceframework",
"version": "6.3.2",
"port-version": 1,
"description": "Qt Interface Framework",
"homepage": "https://www.qt.io/",
"license": null,
Expand Down
1 change: 1 addition & 0 deletions ports/qtmultimedia/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ list(APPEND FEATURE_OPTIONS "-DFEATURE_alsa=OFF")

qt_install_submodule(PATCHES ${${PORT}_PATCHES}
CONFIGURE_OPTIONS ${FEATURE_OPTIONS}
-DCMAKE_FIND_PACKAGE_TARGETS_GLOBAL=ON
CONFIGURE_OPTIONS_RELEASE
CONFIGURE_OPTIONS_DEBUG
)
Loading

0 comments on commit e1a1ddd

Please sign in to comment.