2021-07-16 08:19:56 +08:00
vcpkg_from_gitlab (
G I T L A B _ U R L h t t p s : / / g i t l a b . g n o m e . o r g /
2019-03-16 06:29:08 +08:00
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 G N O M E / l i b x m l 2
2023-09-06 13:32:52 +08:00
R E F " v $ { V E R S I O N } "
2024-08-13 07:36:17 +08:00
S H A 5 1 2 3 f 2 d e 4 4 6 6 5 7 b f 3 c 2 3 c 9 2 3 5 8 c e 8 9 4 6 f 5 9 2 5 3 b 9 f c c 0 9 5 7 7 b 5 9 e e c a f f d b d 9 7 e 0 5 1 6 5 9 8 5 5 c 7 9 f 4 8 8 2 e e 9 f 8 8 4 1 d d 1 9 4 b 6 b d 5 d e 2 a 8 0 1 7 6 9 1 4 7 3 b 5 0 5 e 9 0 5 b 9 d d e 6 a 1 b c 9
2019-03-16 06:29:08 +08:00
H E A D _ R E F m a s t e r
2023-03-23 07:20:43 +08:00
P A T C H E S
2022-04-19 07:41:29 +08:00
d i s a b l e - d o c s . p a t c h
2021-07-16 08:19:56 +08:00
f i x _ c m a k e l i s t . p a t c h
2016-10-16 02:52:05 +08:00
)
2021-07-16 08:19:56 +08:00
vcpkg_check_features ( OUT_FEATURE_OPTIONS FEATURE_OPTIONS
F E A T U R E S
2023-03-23 07:20:43 +08:00
" f t p " L I B X M L 2 _ W I T H _ F T P
" h t t p " L I B X M L 2 _ W I T H _ H T T P
" i c o n v " L I B X M L 2 _ W I T H _ I C O N V
" l e g a c y " L I B X M L 2 _ W I T H _ L E G A C Y
" l z m a " L I B X M L 2 _ W I T H _ L Z M A
" z l i b " L I B X M L 2 _ W I T H _ Z L I B
" t o o l s " L I B X M L 2 _ W I T H _ P R O G R A M S
2023-12-01 18:20:53 +08:00
" i c u " L I B X M L 2 _ W I T H _ I C U
2021-07-16 08:19:56 +08:00
)
2021-08-03 07:44:53 +08:00
vcpkg_cmake_configure (
2022-04-19 07:41:29 +08:00
S O U R C E _ P A T H " $ { S O U R C E _ P A T H } "
2021-03-23 06:52:17 +08:00
O P T I O N S
2021-07-16 08:19:56 +08:00
$ { F E A T U R E _ O P T I O N S }
- D L I B X M L 2 _ W I T H _ T E S T S = O F F
- D L I B X M L 2 _ W I T H _ H T M L = O N
- D L I B X M L 2 _ W I T H _ C 1 4 N = O N
- D L I B X M L 2 _ W I T H _ C A T A L O G = O N
2023-03-23 07:20:43 +08:00
- D L I B X M L 2 _ W I T H _ D E B U G = O N
- D L I B X M L 2 _ W I T H _ I S O 8 8 5 9 X = O N
2021-07-16 08:19:56 +08:00
- D L I B X M L 2 _ W I T H _ M E M _ D E B U G = O F F
- D L I B X M L 2 _ W I T H _ M O D U L E S = O N
- D L I B X M L 2 _ W I T H _ O U T P U T = O N
- D L I B X M L 2 _ W I T H _ P A T T E R N = O N
- D L I B X M L 2 _ W I T H _ P U S H = O N
- D L I B X M L 2 _ W I T H _ P Y T H O N = O F F
- D L I B X M L 2 _ W I T H _ R E A D E R = O N
- D L I B X M L 2 _ W I T H _ R E G E X P S = O N
- D L I B X M L 2 _ W I T H _ S A X 1 = O N
- D L I B X M L 2 _ W I T H _ S C H E M A S = O N
- D L I B X M L 2 _ W I T H _ S C H E M A T R O N = O N
- D L I B X M L 2 _ W I T H _ T H R E A D S = O N
- D L I B X M L 2 _ W I T H _ T H R E A D _ A L L O C = O F F
- D L I B X M L 2 _ W I T H _ T R E E = O N
- D L I B X M L 2 _ W I T H _ V A L I D = O N
- D L I B X M L 2 _ W I T H _ W R I T E R = O N
- D L I B X M L 2 _ W I T H _ X I N C L U D E = O N
- D L I B X M L 2 _ W I T H _ X P A T H = O N
- D L I B X M L 2 _ W I T H _ X P T R = O N
2016-10-16 02:52:05 +08:00
)
2021-08-03 07:44:53 +08:00
vcpkg_cmake_install ( )
2016-10-16 02:52:05 +08:00
2024-11-26 04:37:34 +08:00
vcpkg_cmake_config_fixup ( CONFIG_PATH "lib/cmake/libxml2-${VERSION}" )
2020-11-12 07:28:09 +08:00
vcpkg_fixup_pkgconfig ( )
2016-11-01 04:35:53 +08:00
2017-08-30 13:19:34 +08:00
vcpkg_copy_pdbs ( )
2018-03-12 14:41:51 +08:00
2021-07-16 08:19:56 +08:00
if ( "tools" IN_LIST FEATURES )
vcpkg_copy_tools ( TOOL_NAMES xmllint xmlcatalog AUTO_CLEAN )
endif ( )
2023-03-23 07:20:43 +08:00
2018-03-12 14:41:51 +08:00
if ( VCPKG_LIBRARY_LINKAGE STREQUAL "static" )
2021-07-16 08:19:56 +08:00
file ( REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin" )
endif ( )
2023-03-23 07:20:43 +08:00
2021-07-16 08:19:56 +08:00
if ( VCPKG_LIBRARY_LINKAGE STREQUAL static )
set ( _file "${CURRENT_PACKAGES_DIR}/include/libxml2/libxml/xmlexports.h" )
file ( READ "${_file}" _contents )
string ( REPLACE "#ifdef LIBXML_STATIC" "#undef LIBXML_STATIC\n#define LIBXML_STATIC\n#ifdef LIBXML_STATIC" _contents "${_contents}" )
file ( WRITE "${_file}" "${_contents}" )
2018-03-12 14:41:51 +08:00
endif ( )
2020-11-12 07:28:09 +08:00
2023-03-23 07:20:43 +08:00
file ( COPY "${CURRENT_PACKAGES_DIR}/include/libxml2/" DESTINATION "${CURRENT_PACKAGES_DIR}/include" ) # TODO: Fix usage in all dependent ports hardcoding the wrong include path.
2021-07-16 08:19:56 +08:00
2023-03-23 07:20:43 +08:00
# Cleanup
2021-07-16 08:19:56 +08:00
file ( REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include" )
file ( REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share" )
2022-04-19 07:41:29 +08:00
file ( REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/lib/xml2Conf.sh" "${CURRENT_PACKAGES_DIR}/debug/lib/xml2Conf.sh" )
2022-07-07 05:30:42 +08:00
file ( COPY
" $ { C M A K E _ C U R R E N T _ L I S T _ D I R } / v c p k g - c m a k e - w r a p p e r . c m a k e "
" $ { C M A K E _ C U R R E N T _ L I S T _ D I R } / u s a g e "
D E S T I N A T I O N " $ { C U R R E N T _ P A C K A G E S _ D I R } / s h a r e / $ { P O R T } "
)
2023-09-19 01:00:02 +08:00
vcpkg_install_copyright ( FILE_LIST "${SOURCE_PATH}/Copyright" )