diff options
| author | Francois Budin <francois.budin@kitware.com> | 2018-04-30 10:02:11 -0400 |
|---|---|---|
| committer | Francois Budin <francois.budin@kitware.com> | 2018-05-04 08:31:57 -0400 |
| commit | aca3eb52621e08efd01f03c4ffd86d9e6b4928b6 (patch) | |
| tree | 65b3a8cd270e6b1165382a8e69020dbe8dcf5fc0 | |
| parent | c02405da491c22e1337e12e02c116d65c03d777a (diff) | |
| download | vcpkg-aca3eb52621e08efd01f03c4ffd86d9e6b4928b6.tar.gz vcpkg-aca3eb52621e08efd01f03c4ffd86d9e6b4928b6.zip | |
Update VTK portfile to select RUNTIME install directories with CMake options
| -rw-r--r-- | ports/vtk/portfile.cmake | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/ports/vtk/portfile.cmake b/ports/vtk/portfile.cmake index be344f8bf..54246008a 100644 --- a/ports/vtk/portfile.cmake +++ b/ports/vtk/portfile.cmake @@ -165,6 +165,7 @@ vcpkg_configure_cmake( -DVTK_INSTALL_DATA_DIR=share/vtk/data -DVTK_INSTALL_DOC_DIR=share/vtk/doc -DVTK_INSTALL_PACKAGE_DIR=share/vtk + -DVTK_INSTALL_RUNTIME_DIR=tools -DVTK_FORBID_DOWNLOADS=ON ${ADDITIONAL_OPTIONS} ) @@ -294,15 +295,14 @@ string(REGEX REPLACE "${CURRENT_INSTALLED_DIR}/lib/[^\\.]*\\.lib" "" VTK_TARGETS file(WRITE "${CURRENT_PACKAGES_DIR}/share/vtk/VTKTargets.cmake" "${VTK_TARGETS_CONTENT}") # ============================================================================= -# Move executable to tools directory and clean-up other directories -file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/tools/vtk) +# Clean-up other directories -function(_vtk_move_tool TOOL_NAME) - if(EXISTS ${CURRENT_PACKAGES_DIR}/bin/${TOOL_NAME}.exe) - file(RENAME ${CURRENT_PACKAGES_DIR}/bin/${TOOL_NAME}.exe ${CURRENT_PACKAGES_DIR}/tools/vtk/${TOOL_NAME}.exe) - endif() - file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/${TOOL_NAME}.exe) +function(_vtk_remove_tool TOOL_NAME) + set(filename ${CURRENT_PACKAGES_DIR}/debug/bin/${TOOL_NAME}.exe) + if(EXISTS ${filename}) + file(REMOVE ${filename}) + endif() endfunction() set(VTK_TOOLS @@ -326,7 +326,7 @@ string(REPLACE "vtk::hdf5::hdf5" "" _contents "${_contents}") file(WRITE "${CURRENT_PACKAGES_DIR}/share/vtk/Modules/vtkhdf5.cmake" "${_contents}") foreach(TOOL_NAME IN LISTS VTK_TOOLS) - _vtk_move_tool("${TOOL_NAME}") + _vtk_remove_tool("${TOOL_NAME}") endforeach() # ============================================================================= |
