mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-28 01:09:07 +08:00
[vtk] Fix single configuration builds (#11643)
* [vtk] Improve portfile.cmake * use VCPKG_BUILD_TYPE instead of CMAKE_BUILD_TYPE
This commit is contained in:
parent
47a883b395
commit
c6414b172a
@ -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
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user