-
Notifications
You must be signed in to change notification settings - Fork 7.4k
add feature build vtk[qtopengl] #10060
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
Closed
Closed
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
80c3357
add feature build vtk[qtopengl]
ae8c35a
synch upstream
993267b
fixes after codereview with @Neumann-A
415ac9e
initial working version for QVTKOpenGLWidget
d139898
Merge branch 'master' of https://github.com/microsoft/vcpkg
3f99253
list qt5-tools first for qtopengl
1fdf559
Merge branch 'master' of https://github.com/microsoft/vcpkg
176ec4d
take two, list all of qt as dependency
8bbe5c2
Merge branch 'master' of https://github.com/microsoft/vcpkg
8a01ba8
take 3
70a3d8d
Merge branch 'master' of https://github.com/microsoft/vcpkg
c0f14ee
Merge branch 'master' of https://github.com/microsoft/vcpkg
fea56f7
Merge branch 'master' of https://github.com/jafrado/vcpkg
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 |
|---|---|---|
|
|
@@ -16,13 +16,8 @@ if("qt" IN_LIST FEATURES) | |
| -DVTK_MODULE_ENABLE_VTK_RenderingQt=YES | ||
| -DVTK_MODULE_ENABLE_VTK_ViewsQt=YES | ||
| ) | ||
|
|
||
| endif() | ||
| if("atlmfc" IN_LIST FEATURES) | ||
| list(APPEND ADDITIONAL_OPTIONS | ||
| -DVTK_MODULE_ENABLE_VTK_GUISupportMFC=YES | ||
| ) | ||
| endif() | ||
|
|
||
| if("vtkm" IN_LIST FEATURES) | ||
| list(APPEND ADDITIONAL_OPTIONS | ||
| -DVTK_MODULE_ENABLE_VTK_AcceleratorsVTKm=YES | ||
|
|
@@ -36,13 +31,40 @@ if("python" IN_LIST FEATURES) | |
| -DVTK_WRAP_PYTHON=ON | ||
| -DVTK_PYTHON_VERSION=3 | ||
| -DPython3_FIND_REGISTRY=NEVER | ||
| -DCMAKE_DISABLE_FIND_PACKAGE_Python3=TRUE | ||
| "-DPython3_EXECUTABLE:PATH=${PYTHON3}" | ||
| ) | ||
|
|
||
| if(VCPKG_TARGET_IS_WINDOWS) | ||
| list(APPEND ADDITIONAL_OPTIONS "-DPython3_LIBRARY_RELEASE:PATH=${CURRENT_INSTALLED_DIR}/lib/python37.lib" | ||
| "-DPython3_LIBRARY_DEBUG:PATH=${CURRENT_INSTALLED_DIR}/debug/lib/python37_d.lib" | ||
| "-DPython3_LIBRARIES:STRING=debug\\\\\\\;${CURRENT_INSTALLED_DIR}/debug/lib/python37_d.lib\\\\\\\;optimized\\\\\\\;${CURRENT_INSTALLED_DIR}/lib/python37.lib" | ||
| "-DPYTHON_DEBUG_LIBRARY:PATH=${CURRENT_INSTALLED_DIR}/debug/lib/python37_d.lib" | ||
| "-DPython3_INCLUDE_DIR:PATH=${CURRENT_INSTALLED_DIR}/include/python3.7") | ||
| elseif(VCPKG_TARGET_IS_LINUX) | ||
| list(APPEND ADDITIONAL_OPTIONS "-DPython3_LIBRARY_RELEASE:PATH=${CURRENT_INSTALLED_DIR}/lib/libpython37m.a" | ||
| "-DPython3_LIBRARY_DEBUG:PATH=${CURRENT_INSTALLED_DIR}/debug/lib/libpython37md.a" | ||
| "-DPython3_LIBRARIES:STRING=debug\\\\\\\;${CURRENT_INSTALLED_DIR}/debug/lib/libpython37md.a\\\\\\\;optimized\\\\\\\;${CURRENT_INSTALLED_DIR}/lib/libpython37m.a" | ||
| "-DPYTHON_DEBUG_LIBRARY:PATH=${CURRENT_INSTALLED_DIR}/debug/lib/libpython37md.a" | ||
| "-DPython3_INCLUDE_DIR:PATH=${CURRENT_INSTALLED_DIR}/include/python3.7m") | ||
| elseif(VCPKG_TARGET_IS_OSX) | ||
| #Need Python3 information on OSX within VCPKG | ||
| endif() | ||
|
|
||
| #VTK_PYTHON_SITE_PACKAGES_SUFFIX should be set to the install dir of the site-packages | ||
| endif() | ||
|
|
||
| if("paraview" IN_LIST FEATURES) | ||
| if(VTK_WITH_QT_OPENGL) | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Where this value is not set, I think it is always 0. |
||
| list(APPEND ADDITIONAL_OPTIONS | ||
| -DVTK_Group_Qt=ON | ||
| -DvtkGUISupportQtOpenGL=ON | ||
| -DModule_vtkGUISupportQtOpenGL=ON | ||
| -DVTK_QT_VERSION=5 | ||
| -DVTK_BUILD_QT_DESIGNER_PLUGIN=OFF | ||
| ) | ||
JackBoosY marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| endif() | ||
|
|
||
| list(APPEND ADDITIONAL_OPTIONS | ||
| -DVTK_MODULE_ENABLE_VTK_FiltersParallelStatistics=YES | ||
| -DVTK_MODULE_ENABLE_VTK_IOParallelExodus=YES | ||
|
|
@@ -56,7 +78,6 @@ if("paraview" IN_LIST FEATURES) | |
| -DVTK_MODULE_ENABLE_VTK_IOVPIC=YES | ||
| -DVTK_MODULE_ENABLE_VTK_RenderingLICOpenGL2=YES | ||
| -DVTK_MODULE_ENABLE_VTK_RenderingAnnotation=YES | ||
| -DVTK_MODULE_ENABLE_VTK_DomainsChemistryOpenGL2=YES | ||
| ) | ||
| if("python" IN_LIST FEATURES) | ||
| list(APPEND ADDITIONAL_OPTIONS | ||
|
|
@@ -71,19 +92,6 @@ if("mpi" IN_LIST FEATURES) | |
| ) | ||
| endif() | ||
|
|
||
| if("opengl" IN_LIST FEATURES) | ||
| list(APPEND ADDITIONAL_OPTIONS | ||
| -DVTK_MODULE_ENABLE_VTK_DomainsChemestryOpenGL2=YES | ||
| -DVTK_MODULE_ENABLE_VTK_ImagingOpenGL2=YES | ||
| -DVTK_MODULE_ENABLE_VTK_RenderingContextOpenGL2=YES | ||
| -DVTK_MODULE_ENABLE_VTK_RenderingGL2PSOpenGL2=YES | ||
| -DVTK_MODULE_ENABLE_VTK_RenderingLICOpenGL2=YES | ||
| -DVTK_MODULE_ENABLE_VTK_RenderingOpenGL2=YES | ||
| -DVTK_MODULE_ENABLE_VTK_RenderingVolumeOpenGL2=YES | ||
| -DVTK_MODULE_ENABLE_VTK_opengl=YES | ||
| ) | ||
| endif() | ||
|
|
||
| if("all" IN_LIST FEATURES) | ||
| list(APPEND ADDITIONAL_OPTIONS | ||
| -DVTK_USE_TK=OFF # TCL/TK currently not included in vcpkg | ||
|
|
@@ -101,26 +109,25 @@ vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS | |
| vcpkg_from_github( | ||
| OUT_SOURCE_PATH SOURCE_PATH | ||
| REPO Kitware/VTK | ||
| REF 96e6fa9b3ff245e4d51d49f23d40e9ad8774e85e # v9.0.1 | ||
| SHA512 0efb1845053b6143e5ee7fa081b8be98f6825262c59051e88b2be02497e23362055067b2f811eff82e93eb194e5a9afd2a12e3878a252eb4011a5dab95127a6f | ||
| REF ab278e87b181e3a02082bea7361fbaa3ddafb3ad # v9.0 | ||
| SHA512 50a324f55b58bc4415f972f711420e83b41a100b27729266db4541c24bc7d7bcd27d9158ce2588178b9b2e43c20b9695ffe382605f5cde331e8371e213655164 | ||
| HEAD_REF master | ||
| PATCHES | ||
| FindLZMA.patch # Will be fixed in 9.1? | ||
| FindLibHaru.patch | ||
| FindLZMA.patch | ||
| FindLZ4.patch | ||
| Findproj.patch | ||
| vtkm.patch # To include an external VTKm build (v.1.5 required) | ||
| pegtl.patch | ||
| pythonwrapper.patch # Required by ParaView to Wrap required classes | ||
| NoUndefDebug.patch # Required to link against correct Python library depending on build type. | ||
| python_debug.patch | ||
| fix-using-hdf5.patch | ||
| ##pythonwrapper.patch # needs checking with paraview PR if still required | ||
| ##NoUndefDebug.patch # needs checking with paraview PR if still required | ||
| # Last patch TODO: Patch out internal loguru | ||
| ) | ||
|
|
||
| # ============================================================================= | ||
| #Overwrite outdated modules if they have not been patched: | ||
| file(COPY "${CURRENT_PORT_DIR}/FindPostgreSQL.cmake" DESTINATION "${SOURCE_PATH}/CMake") # will be backported from CMake in VTK in a future release | ||
| file(COPY "${CURRENT_PORT_DIR}/FindHDF5.cmake" DESTINATION "${SOURCE_PATH}/CMake/patches/99") # due to usage of targets in netcdf-c | ||
| file(COPY "${CURRENT_PORT_DIR}/FindPostgreSQL.cmake" DESTINATION "${SOURCE_PATH}/CMake") | ||
| file(COPY "${CURRENT_PORT_DIR}/FindHDF5.cmake" DESTINATION "${SOURCE_PATH}/CMake/patches/99") | ||
| # ============================================================================= | ||
|
|
||
| # ============================================================================= | ||
|
|
@@ -140,7 +147,6 @@ vcpkg_configure_cmake( | |
| -DVTK_INSTALL_PACKAGE_DIR=share/vtk | ||
| -DVTK_INSTALL_RUNTIME_DIR=bin | ||
| -DVTK_FORBID_DOWNLOADS=ON | ||
| -DVTK_ENABLE_REMOTE_MODULES=OFF | ||
| # VTK groups to enable | ||
| -DVTK_GROUP_ENABLE_StandAlone=YES | ||
| -DVTK_GROUP_ENABLE_Rendering=YES | ||
|
|
@@ -150,6 +156,9 @@ vcpkg_configure_cmake( | |
| # Select modules / groups to install | ||
| -DVTK_USE_EXTERNAL:BOOL=ON | ||
| -DVTK_MODULE_USE_EXTERNAL_VTK_gl2ps:BOOL=OFF # Not yet in VCPKG | ||
| -DModule_vtkGUISupportQt=ON | ||
| -DModule_vtkGUISupportQtOpenGL=ON | ||
|
|
||
| ${ADDITIONAL_OPTIONS} | ||
| ) | ||
|
|
||
|
|
@@ -199,14 +208,12 @@ function(_vtk_remove_debug_tool TOOL_NAME) | |
| if(EXISTS ${filename}) | ||
| file(REMOVE ${filename}) | ||
| endif() | ||
| if (NOT VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL debug) | ||
| # we also have to bend the lines referencing the tools in VTKTargets-debug.cmake | ||
| # to make them point to the release version of the tools | ||
| file(READ "${CURRENT_PACKAGES_DIR}/share/vtk/VTK-targets-debug.cmake" VTK_TARGETS_CONTENT_DEBUG) | ||
| string(REPLACE "debug/bin/${TOOL_NAME}" "tools/vtk/${TOOL_NAME}" VTK_TARGETS_CONTENT_DEBUG "${VTK_TARGETS_CONTENT_DEBUG}") | ||
| string(REPLACE "tools/vtk/${TOOL_NAME}d" "tools/vtk/${TOOL_NAME}" VTK_TARGETS_CONTENT_DEBUG "${VTK_TARGETS_CONTENT_DEBUG}") | ||
| file(WRITE "${CURRENT_PACKAGES_DIR}/share/vtk/VTK-targets-debug.cmake" "${VTK_TARGETS_CONTENT_DEBUG}") | ||
| endif() | ||
| # we also have to bend the lines referencing the tools in VTKTargets-debug.cmake | ||
| # to make them point to the release version of the tools | ||
| file(READ "${CURRENT_PACKAGES_DIR}/share/vtk/VTK-targets-debug.cmake" VTK_TARGETS_CONTENT_DEBUG) | ||
| string(REPLACE "debug/bin/${TOOL_NAME}" "tools/vtk/${TOOL_NAME}" VTK_TARGETS_CONTENT_DEBUG "${VTK_TARGETS_CONTENT_DEBUG}") | ||
| string(REPLACE "tools/vtk/${TOOL_NAME}d" "tools/vtk/${TOOL_NAME}" VTK_TARGETS_CONTENT_DEBUG "${VTK_TARGETS_CONTENT_DEBUG}") | ||
| file(WRITE "${CURRENT_PACKAGES_DIR}/share/vtk/VTK-targets-debug.cmake" "${VTK_TARGETS_CONTENT_DEBUG}") | ||
| endfunction() | ||
|
|
||
| # Move the release binary TOOL_NAME from bin to tools | ||
|
|
@@ -217,13 +224,11 @@ function(_vtk_move_release_tool TOOL_NAME) | |
| file(REMOVE ${old_filename}) | ||
| endif() | ||
|
|
||
| if (NOT VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL release) | ||
| # we also have to bend the lines referencing the tools in VTKTargets-release.cmake | ||
| # to make them point to the tool folder | ||
| file(READ "${CURRENT_PACKAGES_DIR}/share/vtk/VTK-targets-release.cmake" VTK_TARGETS_CONTENT_RELEASE) | ||
| string(REPLACE "bin/${TOOL_NAME}" "tools/vtk/${TOOL_NAME}" VTK_TARGETS_CONTENT_RELEASE "${VTK_TARGETS_CONTENT_RELEASE}") | ||
| file(WRITE "${CURRENT_PACKAGES_DIR}/share/vtk/VTK-targets-release.cmake" "${VTK_TARGETS_CONTENT_RELEASE}") | ||
| endif() | ||
| # we also have to bend the lines referencing the tools in VTKTargets-release.cmake | ||
| # to make them point to the tool folder | ||
| file(READ "${CURRENT_PACKAGES_DIR}/share/vtk/VTK-targets-release.cmake" VTK_TARGETS_CONTENT_RELEASE) | ||
| string(REPLACE "bin/${TOOL_NAME}" "tools/vtk/${TOOL_NAME}" VTK_TARGETS_CONTENT_RELEASE "${VTK_TARGETS_CONTENT_RELEASE}") | ||
| file(WRITE "${CURRENT_PACKAGES_DIR}/share/vtk/VTK-targets-release.cmake" "${VTK_TARGETS_CONTENT_RELEASE}") | ||
| endfunction() | ||
|
|
||
| set(VTK_SHORT_VERSION 9.0) | ||
|
|
@@ -260,37 +265,29 @@ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) | |
|
|
||
| # ============================================================================= | ||
| # Handle copyright | ||
| file(INSTALL ${SOURCE_PATH}/Copyright.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) | ||
| file(COPY ${SOURCE_PATH}/Copyright.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/vtk) | ||
| file(RENAME ${CURRENT_PACKAGES_DIR}/share/vtk/Copyright.txt ${CURRENT_PACKAGES_DIR}/share/vtk/copyright) | ||
|
|
||
| vcpkg_copy_tool_dependencies("${CURRENT_PACKAGES_DIR}/tools/vtk") | ||
|
|
||
| ## Files Modules needed by ParaView | ||
| if("paraview" IN_LIST FEATURES) | ||
| set(VTK_CMAKE_NEEDED vtkCompilerChecks vtkCompilerPlatformFlags vtkCompilerExtraFlags vtkInitializeBuildType | ||
| vtkSupportMacros vtkDirectories vtkVersion FindPythonModules vtkModuleDebugging vtkExternalData) | ||
| set(VTK_CMAKE_NEEDED vtkCompilerChecks vtkCompilerPlatformFlags vtkCompilerExtraFlags vtkInitializeBuildType vtkSupportMacros vtkDirectories vtkVersion FindPythonModules) | ||
| foreach(module ${VTK_CMAKE_NEEDED}) | ||
| file(INSTALL "${SOURCE_PATH}/CMake/${module}.cmake" DESTINATION "${CURRENT_PACKAGES_DIR}/share/vtk") | ||
| file(INSTALL "${SOURCE_PATH}/CMake/${module}.cmake" DESTINATION ${CURRENT_PACKAGES_DIR}/share/vtk) | ||
| endforeach() | ||
|
|
||
| ## Check List on UPDATE !! | ||
| file(INSTALL "${SOURCE_PATH}/CMake/vtkRequireLargeFilesSupport.cxx" DESTINATION "${CURRENT_PACKAGES_DIR}/share/vtk") | ||
|
|
||
| file(INSTALL "${SOURCE_PATH}/GUISupport/Qt/QVTKOpenGLWidget.h" DESTINATION "${CURRENT_PACKAGES_DIR}/include/vtk-${VTK_SHORT_VERSION}") # Legacy header | ||
| file(INSTALL "${SOURCE_PATH}/CMake/vtkRequireLargeFilesSupport.cxx" DESTINATION ${CURRENT_PACKAGES_DIR}/share/vtk) | ||
|
|
||
| file(INSTALL "${SOURCE_PATH}/Common/Core/vtkRange.h" DESTINATION "${CURRENT_PACKAGES_DIR}/include/vtk-${VTK_SHORT_VERSION}") # this should get installed by VTK | ||
| file(INSTALL "${SOURCE_PATH}/Common/Core/vtkRangeIterableTraits.h" DESTINATION "${CURRENT_PACKAGES_DIR}/include/vtk-${VTK_SHORT_VERSION}") # this should get installed by VTK | ||
| file(INSTALL "${SOURCE_PATH}/Common/DataModel/vtkCompositeDataSetNodeReference.h" DESTINATION "${CURRENT_PACKAGES_DIR}/include/vtk-${VTK_SHORT_VERSION}") # this should get installed by VTK | ||
| #ParaView requires some internal headers | ||
| file(INSTALL "${SOURCE_PATH}/Rendering/Annotation/vtkScalarBarActorInternal.h" DESTINATION "${CURRENT_PACKAGES_DIR}/include/vtk-${VTK_SHORT_VERSION}") | ||
| file(INSTALL "${SOURCE_PATH}/Filters/Statistics/vtkStatisticsAlgorithmPrivate.h" DESTINATION "${CURRENT_PACKAGES_DIR}/include/vtk-${VTK_SHORT_VERSION}") | ||
| file(INSTALL "${SOURCE_PATH}/Rendering/OpenGL2/vtkCompositePolyDataMapper2Internal.h" DESTINATION "${CURRENT_PACKAGES_DIR}/include/vtk-${VTK_SHORT_VERSION}") | ||
| file(INSTALL "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/Rendering/OpenGL2/vtkTextureObjectVS.h" DESTINATION "${CURRENT_PACKAGES_DIR}/include/vtk-${VTK_SHORT_VERSION}") | ||
| #ParaView requires some internal headers | ||
| file(INSTALL ${SOURCE_PATH}/Rendering/Annotation/vtkScalarBarActorInternal.h DESTINATION ${CURRENT_PACKAGES_DIR}/include/vtk-${VTK_SHORT_VERSION}) | ||
| file(INSTALL ${SOURCE_PATH}/Filters/Statistics/vtkStatisticsAlgorithmPrivate.h DESTINATION ${CURRENT_PACKAGES_DIR}/include/vtk-${VTK_SHORT_VERSION}) | ||
| file(INSTALL ${SOURCE_PATH}/Rendering/OpenGL2/vtkCompositePolyDataMapper2Internal.h DESTINATION ${CURRENT_PACKAGES_DIR}/include/vtk-${VTK_SHORT_VERSION}) | ||
| file(INSTALL ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/Rendering/OpenGL2/vtkTextureObjectVS.h DESTINATION ${CURRENT_PACKAGES_DIR}/include/vtk-${VTK_SHORT_VERSION}) | ||
| endif() | ||
|
|
||
| if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") | ||
| if(EXISTS ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/CMakeFiles/vtkpythonmodules/static_python) #python headers | ||
| file(GLOB_RECURSE STATIC_PYTHON_FILES "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/CMakeFiles/*/static_python/*.h") | ||
| file(INSTALL ${STATIC_PYTHON_FILES} DESTINATION ${CURRENT_PACKAGES_DIR}/include/vtk-${VTK_SHORT_VERSION}) | ||
| if(EXISTS ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/CMakeFiles/static_python) #python headers | ||
| file(INSTALL ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/CMakeFiles/static_python DESTINATION ${CURRENT_PACKAGES_DIR}/include/vtk-${VTK_SHORT_VERSION}) | ||
| endif() | ||
| endif() | ||
|
|
||
|
|
||
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.