2017-03-03 06:44:43 +08:00
include ( vcpkg_common_functions )
2017-10-12 03:48:41 +08:00
2019-05-10 02:52:25 +08:00
string ( LENGTH "${CURRENT_BUILDTREES_DIR}" BUILDTREES_PATH_LENGTH )
if ( BUILDTREES_PATH_LENGTH GREATER 50 AND CMAKE_HOST_WIN32 )
message ( WARNING "ITKs buildsystem uses very long paths and may fail on your system.\n"
" W e r e c o m m e n d m o v i n g v c p k g t o a s h o r t p a t h s u c h a s ' C : \ \ s r c \ \ v c p k g ' o r u s i n g t h e s u b s t c o m m a n d . "
)
endif ( )
2017-10-12 03:48:41 +08:00
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 I n s i g h t S o f t w a r e C o n s o r t i u m / I T K
2019-06-15 06:04:58 +08:00
R E F 3 e 1 2 e 7 0 0 6 a 5 8 8 1 1 3 6 4 1 4 b e 5 4 2 1 6 a 3 5 b b a c b 5 5 b a a
S H A 5 1 2 9 7 9 6 4 2 9 f 8 7 5 0 f a f f c 8 7 e 4 4 0 5 2 4 5 5 7 4 0 d 1 a 5 6 0 8 8 3 e 8 3 c 3 e d 9 6 1 4 d 1 c 7 a e 9 c c 1 a e 2 2 a 3 6 0 b 5 7 2 d 9 b b 1 c 5 e c 6 2 c a 1 2 a c 8 1 d 3 a a 0 b 8 d b a f f f f 3 e 4 a d 4 c 2 f 8 5 0 7 7 e d 0 4 a 1 0 b
2017-10-12 03:48:41 +08:00
H E A D _ R E F m a s t e r
2019-05-07 07:37:56 +08:00
P A T C H E S f i x _ c o n f l i c t _ w i t h _ o p e n j p 2 _ p c . p a t c h
2017-03-03 06:44:43 +08:00
)
2018-05-01 02:25:11 +08:00
if ( "vtk" IN_LIST FEATURES )
2019-04-03 11:35:44 +08:00
set ( ITKVtkGlue ON )
2018-05-01 02:25:11 +08:00
else ( )
2019-04-03 11:35:44 +08:00
set ( ITKVtkGlue OFF )
2018-05-01 02:25:11 +08:00
endif ( )
2017-03-03 06:44:43 +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 }
P R E F E R _ N I N J A
2018-07-13 21:40:16 +08:00
D I S A B L E _ P A R A L L E L _ C O N F I G U R E
2017-03-03 06:44:43 +08:00
O P T I O N S
- D B U I L D _ T E S T I N G = O F F
- D B U I L D _ E X A M P L E S = O F F
- D D O _ N O T _ I N S T A L L _ I T K _ T E S T _ D R I V E R = O N
- D I T K _ I N S T A L L _ D A T A _ D I R = s h a r e / i t k / d a t a
- D I T K _ I N S T A L L _ D O C _ D I R = s h a r e / i t k / d o c
- D I T K _ I N S T A L L _ P A C K A G E _ D I R = s h a r e / i t k
- D I T K _ L E G A C Y _ R E M O V E = O N
2017-12-12 06:36:49 +08:00
- D I T K _ F U T U R E _ L E G A C Y _ R E M O V E = O N
2017-03-03 06:44:43 +08:00
- D I T K _ U S E _ 6 4 B I T S _ I D S = O N
- D I T K _ U S E _ C O N C E P T _ C H E C K I N G = O N
2017-12-12 06:36:49 +08:00
#-DITK_USE_SYSTEM_LIBRARIES=ON # enables USE_SYSTEM for all third party libraries, some of which do not have vcpkg ports such as CastXML, SWIG, MINC etc
- D I T K _ U S E _ S Y S T E M _ D O U B L E C O N V E R S I O N = O N
2017-03-03 06:44:43 +08:00
- D I T K _ U S E _ S Y S T E M _ E X P A T = O N
- D I T K _ U S E _ S Y S T E M _ J P E G = O N
- D I T K _ U S E _ S Y S T E M _ P N G = O N
- D I T K _ U S E _ S Y S T E M _ T I F F = O N
- D I T K _ U S E _ S Y S T E M _ Z L I B = O N
2019-04-03 11:35:44 +08:00
- D I T K _ U S E _ S Y S T E M _ E I G E N = O N
2019-03-08 04:00:35 +08:00
# This should be turned on some day, however for now ITK does download specific versions so it shouldn't spontaneously break
2017-03-03 06:44:43 +08:00
- D I T K _ F O R B I D _ D O W N L O A D S = O F F
2017-12-12 06:36:49 +08:00
2019-03-08 04:00:35 +08:00
- D I T K _ S K I P _ P A T H _ L E N G T H _ C H E C K S = O N
2019-05-03 13:57:43 +08:00
# I haven't tried Python wrapping in vcpkg
2017-12-12 06:36:49 +08:00
#-DITK_WRAP_PYTHON=ON
#-DITK_PYTHON_VERSION=3
2019-04-03 11:35:44 +08:00
- D I T K _ U S E _ S Y S T E M _ H D F 5 = O N # HDF5 was problematic in the past
- D M o d u l e _ I T K V t k G l u e = $ { I T K V t k G l u e } # optional feature
2017-12-12 06:36:49 +08:00
2017-03-03 06:44:43 +08:00
- D M o d u l e _ I O S T L = O N # example how to turn on a non-default module
- D M o d u l e _ M o r p h o l o g i c a l C o n t o u r I n t e r p o l a t i o n = O N # example how to turn on a remote module
- D M o d u l e _ R L E I m a g e = O N # example how to turn on a remote module
2019-05-07 07:37:56 +08:00
- D G D C M _ U S E _ S Y S T E M _ O P E N J P E G = O N #Use port openjpeg instead of own third-party
2017-03-03 06:44:43 +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 ( )
2019-06-15 06:04:58 +08:00
vcpkg_fixup_cmake_targets ( CONFIG_PATH lib/cmake ) # combines release and debug build configurations
2019-04-03 11:35:44 +08:00
2017-03-03 06:44:43 +08:00
file ( REMOVE_RECURSE ${ CURRENT_PACKAGES_DIR } /debug/share )
file ( REMOVE_RECURSE ${ CURRENT_PACKAGES_DIR } /debug/include )
# Handle copyright
file ( COPY ${ SOURCE_PATH } /LICENSE DESTINATION ${ CURRENT_PACKAGES_DIR } /share/itk )
file ( RENAME ${ CURRENT_PACKAGES_DIR } /share/itk/LICENSE ${ CURRENT_PACKAGES_DIR } /share/itk/copyright )