diff options
| author | Jack·Boos·Yu <47264268+JackBoosY@users.noreply.github.com> | 2020-06-02 06:58:55 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-06-01 15:58:55 -0700 |
| commit | c6414b172a435068a54474136d92578a3e979f12 (patch) | |
| tree | 0a9c3c94eb298bf14affcea51d865c5be7a0301e | |
| parent | 47a883b395121698ea96a119f73a4d24b1315c0e (diff) | |
| download | vcpkg-c6414b172a435068a54474136d92578a3e979f12.tar.gz vcpkg-c6414b172a435068a54474136d92578a3e979f12.zip | |
[vtk] Fix single configuration builds (#11643)
* [vtk] Improve portfile.cmake
* use VCPKG_BUILD_TYPE instead of CMAKE_BUILD_TYPE
| -rw-r--r-- | ports/vtk/CONTROL | 2 | ||||
| -rw-r--r-- | ports/vtk/portfile.cmake | 26 |
2 files changed, 16 insertions, 12 deletions
diff --git a/ports/vtk/CONTROL b/ports/vtk/CONTROL index 9db2f31e8..307d0f9af 100644 --- a/ports/vtk/CONTROL +++ b/ports/vtk/CONTROL @@ -1,5 +1,5 @@ Source: vtk -Version: 9.0 +Version: 9.0-1 Description: Software system for 3D computer graphics, image processing, and visualization Homepage: https://github.com/Kitware/VTK Build-Depends: zlib, libpng, tiff, libxml2, jsoncpp, glew, freetype, expat, hdf5[core], libjpeg-turbo, proj4, lz4, liblzma, libtheora, eigen3, double-conversion, pugixml, libharu[notiffsymbols], sqlite3, netcdf-c, utfcpp, libogg, pegtl-2 diff --git a/ports/vtk/portfile.cmake b/ports/vtk/portfile.cmake index 790a90115..775736720 100644 --- a/ports/vtk/portfile.cmake +++ b/ports/vtk/portfile.cmake @@ -196,12 +196,14 @@ function(_vtk_remove_debug_tool TOOL_NAME) if(EXISTS ${filename}) file(REMOVE ${filename}) 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}") + 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() endfunction() # Move the release binary TOOL_NAME from bin to tools @@ -212,11 +214,13 @@ function(_vtk_move_release_tool TOOL_NAME) file(REMOVE ${old_filename}) 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}") + 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() endfunction() set(VTK_SHORT_VERSION 9.0) |
