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
)
2020-06-24 01:20:18 +08:00
endif ( )
if ( "atlmfc" 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 _ G U I S u p p o r t M F C = Y E S
)
endif ( )
2020-05-12 04:39:50 +08:00
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 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
#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
2020-06-24 01:20:18 +08:00
- D V T K _ M O D U L E _ E N A B L E _ V T K _ D o m a i n s C h e m i s t r y O p e n G L 2 = 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
2020-08-28 13:28:30 +08:00
- D V T K _ U S E _ M P I = Y E S
)
endif ( )
if ( "mpi" IN_LIST FEATURES AND "python" IN_LIST FEATURES )
list ( APPEND ADDITIONAL_OPTIONS
- D V T K _ M O D U L E _ U S E _ E X T E R N A L _ V T K _ m p i 4 p y = O F F
2020-05-12 04:39:50 +08:00
)
endif ( )
2020-07-03 04:17:26 +08:00
if ( "opengl" 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 _ D o m a i n s C h e m e s t r y 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 _ I m a g i n g 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 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 G L 2 P S 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 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 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 V o l u m e 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 _ o p e n g l = Y E S
)
endif ( )
2020-07-22 07:04:45 +08:00
if ( "cuda" IN_LIST FEATURES AND CMAKE_HOST_WIN32 )
vcpkg_add_to_path ( "$ENV{CUDA_PATH}/bin" )
endif ( )
2020-05-12 04:39:50 +08:00
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
2020-07-08 04:56:33 +08:00
R E F 9 6 e 6 f a 9 b 3 f f 2 4 5 e 4 d 5 1 d 4 9 f 2 3 d 4 0 e 9 a d 8 7 7 4 e 8 5 e # v9.0.1
S H A 5 1 2 0 e f b 1 8 4 5 0 5 3 b 6 1 4 3 e 5 e e 7 f a 0 8 1 b 8 b e 9 8 f 6 8 2 5 2 6 2 c 5 9 0 5 1 e 8 8 b 2 b e 0 2 4 9 7 e 2 3 3 6 2 0 5 5 0 6 7 b 2 f 8 1 1 e f f 8 2 e 9 3 e b 1 9 4 e 5 a 9 a f d 2 a 1 2 e 3 8 7 8 a 2 5 2 e b 4 0 1 1 a 5 d a b 9 5 1 2 7 a 6 f
2020-05-12 04:39:50 +08:00
H E A D _ R E F m a s t e r
P A T C H E S
2020-08-02 04:48:24 +08:00
6 8 1 1 . p a t c h
2020-06-24 01:20:18 +08:00
F i n d L Z M A . p a t c h # Will be fixed in 9.1?
2020-05-12 04:39:50 +08:00
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
2020-06-24 01:20:18 +08:00
p y t h o n w r a p p e r . p a t c h # Required by ParaView to Wrap required classes
2020-12-12 06:16:29 +08:00
N o U n d e f D e b u g . p a t c h # Required to link against correct Python library depending on build type.
2020-06-24 01:20:18 +08:00
p y t h o n _ d e b u g . p a t c h
2020-06-26 02:11:17 +08:00
f i x - u s i n g - h d f 5 . p a t c h
2020-12-12 06:16:29 +08:00
m o d u l e - n a m e - m a n g l i n g . p a t c h
2020-05-12 04:39:50 +08:00
# Last patch TODO: Patch out internal loguru
2020-08-28 13:20:06 +08:00
F i n d E x p a t . p a t c h # The find_library calls are taken care of by vcpkg-cmake-wrapper.cmake of expat
2020-12-30 08:05:56 +08:00
f i x - f r e e t y p e . p a t c h # Should be fixed next version, !7367 + !7434
2020-05-12 04:39:50 +08:00
)
# =============================================================================
#Overwrite outdated modules if they have not been patched:
2020-06-24 01:20:18 +08:00
file ( COPY "${CURRENT_PORT_DIR}/FindPostgreSQL.cmake" DESTINATION "${SOURCE_PATH}/CMake" ) # will be backported from CMake in VTK in a future release
file ( COPY "${CURRENT_PORT_DIR}/FindHDF5.cmake" DESTINATION "${SOURCE_PATH}/CMake/patches/99" ) # due to usage of targets in netcdf-c
2020-05-12 04:39:50 +08:00
# =============================================================================
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-07-08 04:56:33 +08:00
- D V T K _ E N A B L E _ R E M O T E _ M O D U L E S = O F F
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
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 ( )
2020-06-02 06:58:55 +08:00
if ( NOT VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL debug )
# 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
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 ( )
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
2020-06-02 06:58:55 +08:00
if ( NOT VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL release )
# we also have to bend the lines referencing the tools in VTKTargets-release.cmake
# to make them point to the tool folder
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}" )
endif ( )
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 )
2020-05-12 04:39:50 +08:00
vcpkg_copy_tool_dependencies ( "${CURRENT_PACKAGES_DIR}/tools/vtk" )
## Files Modules needed by ParaView
if ( "paraview" IN_LIST FEATURES )
2020-12-12 06:16:29 +08:00
set ( VTK_CMAKE_NEEDED vtkCompilerChecks vtkCompilerPlatformFlags vtkCompilerExtraFlags vtkInitializeBuildType
2020-06-24 01:20:18 +08:00
v t k S u p p o r t M a c r o s v t k D i r e c t o r i e s v t k V e r s i o n F i n d P y t h o n M o d u l e s v t k M o d u l e D e b u g g i n g v t k E x t e r n a l D a t a )
2020-05-12 04:39:50 +08:00
foreach ( module ${ VTK_CMAKE_NEEDED } )
2020-06-24 01:20:18 +08:00
file ( INSTALL "${SOURCE_PATH}/CMake/${module}.cmake" DESTINATION "${CURRENT_PACKAGES_DIR}/share/vtk" )
2020-05-12 04:39:50 +08:00
endforeach ( )
2020-12-12 06:16:29 +08:00
2020-06-24 01:20:18 +08:00
## Check List on UPDATE !!
file ( INSTALL "${SOURCE_PATH}/CMake/vtkRequireLargeFilesSupport.cxx" DESTINATION "${CURRENT_PACKAGES_DIR}/share/vtk" )
file ( INSTALL "${SOURCE_PATH}/GUISupport/Qt/QVTKOpenGLWidget.h" DESTINATION "${CURRENT_PACKAGES_DIR}/include/vtk-${VTK_SHORT_VERSION}" ) # Legacy header
2020-12-12 06:16:29 +08:00
2020-06-24 01:20:18 +08:00
file ( INSTALL "${SOURCE_PATH}/Common/Core/vtkRange.h" DESTINATION "${CURRENT_PACKAGES_DIR}/include/vtk-${VTK_SHORT_VERSION}" ) # this should get installed by VTK
file ( INSTALL "${SOURCE_PATH}/Common/Core/vtkRangeIterableTraits.h" DESTINATION "${CURRENT_PACKAGES_DIR}/include/vtk-${VTK_SHORT_VERSION}" ) # this should get installed by VTK
file ( INSTALL "${SOURCE_PATH}/Common/DataModel/vtkCompositeDataSetNodeReference.h" DESTINATION "${CURRENT_PACKAGES_DIR}/include/vtk-${VTK_SHORT_VERSION}" ) # this should get installed by VTK
2020-12-12 06:16:29 +08:00
#ParaView requires some internal headers
2020-06-24 01:20:18 +08:00
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}" )
2020-05-12 04:39:50 +08:00
endif ( )
if ( VCPKG_LIBRARY_LINKAGE STREQUAL "static" )
2020-06-24 01:20:18 +08:00
if ( EXISTS ${ CURRENT_BUILDTREES_DIR } / ${ TARGET_TRIPLET } -rel/CMakeFiles/vtkpythonmodules/static_python ) #python headers
file ( GLOB_RECURSE STATIC_PYTHON_FILES "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/CMakeFiles/*/static_python/*.h" )
file ( INSTALL ${ STATIC_PYTHON_FILES } DESTINATION ${ CURRENT_PACKAGES_DIR } /include/vtk- ${ VTK_SHORT_VERSION } )
2020-05-12 04:39:50 +08:00
endif ( )
endif ( )
2020-12-12 06:16:29 +08:00
2020-05-12 04:39:50 +08:00
#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 )
2020-12-12 06:16:29 +08:00
string ( REPLACE
2020-05-12 04:39:50 +08:00
[ [ 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 ( )
2020-12-12 06:16:29 +08:00
# =============================================================================
# Handle copyright
file ( INSTALL ${ SOURCE_PATH } /Copyright.txt DESTINATION ${ CURRENT_PACKAGES_DIR } /share/ ${ PORT } RENAME copyright )