2020-03-05 05:34:17 +08:00
if ( NOT VCPKG_TARGET_IS_WINDOWS )
2018-12-18 04:09:44 +08:00
message ( WARNING "You will need to install Xorg dependencies to build vtk:\napt-get install libxt-dev\n" )
endif ( )
2020-05-12 04:39:50 +08:00
# TODO:
# - add loguru as a dependency requires #8682
2017-08-28 16:48:30 +08:00
# =============================================================================
2020-05-12 04:39:50 +08:00
# Options:
2017-08-28 16:48:30 +08:00
# Collect CMake options for optional components
2020-05-12 04:39:50 +08:00
if ( "qt" IN_LIST FEATURES )
list ( APPEND ADDITIONAL_OPTIONS
- D V T K _ G R O U P _ E N A B L E _ Q t = Y E S
- D V T K _ M O D U L E _ E N A B L E _ V T K _ G U I S u p p o r t Q t = Y E S
- D V T K _ M O D U L E _ E N A B L E _ V T K _ G U I S u p p o r t Q t S Q L = Y E S
- D V T K _ M O D U L E _ E N A B L E _ V T K _ R e n d e r i n g Q t = Y E S
- D V T K _ M O D U L E _ E N A B L E _ V T K _ V i e w s Q t = Y E S
)
endif ( )
if ( "vtkm" IN_LIST FEATURES )
2017-08-28 16:48:30 +08:00
list ( APPEND ADDITIONAL_OPTIONS
2020-05-12 04:39:50 +08:00
- D V T K _ M O D U L E _ E N A B L E _ V T K _ A c c e l e r a t o r s V T K m = Y E S
- D V T K _ M O D U L E _ E N A B L E _ V T K _ v t k m = Y E S
2017-08-28 16:48:30 +08:00
)
endif ( )
2020-05-12 04:39:50 +08:00
if ( "python" IN_LIST FEATURES )
2019-09-27 01:10:49 +08:00
vcpkg_find_acquire_program ( PYTHON3 )
2017-08-28 16:48:30 +08:00
list ( APPEND ADDITIONAL_OPTIONS
- D V T K _ W R A P _ P Y T H O N = O N
- D V T K _ P Y T H O N _ V E R S I O N = 3
2020-05-12 04:39:50 +08:00
- D P y t h o n 3 _ F I N D _ R E G I S T R Y = N E V E R
- D C M A K E _ D I S A B L E _ F I N D _ P A C K A G E _ P y t h o n 3 = T R U E
" - D P y t h o n 3 _ E X E C U T A B L E : P A T H = $ { P Y T H O N 3 } "
2017-08-28 16:48:30 +08:00
)
2020-05-12 04:39:50 +08:00
if ( VCPKG_TARGET_IS_WINDOWS )
list ( APPEND ADDITIONAL_OPTIONS "-DPython3_LIBRARY_RELEASE:PATH=${CURRENT_INSTALLED_DIR}/lib/python37.lib"
" - D P y t h o n 3 _ L I B R A R Y _ D E B U G : P A T H = $ { C U R R E N T _ I N S T A L L E D _ D I R } / d e b u g / l i b / p y t h o n 3 7 _ d . l i b "
" - D P y t h o n 3 _ L I B R A R I E S : S T R I N G = d e b u g \ \ \ \ \ \ \ ; $ { C U R R E N T _ I N S T A L L E D _ D I R } / d e b u g / l i b / p y t h o n 3 7 _ d . l i b \ \ \ \ \ \ \ ; o p t i m i z e d \ \ \ \ \ \ \ ; $ { C U R R E N T _ I N S T A L L E D _ D I R } / l i b / p y t h o n 3 7 . l i b "
" - D P Y T H O N _ D E B U G _ L I B R A R Y : P A T H = $ { C U R R E N T _ I N S T A L L E D _ D I R } / d e b u g / l i b / p y t h o n 3 7 _ d . l i b "
" - D P y t h o n 3 _ I N C L U D E _ D I R : P A T H = $ { C U R R E N T _ I N S T A L L E D _ D I R } / i n c l u d e / p y t h o n 3 . 7 " )
elseif ( VCPKG_TARGET_IS_LINUX )
list ( APPEND ADDITIONAL_OPTIONS "-DPython3_LIBRARY_RELEASE:PATH=${CURRENT_INSTALLED_DIR}/lib/libpython37m.a"
" - D P y t h o n 3 _ L I B R A R Y _ D E B U G : P A T H = $ { C U R R E N T _ I N S T A L L E D _ D I R } / d e b u g / l i b / l i b p y t h o n 3 7 m d . a "
" - D P y t h o n 3 _ L I B R A R I E S : S T R I N G = d e b u g \ \ \ \ \ \ \ ; $ { C U R R E N T _ I N S T A L L E D _ D I R } / d e b u g / l i b / l i b p y t h o n 3 7 m d . a \ \ \ \ \ \ \ ; o p t i m i z e d \ \ \ \ \ \ \ ; $ { C U R R E N T _ I N S T A L L E D _ D I R } / l i b / l i b p y t h o n 3 7 m . a "
" - D P Y T H O N _ D E B U G _ L I B R A R Y : P A T H = $ { C U R R E N T _ I N S T A L L E D _ D I R } / d e b u g / l i b / l i b p y t h o n 3 7 m d . a "
" - D P y t h o n 3 _ I N C L U D E _ D I R : P A T H = $ { C U R R E N T _ I N S T A L L E D _ D I R } / i n c l u d e / p y t h o n 3 . 7 m " )
elseif ( VCPKG_TARGET_IS_OSX )
#Need Python3 information on OSX within VCPKG
endif ( )
#VTK_PYTHON_SITE_PACKAGES_SUFFIX should be set to the install dir of the site-packages
2017-08-28 16:48:30 +08:00
endif ( )
2020-05-12 04:39:50 +08:00
if ( "paraview" IN_LIST FEATURES )
2017-08-28 16:48:30 +08:00
list ( APPEND ADDITIONAL_OPTIONS
2020-05-12 04:39:50 +08:00
- D V T K _ M O D U L E _ E N A B L E _ V T K _ F i l t e r s P a r a l l e l S t a t i s t i c s = Y E S
- D V T K _ M O D U L E _ E N A B L E _ V T K _ I O P a r a l l e l E x o d u s = Y E S
- D V T K _ M O D U L E _ E N A B L E _ V T K _ R e n d e r i n g C o n t e x t O p e n G L 2 = Y E S
- D V T K _ M O D U L E _ E N A B L E _ V T K _ R e n d e r i n g P a r a l l e l = Y E S
- D V T K _ M O D U L E _ E N A B L E _ V T K _ R e n d e r i n g V o l u m e A M R = Y E S
- D V T K _ M O D U L E _ E N A B L E _ V T K _ I O X d m f 2 = Y E S
- D V T K _ M O D U L E _ E N A B L E _ V T K _ I O H 5 p a r t = Y E S
- D V T K _ M O D U L E _ E N A B L E _ V T K _ I O P a r a l l e l L S D y n a = Y E S
- D V T K _ M O D U L E _ E N A B L E _ V T K _ I O T R U C H A S = Y E S
- D V T K _ M O D U L E _ E N A B L E _ V T K _ I O V P I C = Y E S
- D V T K _ M O D U L E _ E N A B L E _ V T K _ R e n d e r i n g L I C O p e n G L 2 = Y E S
- D V T K _ M O D U L E _ E N A B L E _ V T K _ R e n d e r i n g A n n o t a t i o n = Y E S
2017-08-28 16:48:30 +08:00
)
2020-05-12 04:39:50 +08:00
if ( "python" IN_LIST FEATURES )
list ( APPEND ADDITIONAL_OPTIONS
- D V T K _ M O D U L E _ E N A B L E _ V T K _ R e n d e r i n g M a t p l o t l i b = Y E S
)
endif ( )
2017-08-28 16:48:30 +08:00
endif ( )
2017-08-11 00:20:40 +08:00
2020-05-12 04:39:50 +08:00
if ( "mpi" IN_LIST FEATURES )
list ( APPEND ADDITIONAL_OPTIONS
- D V T K _ G R O U P _ E N A B L E _ M P I = Y E S
)
endif ( )
if ( "all" IN_LIST FEATURES )
list ( APPEND ADDITIONAL_OPTIONS
- D V T K _ U S E _ T K = O F F # TCL/TK currently not included in vcpkg
)
2020-03-05 05:34:17 +08:00
endif ( )
2020-05-12 04:39:50 +08:00
vcpkg_check_features ( OUT_FEATURE_OPTIONS FEATURE_OPTIONS
" c u d a " V T K _ U S E _ C U D A
" a l l " V T K _ B U I L D _ A L L _ M O D U L E S
)
# =============================================================================
# Clone & patch
vcpkg_from_github (
O U T _ S O U R C E _ P A T H S O U R C E _ P A T H
R E P O K i t w a r e / V T K
R E F a b 2 7 8 e 8 7 b 1 8 1 e 3 a 0 2 0 8 2 b e a 7 3 6 1 f b a a 3 d d a f b 3 a d # v9.0
S H A 5 1 2 5 0 a 3 2 4 f 5 5 b 5 8 b c 4 4 1 5 f 9 7 2 f 7 1 1 4 2 0 e 8 3 b 4 1 a 1 0 0 b 2 7 7 2 9 2 6 6 d b 4 5 4 1 c 2 4 b c 7 d 7 b c d 2 7 d 9 1 5 8 c e 2 5 8 8 1 7 8 b 9 b 2 e 4 3 c 2 0 b 9 6 9 5 f f e 3 8 2 6 0 5 f 5 c d e 3 3 1 e 8 3 7 1 e 2 1 3 6 5 5 1 6 4
H E A D _ R E F m a s t e r
P A T C H E S
F i n d L i b H a r u . p a t c h
F i n d L Z M A . p a t c h
F i n d L Z 4 . p a t c h
F i n d p r o j . p a t c h
v t k m . p a t c h # To include an external VTKm build (v.1.5 required)
p e g t l . p a t c h
##pythonwrapper.patch # needs checking with paraview PR if still required
##NoUndefDebug.patch # needs checking with paraview PR if still required
# Last patch TODO: Patch out internal loguru
)
# =============================================================================
#Overwrite outdated modules if they have not been patched:
file ( COPY "${CURRENT_PORT_DIR}/FindPostgreSQL.cmake" DESTINATION "${SOURCE_PATH}/CMake" )
file ( COPY "${CURRENT_PORT_DIR}/FindHDF5.cmake" DESTINATION "${SOURCE_PATH}/CMake/patches/99" )
# =============================================================================
2017-08-28 16:48:30 +08:00
# =============================================================================
# Configure & Install
2019-03-15 05:38:47 +08:00
2020-05-12 04:39:50 +08:00
# We set all libraries to "system" and explicitly list the ones that should use embedded copies
2017-01-12 18:03:02 +08:00
vcpkg_configure_cmake (
S O U R C E _ P A T H $ { S O U R C E _ P A T H }
2017-02-28 21:45:42 +08:00
P R E F E R _ N I N J A
2019-10-11 10:00:45 +08:00
O P T I O N S $ { F E A T U R E _ O P T I O N S }
2017-01-12 18:03:02 +08:00
- D B U I L D _ T E S T I N G = O F F
2020-05-12 04:39:50 +08:00
- D V T K _ B U I L D _ T E S T I N G = O F F
- D V T K _ B U I L D _ E X A M P L E S = O F F
2017-08-11 16:17:32 +08:00
- D V T K _ I N S T A L L _ I N C L U D E _ D I R = i n c l u d e
2017-01-12 18:03:02 +08:00
- D V T K _ I N S T A L L _ D A T A _ D I R = s h a r e / v t k / d a t a
- D V T K _ I N S T A L L _ D O C _ D I R = s h a r e / v t k / d o c
- D V T K _ I N S T A L L _ P A C K A G E _ D I R = s h a r e / v t k
2019-02-22 03:47:54 +08:00
- D V T K _ I N S T A L L _ R U N T I M E _ D I R = b i n
2017-02-28 21:45:42 +08:00
- D V T K _ F O R B I D _ D O W N L O A D S = O N
2020-05-12 04:39:50 +08:00
# VTK groups to enable
- D V T K _ G R O U P _ E N A B L E _ S t a n d A l o n e = Y E S
- D V T K _ G R O U P _ E N A B L E _ R e n d e r i n g = Y E S
- D V T K _ G R O U P _ E N A B L E _ V i e w s = Y E S
# Disable deps not in VCPKG
- D V T K _ U S E _ T K = O F F # TCL/TK currently not included in vcpkg
2019-04-03 17:16:30 +08:00
# Select modules / groups to install
2020-05-12 04:39:50 +08:00
- D V T K _ U S E _ E X T E R N A L : B O O L = O N
- D V T K _ M O D U L E _ U S E _ E X T E R N A L _ V T K _ g l 2 p s : B O O L = O F F # Not yet in VCPKG
2019-04-03 17:16:30 +08:00
2017-01-12 18:03:02 +08:00
$ { A D D I T I O N A L _ O P T I O N S }
)
vcpkg_install_cmake ( )
vcpkg_copy_pdbs ( )
2017-08-28 16:48:30 +08:00
# =============================================================================
# Fixup target files
2020-05-12 04:39:50 +08:00
vcpkg_fixup_cmake_targets ( CONFIG_PATH lib/cmake/vtk-9.0 )
2017-01-12 18:03:02 +08:00
2020-05-12 04:39:50 +08:00
# TODO: Check if the following is still required
2017-08-28 16:48:30 +08:00
# For some reason the references to the XDMF libraries in the target files do not end up
# correctly, so we fix them here.
2020-05-12 04:39:50 +08:00
# if(VTK_WITH_ALL_MODULES)
# file(READ ${CURRENT_PACKAGES_DIR}/share/vtk/VTKTargets-release.cmake VTK_TARGETS_RELEASE_CONTENT)
# string(REPLACE "lib/../XdmfCore.lib" "lib/XdmfCore.lib" VTK_TARGETS_RELEASE_CONTENT "${VTK_TARGETS_RELEASE_CONTENT}")
# string(REPLACE "bin/../XdmfCore.dll" "bin/XdmfCore.dll" VTK_TARGETS_RELEASE_CONTENT "${VTK_TARGETS_RELEASE_CONTENT}")
# string(REPLACE "lib/../vtkxdmf3.lib" "lib/vtkxdmf3.lib" VTK_TARGETS_RELEASE_CONTENT "${VTK_TARGETS_RELEASE_CONTENT}")
# string(REPLACE "bin/../vtkxdmf3.dll" "bin/vtkxdmf3.dll" VTK_TARGETS_RELEASE_CONTENT "${VTK_TARGETS_RELEASE_CONTENT}")
# file(WRITE ${CURRENT_PACKAGES_DIR}/share/vtk/VTKTargets-release.cmake "${VTK_TARGETS_RELEASE_CONTENT}")
2020-04-22 04:14:22 +08:00
2020-05-12 04:39:50 +08:00
# file(READ ${CURRENT_PACKAGES_DIR}/share/vtk/VTKTargets-debug.cmake VTK_TARGETS_DEBUG_CONTENT)
# string(REPLACE "lib/../XdmfCore.lib" "lib/XdmfCore.lib" VTK_TARGETS_DEBUG_CONTENT "${VTK_TARGETS_DEBUG_CONTENT}")
# string(REPLACE "bin/../XdmfCore.dll" "bin/XdmfCore.dll" VTK_TARGETS_DEBUG_CONTENT "${VTK_TARGETS_DEBUG_CONTENT}")
# string(REPLACE "lib/../vtkxdmf3.lib" "lib/vtkxdmf3.lib" VTK_TARGETS_DEBUG_CONTENT "${VTK_TARGETS_DEBUG_CONTENT}")
# string(REPLACE "bin/../vtkxdmf3.dll" "bin/vtkxdmf3.dll" VTK_TARGETS_DEBUG_CONTENT "${VTK_TARGETS_DEBUG_CONTENT}")
# file(WRITE ${CURRENT_PACKAGES_DIR}/share/vtk/VTKTargets-debug.cmake "${VTK_TARGETS_DEBUG_CONTENT}")
# endif()
# =============================================================================
# Remove other files and directories that are not valid for vcpkg
# if(VTK_WITH_ALL_MODULES)
# file(REMOVE ${CURRENT_PACKAGES_DIR}/XdmfConfig.cmake)
# file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/XdmfConfig.cmake)
# endif()
2018-10-26 02:47:58 +08:00
2017-08-28 16:48:30 +08:00
# =============================================================================
2018-04-30 22:02:11 +08:00
# Clean-up other directories
2017-01-12 18:03:02 +08:00
2020-05-12 04:39:50 +08:00
2019-02-22 03:47:54 +08:00
# Delete the debug binary TOOL_NAME that is not required
function ( _vtk_remove_debug_tool TOOL_NAME )
2020-05-12 04:39:50 +08:00
set ( filename ${ CURRENT_PACKAGES_DIR } /debug/bin/ ${ TOOL_NAME } ${ VCPKG_TARGET_EXECUTABLE_SUFFIX } )
if ( EXISTS ${ filename } )
file ( REMOVE ${ filename } )
2019-02-22 03:47:54 +08:00
endif ( )
2020-05-12 04:39:50 +08:00
set ( filename ${ CURRENT_PACKAGES_DIR } /debug/bin/ ${ TOOL_NAME } d ${ VCPKG_TARGET_EXECUTABLE_SUFFIX } )
if ( EXISTS ${ filename } )
file ( REMOVE ${ filename } )
2019-02-22 03:47:54 +08:00
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
2020-05-12 04:39:50 +08:00
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}" )
2019-02-22 03:47:54 +08:00
endfunction ( )
2017-08-28 16:48:30 +08:00
2019-02-22 03:47:54 +08:00
# Move the release binary TOOL_NAME from bin to tools
function ( _vtk_move_release_tool TOOL_NAME )
2020-05-12 04:39:50 +08:00
set ( old_filename "${CURRENT_PACKAGES_DIR}/bin/${TOOL_NAME}${VCPKG_TARGET_EXECUTABLE_SUFFIX}" )
if ( EXISTS ${ old_filename } )
file ( INSTALL ${ old_filename } DESTINATION "${CURRENT_PACKAGES_DIR}/tools/vtk" USE_SOURCE_PERMISSIONS )
file ( REMOVE ${ old_filename } )
2019-02-22 03:47:54 +08:00
endif ( )
2020-05-12 04:39:50 +08:00
2019-02-22 03:47:54 +08:00
# we also have to bend the lines referencing the tools in VTKTargets-release.cmake
# to make them point to the tool folder
2020-05-12 04:39:50 +08:00
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}" )
2017-08-28 16:48:30 +08:00
endfunction ( )
2020-05-12 04:39:50 +08:00
set ( VTK_SHORT_VERSION 9.0 )
2017-08-28 16:48:30 +08:00
set ( VTK_TOOLS
v t k E n c o d e S t r i n g - $ { V T K _ S H O R T _ V E R S I O N }
v t k H a s h S o u r c e - $ { V T K _ S H O R T _ V E R S I O N }
v t k W r a p T c l I n i t - $ { V T K _ S H O R T _ V E R S I O N }
v t k W r a p T c l - $ { V T K _ S H O R T _ V E R S I O N }
v t k W r a p P y t h o n I n i t - $ { V T K _ S H O R T _ V E R S I O N }
v t k W r a p P y t h o n - $ { V T K _ S H O R T _ V E R S I O N }
v t k W r a p J a v a - $ { V T K _ S H O R T _ V E R S I O N }
v t k W r a p H i e r a r c h y - $ { V T K _ S H O R T _ V E R S I O N }
v t k P a r s e J a v a - $ { V T K _ S H O R T _ V E R S I O N }
v t k P a r s e O G L E x t - $ { V T K _ S H O R T _ V E R S I O N }
2020-05-12 04:39:50 +08:00
v t k P r o b e O p e n G L V e r s i o n - $ { V T K _ S H O R T _ V E R S I O N }
v t k T e s t O p e n G L V e r s i o n - $ { V T K _ S H O R T _ V E R S I O N }
2017-08-28 16:48:30 +08:00
v t k p y t h o n
p v t k p y t h o n
)
2020-05-12 04:39:50 +08:00
# TODO: Replace with vcpkg_copy_tools if known which tools are built with which feature
# or add and option to vcpkg_copy_tools which does not require the tool to be present
2019-02-22 03:47:54 +08:00
foreach ( TOOL_NAME IN LISTS VTK_TOOLS )
_vtk_remove_debug_tool ( "${TOOL_NAME}" )
_vtk_move_release_tool ( "${TOOL_NAME}" )
endforeach ( )
2019-04-03 17:16:30 +08:00
if ( VCPKG_LIBRARY_LINKAGE STREQUAL "static" )
2017-08-06 17:37:27 +08:00
file ( REMOVE_RECURSE ${ CURRENT_PACKAGES_DIR } /bin )
file ( REMOVE_RECURSE ${ CURRENT_PACKAGES_DIR } /debug/bin )
endif ( )
2017-01-12 18:03:02 +08:00
2017-08-10 17:56:23 +08:00
file ( REMOVE_RECURSE ${ CURRENT_PACKAGES_DIR } /debug/include )
file ( REMOVE_RECURSE ${ CURRENT_PACKAGES_DIR } /debug/share )
2017-08-28 16:48:30 +08:00
# =============================================================================
2017-01-12 18:03:02 +08:00
# Handle copyright
2020-05-12 04:39:50 +08:00
file ( COPY ${ SOURCE_PATH } /Copyright.txt DESTINATION ${ CURRENT_PACKAGES_DIR } /share/vtk )
file ( RENAME ${ CURRENT_PACKAGES_DIR } /share/vtk/Copyright.txt ${ CURRENT_PACKAGES_DIR } /share/vtk/copyright )
vcpkg_copy_tool_dependencies ( "${CURRENT_PACKAGES_DIR}/tools/vtk" )
## Files Modules needed by ParaView
if ( "paraview" IN_LIST FEATURES )
set ( VTK_CMAKE_NEEDED vtkCompilerChecks vtkCompilerPlatformFlags vtkCompilerExtraFlags vtkInitializeBuildType vtkSupportMacros vtkDirectories vtkVersion FindPythonModules )
foreach ( module ${ VTK_CMAKE_NEEDED } )
file ( INSTALL "${SOURCE_PATH}/CMake/${module}.cmake" DESTINATION ${ CURRENT_PACKAGES_DIR } /share/vtk )
endforeach ( )
file ( INSTALL "${SOURCE_PATH}/CMake/vtkRequireLargeFilesSupport.cxx" DESTINATION ${ CURRENT_PACKAGES_DIR } /share/vtk )
#ParaView requires some internal headers
file ( INSTALL ${ SOURCE_PATH } /Rendering/Annotation/vtkScalarBarActorInternal.h DESTINATION ${ CURRENT_PACKAGES_DIR } /include/vtk- ${ VTK_SHORT_VERSION } )
file ( INSTALL ${ SOURCE_PATH } /Filters/Statistics/vtkStatisticsAlgorithmPrivate.h DESTINATION ${ CURRENT_PACKAGES_DIR } /include/vtk- ${ VTK_SHORT_VERSION } )
file ( INSTALL ${ SOURCE_PATH } /Rendering/OpenGL2/vtkCompositePolyDataMapper2Internal.h DESTINATION ${ CURRENT_PACKAGES_DIR } /include/vtk- ${ VTK_SHORT_VERSION } )
file ( INSTALL ${ CURRENT_BUILDTREES_DIR } / ${ TARGET_TRIPLET } -rel/Rendering/OpenGL2/vtkTextureObjectVS.h DESTINATION ${ CURRENT_PACKAGES_DIR } /include/vtk- ${ VTK_SHORT_VERSION } )
endif ( )
if ( VCPKG_LIBRARY_LINKAGE STREQUAL "static" )
if ( EXISTS ${ CURRENT_BUILDTREES_DIR } / ${ TARGET_TRIPLET } -rel/CMakeFiles/static_python ) #python headers
file ( INSTALL ${ CURRENT_BUILDTREES_DIR } / ${ TARGET_TRIPLET } -rel/CMakeFiles/static_python DESTINATION ${ CURRENT_PACKAGES_DIR } /include/vtk- ${ VTK_SHORT_VERSION } )
endif ( )
endif ( )
#remove one get_filename_component(_vtk_module_import_prefix "${_vtk_module_import_prefix}" DIRECTORY) from vtk-prefix.cmake and VTK-vtk-module-properties and vtk-python.cmake
set ( filenames_fix_prefix vtk-prefix VTK-vtk-module-properties vtk-python )
foreach ( name IN LISTS filenames_fix_prefix )
if ( EXISTS "${CURRENT_PACKAGES_DIR}/share/vtk/${name}.cmake" )
file ( READ "${CURRENT_PACKAGES_DIR}/share/vtk/${name}.cmake" _contents )
string ( REPLACE
[ [ set ( _vtk_module_import_prefix "${CMAKE_CURRENT_LIST_DIR}" )
get_filename_component ( _vtk_module_import_prefix "${_vtk_module_import_prefix}" DIRECTORY ) ] ]
[ [ set ( _vtk_module_import_prefix "${CMAKE_CURRENT_LIST_DIR}" ) ] ] _ c o n t e n t s " $ { _ c o n t e n t s } " )
file ( WRITE "${CURRENT_PACKAGES_DIR}/share/vtk/${name}.cmake" "${_contents}" )
else ( )
debug_message ( "FILE:${CURRENT_PACKAGES_DIR}/share/vtk/${name}.cmake does not exist! No prefix correction!" )
endif ( )
endforeach ( )