Vcpkg: [VTK] some third party modules point to release libraries only.

Created on 4 Dec 2019  路  2Comments  路  Source: microsoft/vcpkg

Describe the bug
E.g. share/vtk/Modules/vtkdoubleconversion.cmake:
set(vtkdoubleconversion_LIBRARIES "${VTK_INSTALL_PREFIX}/lib/double-conversion.lib")

Affect third part modules:

  • double-conversion
  • expat
  • jsoncpp
  • proj
  • libxml2
  • netcdf
  • ogg
  • sqlite3
  • theoraenc / theoradec
port-bug

All 2 comments

@JackBoosY :

You can test this if you want (my main concern currently is paraview):
(Insert after the _IMPORT_PREFIX fix; Around line 170)

# Correct 3rd Party modules in *.cmake:
set(FILE "${CURRENT_PACKAGES_DIR}/share/vtk/Modules/vtkdoubleconversion.cmake")
file(READ "${FILE}" _contents)
string(REPLACE [["${VTK_INSTALL_PREFIX}/lib/double-conversion.lib"]] 
               [[optimized;"${VTK_INSTALL_PREFIX}/lib/double-conversion.lib";debug;"${VTK_INSTALL_PREFIX}/debug/lib/double-conversion.lib"]] 
               _contents "${_contents}")
file(WRITE "${FILE}" "${_contents}")

set(FILE "${CURRENT_PACKAGES_DIR}/share/vtk/Modules/vtkexpat.cmake")
file(READ "${FILE}" _contents)
string(REPLACE [["${VTK_INSTALL_PREFIX}/lib/expat.lib"]] 
               [[optimized;"${VTK_INSTALL_PREFIX}/lib/expat.lib";debug;"${VTK_INSTALL_PREFIX}/debug/lib/expat.lib"]] 
               _contents "${_contents}")
file(WRITE "${FILE}" "${_contents}")

set(FILE "${CURRENT_PACKAGES_DIR}/share/vtk/Modules/vtkjsoncpp.cmake")
file(READ "${FILE}" _contents)
string(REPLACE [["${VTK_INSTALL_PREFIX}/lib/jsoncpp.lib"]] 
               [[optimized;"${VTK_INSTALL_PREFIX}/lib/jsoncpp.lib";debug;"${VTK_INSTALL_PREFIX}/debug/lib/jsoncpp.lib"]] 
               _contents "${_contents}")
file(WRITE "${FILE}" "${_contents}")

set(FILE "${CURRENT_PACKAGES_DIR}/share/vtk/Modules/vtklibproj.cmake")
file(READ "${FILE}" _contents)
string(REPLACE [["${VTK_INSTALL_PREFIX}/lib/proj.lib"]] 
               [[optimized;"${VTK_INSTALL_PREFIX}/lib/proj.lib";debug;"${VTK_INSTALL_PREFIX}/debug/lib/proj_d.lib"]] 
               _contents "${_contents}")
file(WRITE "${FILE}" "${_contents}")

set(FILE "${CURRENT_PACKAGES_DIR}/share/vtk/Modules/vtklibxml2.cmake")
file(READ "${FILE}" _contents)
string(REPLACE [["${VTK_INSTALL_PREFIX}/lib/libxml2.lib"]] 
               [[optimized;"${VTK_INSTALL_PREFIX}/lib/libxml2.lib";debug;"${VTK_INSTALL_PREFIX}/debug/lib/libxml2.lib"]] 
               _contents "${_contents}")
file(WRITE "${FILE}" "${_contents}")

set(FILE "${CURRENT_PACKAGES_DIR}/share/vtk/Modules/vtknetcdf.cmake")
file(READ "${FILE}" _contents)
string(REPLACE [["${VTK_INSTALL_PREFIX}/lib/netcdf.lib"]] 
               [[optimized;"${VTK_INSTALL_PREFIX}/lib/netcdf.lib";debug;"${VTK_INSTALL_PREFIX}/debug/lib/netcdf.lib"]] 
               _contents "${_contents}")
file(WRITE "${FILE}" "${_contents}")

set(FILE "${CURRENT_PACKAGES_DIR}/share/vtk/Modules/vtkogg.cmake")
file(READ "${FILE}" _contents)
string(REPLACE [["${VTK_INSTALL_PREFIX}/lib/ogg.lib"]] 
               [[optimized;"${VTK_INSTALL_PREFIX}/lib/ogg.lib";debug;"${VTK_INSTALL_PREFIX}/debug/lib/ogg.lib"]] 
               _contents "${_contents}")
file(WRITE "${FILE}" "${_contents}")

set(FILE "${CURRENT_PACKAGES_DIR}/share/vtk/Modules/vtksqlite.cmake")
file(READ "${FILE}" _contents)
string(REPLACE [["${VTK_INSTALL_PREFIX}/lib/sqlite3.lib"]] 
               [[optimized;"${VTK_INSTALL_PREFIX}/lib/sqlite3.lib";debug;"${VTK_INSTALL_PREFIX}/debug/lib/sqlite3.lib"]] 
               _contents "${_contents}")
file(WRITE "${FILE}" "${_contents}")

set(FILE "${CURRENT_PACKAGES_DIR}/share/vtk/Modules/vtktheora.cmake")
file(READ "${FILE}" _contents)
string(REPLACE [["${VTK_INSTALL_PREFIX}/lib/theoraenc.lib;${VTK_INSTALL_PREFIX}/lib/theoradec.lib"]] 
               [[optimized;"${VTK_INSTALL_PREFIX}/lib/theoraenc.lib;${VTK_INSTALL_PREFIX}/lib/theoradec.lib";debug;"${VTK_INSTALL_PREFIX}/debug/lib/theoraenc.lib;${VTK_INSTALL_PREFIX}/debug/lib/theoradec.lib"]] 
               _contents "${_contents}")
file(WRITE "${FILE}" "${_contents}")

This seems to be an artifact of the old variable-based build system. 9.0 uses imported targets and shouldn't have this problem anymore.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

spindensity picture spindensity  路  3Comments

cskrisz picture cskrisz  路  3Comments

PhilLab picture PhilLab  路  3Comments

jack17529 picture jack17529  路  3Comments

angelmixu picture angelmixu  路  3Comments