Skip to content
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

vtk build failure when VCPKG_BUILD_TYPE=release #11641

Closed
rossctaylor opened this issue May 28, 2020 · 0 comments · Fixed by #11643
Closed

vtk build failure when VCPKG_BUILD_TYPE=release #11641

rossctaylor opened this issue May 28, 2020 · 0 comments · Fixed by #11643
Assignees
Labels
category:port-bug The issue is with a library, which is something the port should already support

Comments

@rossctaylor
Copy link

Host Environment

  • OS: Windows 10
  • Compiler: VS2019

To Reproduce
Steps to reproduce the behavior:
In PowerShell:

cp .\triplets\x64-windows.cmake .\triplets\x64-windows-release.cmake
Add-Content .\triplets\x64-windows-release.cmake "set(VCPKG_BUILD_TYPE release)"
./vcpkg install vtk

Failure logs

CMake Error at ports/vtk/portfile.cmake:201 (file):
  file failed to open for reading (No such file or directory):

    C:/Users/Ross Taylor/Q/vcpkg/packages/vtk_x64-windows-release/share/vtk/VTK-targets-debug.cmake

Additional context
If only release is built there is no VTK-targets-debug.cmake file generated so the code that tries to modify it fails. A simple fix is to verify the file is there (in portfile.cmake line 199):

    # 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
    set(filename ${CURRENT_PACKAGES_DIR}/share/vtk/VTK-targets-debug.cmake)
    if(EXISTS ${filename})
        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()
@JackBoosY JackBoosY added the category:port-bug The issue is with a library, which is something the port should already support label May 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:port-bug The issue is with a library, which is something the port should already support
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants