mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-28 11:08:59 +08:00
03766d0834
* [cgns] add port cgns * [paraview] add new port * [paraview] correct dependencies; disable catalyst * [VTK/ParaView] Make ParaView build * [paraview] add missing patch * [paraview] add cgns patch * [paraview] add qt plugin patches back in. Remove in the future * [vtk] slightly improved patches * [vtk] don't disable findPython * [paraview] add more features * [paraview] remove X11Extras from OSX * [vtk] make vtk workcorrectly with python and prepare for paraview with python * [paraview] Python fixes * [paraview] small bin -> lib replacement fix for static builds * [vtk] fix patch path * update baseline to exclude paraview for the time being on osx and linux. requires a fix in qt5-base linkage of libpq. * [paraview]try setting LD_LIBRARY_PATH for unix systems * [paraview] a bit of cleanup * update baseline * fix typo in baseline * [paraview] remove unnecessary patch * [vtk] replace custom patch with upstream patch * [paraview] cleanup in the portfile. * Update ports/paraview/CONTROL Co-authored-by: Jack·Boos·Yu <47264268+JackBoosY@users.noreply.github.com>
78 lines
3.3 KiB
Diff
78 lines
3.3 KiB
Diff
diff --git a/CMake/ParaViewClient.cmake b/CMake/ParaViewClient.cmake
|
|
index 31beb7e20..d4bb36844 100644
|
|
--- a/CMake/ParaViewClient.cmake
|
|
+++ b/CMake/ParaViewClient.cmake
|
|
@@ -263,7 +263,11 @@ IDI_ICON1 ICON \"${_paraview_client_APPLICATION_ICON}\"\n")
|
|
endif ()
|
|
|
|
include("${_ParaViewClient_cmake_dir}/paraview-find-package-helpers.cmake" OPTIONAL)
|
|
- find_package(Qt5 REQUIRED QUIET COMPONENTS Core Widgets)
|
|
+ find_package(Qt5 REQUIRED QUIET COMPONENTS Core Widgets Svg Network Sql DBus OpenGL OpenGLExtensions)
|
|
+ if(UNIX AND NOT APPLE)
|
|
+ find_package(Qt5 REQUIRED QUIET COMPONENTS X11Extras)
|
|
+ list(APPEND qt_additional_libs Qt5::X11Extras)
|
|
+ endif()
|
|
|
|
# CMake 3.13 started using Qt5's version variables to detect what version
|
|
# of Qt's tools to run for autorcc. However, they are looked up using the
|
|
@@ -322,11 +322,36 @@ IDI_ICON1 ICON \"${_paraview_client_APPLICATION_ICON}\"\n")
|
|
FILES
|
|
${_paraview_client_resource_files})
|
|
endif ()
|
|
+
|
|
+ if(NOT PARAVIEW_BUILD_SHARED_LIBS) # Should be a check if Qt is built statically and not ParaView
|
|
+ list(APPEND qt_components Svg Widgets Gui OpenGL OpenGLExtensions) # added due to svg rescources, sql due to VTK::GUISupportQtSQL
|
|
+ set(qt_plugin_list)
|
|
+ foreach(qt_component ${qt_components})
|
|
+ message(STATUS "Qt5${qt_component}_PLUGINS: ${Qt5${qt_component}_PLUGINS}")
|
|
+ list(APPEND qt_plugin_list ${Qt5${qt_component}_PLUGINS})
|
|
+ message(STATUS "QtPlugin List: ${qt_plugin_list}")
|
|
+ endforeach()
|
|
+ set(qt_plugin_source "${CMAKE_CURRENT_BINARY_DIR}/qt_static_plugins.cxx")
|
|
+ if(EXISTS "${qt_plugin_source}")
|
|
+ file(REMOVE "${qt_plugin_source}")
|
|
+ endif()
|
|
+ set(qt_source_text "#include <QtPlugin>\n")
|
|
+ string(APPEND qt_source_text "#ifdef QT_STATIC\n")
|
|
+ foreach(qt_plugin ${qt_plugin_list})
|
|
+ STRING(REGEX REPLACE "[^:]+::" "" qt_plugin_name "${qt_plugin}")
|
|
+ message(STATUS "RAW PLUGIN NAME: ${qt_plugin_name}")
|
|
+ string(APPEND qt_source_text " Q_IMPORT_PLUGIN(${qt_plugin_name})\n")
|
|
+ endforeach()
|
|
+ string(APPEND qt_source_text "#endif\n")
|
|
+ file(WRITE "${qt_plugin_source}" "${qt_source_text}")
|
|
+ endif()
|
|
+
|
|
add_executable("${_paraview_client_NAME}" ${_paraview_client_executable_flags}
|
|
${_paraview_client_SOURCES}
|
|
${_paraview_client_resource_files}
|
|
${_paraview_client_source_files}
|
|
- ${_paraview_client_extra_sources})
|
|
+ ${_paraview_client_extra_sources}
|
|
+ ${qt_plugin_source})
|
|
if (DEFINED _paraview_client_NAMESPACE)
|
|
add_executable("${_paraview_client_NAMESPACE}::${_paraview_client_NAME}" ALIAS "${_paraview_client_NAME}")
|
|
endif ()
|
|
@@ -338,9 +362,20 @@ IDI_ICON1 ICON \"${_paraview_client_APPLICATION_ICON}\"\n")
|
|
"$<TARGET_PROPERTY:VTK::vtksys,INTERFACE_INCLUDE_DIRECTORIES>")
|
|
target_link_libraries("${_paraview_client_NAME}"
|
|
PRIVATE
|
|
+ ${qt_plugin_list}
|
|
+ Qt5::Svg ## added
|
|
+ Qt5::Sql ## added
|
|
+ Qt5::Network ## added
|
|
+ Qt5::Gui ## added
|
|
+ Qt5::OpenGL
|
|
+ Qt5::OpenGLExtensions
|
|
+ Qt5::DBus ##added
|
|
+ ${qt_additional_libs}
|
|
+ Qt5::Core # needed in VCPKG due to the extra Wrapper
|
|
ParaView::pqApplicationComponents
|
|
Qt5::Widgets
|
|
- VTK::vtksys)
|
|
+ VTK::vtksys
|
|
+ )
|
|
|
|
set(_paraview_client_export)
|
|
if (DEFINED _paraview_client_EXPORT)
|