mirror of
https://github.com/microsoft/vcpkg.git
synced 2025-01-18 16:53:02 +08:00
[vtk] Use libjpeg, proj and lz4 from vcpkg
This commit is contained in:
parent
616cfb0eff
commit
4a57f69e16
@ -1,4 +1,4 @@
|
||||
Source: vtk
|
||||
Version: 8.0.0
|
||||
Description: Software system for 3D computer graphics, image processing, and visualization
|
||||
Build-Depends: zlib, libpng, tiff, libxml2, jsoncpp, glew, freetype, expat, hdf5, qt5, msmpi
|
||||
Build-Depends: zlib, libpng, tiff, libxml2, jsoncpp, glew, freetype, expat, hdf5, qt5, msmpi, libjpeg-turbo, proj, lz4
|
||||
|
68
ports/vtk/fix-find-libproj4.patch
Normal file
68
ports/vtk/fix-find-libproj4.patch
Normal file
@ -0,0 +1,68 @@
|
||||
--- a/CMake/FindLIBPROJ4.cmake Thu Aug 10 21:03:55 2017
|
||||
+++ b/CMake/FindLIBPROJ4.cmake Thu Aug 10 21:08:58 2017
|
||||
@@ -11,7 +11,7 @@
|
||||
file( TO_CMAKE_PATH "$ENV{LIBPROJ4_DIR}" _LIBPROJ4_DIR )
|
||||
endif ()
|
||||
|
||||
- find_library( LIBPROJ4_LIBRARIES
|
||||
+ find_library( LIBPROJ4_LIBRARY_RELEASE
|
||||
NAMES proj
|
||||
PATHS
|
||||
${_LIBPROJ4_DIR}/lib64
|
||||
@@ -24,7 +24,21 @@
|
||||
${CMAKE_INSTALL_PREFIX}/lib
|
||||
/usr/local/lib
|
||||
/usr/lib
|
||||
- NO_DEFAULT_PATH
|
||||
+ )
|
||||
+
|
||||
+ find_library( LIBPROJ4_LIBRARY_DEBUG
|
||||
+ NAMES projd
|
||||
+ PATHS
|
||||
+ ${_LIBPROJ4_DIR}/lib64
|
||||
+ ${CMAKE_INSTALL_PREFIX}/lib64
|
||||
+ /usr/local/lib64
|
||||
+ /usr/lib64
|
||||
+ ${_LIBPROJ4_DIR}
|
||||
+ ${_LIBPROJ4_DIR}/lib
|
||||
+ ${CMAKE_INSTALL_PREFIX}/bin
|
||||
+ ${CMAKE_INSTALL_PREFIX}/lib
|
||||
+ /usr/local/lib
|
||||
+ /usr/lib
|
||||
)
|
||||
|
||||
find_path( LIBPROJ4_INCLUDE_DIR
|
||||
@@ -37,19 +51,22 @@
|
||||
/usr/local/include
|
||||
/usr/include
|
||||
/usr/include/postgresql
|
||||
- NO_DEFAULT_PATH
|
||||
)
|
||||
|
||||
- if ( NOT LIBPROJ4_INCLUDE_DIR OR NOT LIBPROJ4_LIBRARIES )
|
||||
- if ( LIBPROJ4_REQUIRED )
|
||||
- message( FATAL_ERROR "LIBPROJ4 is required. Set LIBPROJ4_DIR" )
|
||||
- endif ()
|
||||
- else ()
|
||||
- set( LIBPROJ4_FOUND 1 )
|
||||
- mark_as_advanced( LIBPROJ4_FOUND )
|
||||
- endif ()
|
||||
+ include(SelectLibraryConfigurations)
|
||||
+ select_library_configurations(LIBPROJ4)
|
||||
+
|
||||
+ include(FindPackageHandleStandardArgs)
|
||||
+ find_package_handle_standard_args(LIBPROJ4
|
||||
+ REQUIRED_VARS LIBPROJ4_LIBRARY LIBPROJ4_INCLUDE_DIR)
|
||||
+
|
||||
+ if(LIBPROJ4_FOUND)
|
||||
+ set(LIBPROJ4_INCLUDE_DIRS ${LIBPROJ4_INCLUDE_DIR})
|
||||
|
||||
+ if(NOT LIBPROJ4_LIBRARIES)
|
||||
+ set(LIBPROJ4_LIBRARIES ${LIBPROJ4_LIBRARY})
|
||||
+ endif()
|
||||
+ endif()
|
||||
endif ()
|
||||
|
||||
-mark_as_advanced( FORCE LIBPROJ4_INCLUDE_DIR )
|
||||
-mark_as_advanced( FORCE LIBPROJ4_LIBRARIES )
|
||||
+mark_as_advanced(LIBPROJ4_INCLUDE_DIR)
|
@ -26,6 +26,8 @@ vcpkg_apply_patches(
|
||||
# We disable a workaround in the VTK CMake scripts that can lead to the fact that a dependency
|
||||
# will link to both, the debug and the release library.
|
||||
${CMAKE_CURRENT_LIST_DIR}/disable-workaround-findhdf5.patch
|
||||
|
||||
${CMAKE_CURRENT_LIST_DIR}/fix-find-libproj4.patch
|
||||
)
|
||||
|
||||
# Remove the FindGLEW.cmake that is distributed with VTK, since it does not
|
||||
@ -52,13 +54,16 @@ vcpkg_configure_cmake(
|
||||
-DVTK_USE_SYSTEM_EXPAT=ON
|
||||
-DVTK_USE_SYSTEM_FREETYPE=ON
|
||||
# -DVTK_USE_SYSTEM_GL2PS=ON
|
||||
# -DVTK_USE_SYSTEM_LIBHARU=ON
|
||||
-DVTK_USE_SYSTEM_JPEG=ON
|
||||
-DVTK_USE_SYSTEM_GLEW=ON
|
||||
-DVTK_USE_SYSTEM_HDF5=ON
|
||||
-DVTK_USE_SYSTEM_JSONCPP=ON
|
||||
# -DVTK_USE_SYSTEM_LIBPROJ4=ON
|
||||
# -DVTK_USE_SYSTEM_LIBRARIES=ON
|
||||
-DVTK_USE_SYSTEM_LIBPROJ4=ON
|
||||
-DVTK_USE_SYSTEM_LIBXML2=ON
|
||||
-DVTK_USE_SYSTEM_LZ4=ON
|
||||
# -DVTK_USE_SYSTEM_NETCDF=ON
|
||||
# -DVTK_USE_SYSTEM_NETCDFCPP=ON
|
||||
# -DVTK_USE_SYSTEM_OGGTHEORA=ON
|
||||
-DVTK_USE_SYSTEM_PNG=ON
|
||||
-DVTK_USE_SYSTEM_TIFF=ON
|
||||
@ -141,10 +146,13 @@ endfunction()
|
||||
set(SYSTEM_THIRD_PARTY_MODULES
|
||||
vtkexpat
|
||||
vtkfreetype
|
||||
vtkjpeg
|
||||
vtkglew
|
||||
vtkhdf5
|
||||
vtkjsoncpp
|
||||
vtklibproj4
|
||||
vtklibxml2
|
||||
vtklz4
|
||||
vtkpng
|
||||
vtktiff
|
||||
vtkzlib
|
||||
|
Loading…
Reference in New Issue
Block a user