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
2022-12-13 06:34:08 +08:00
R E F f 5 0 7 d 1 6 7 f 1 7 5 5 b 7 e a e a 0 9 f b 1 a 4 4 d 2 9 a a b 8 2 8 b 6 d 1
S H A 5 1 2 2 a c 3 d c a b 3 1 1 1 1 f 6 0 8 a 3 f e 3 3 d d e 4 9 2 c 9 6 5 3 a d 2 b d 4 9 a 7 9 2 3 7 3 a c d d 0 3 d 2 7 8 7 e 1 a 4 e f 7 0 e e b 7 a 3 d 4 7 c f 6 7 e e f d 4 3 a e e 2 a b 7 5 e c 5 0 b 3 6 c d c d 1 2 4 4 4 5 c a 2 0 6 d e 9 2 4 a b b 6 0 2 1
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
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 _ I C U = O F F # Culprit of linkage issues? Solving this is probably another PR
- 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 _ R U N _ D E B U G = O F F
- 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
2022-12-13 06:34:08 +08:00
vcpkg_cmake_config_fixup ( CONFIG_PATH "lib/cmake/libxml2" )
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 } "
)
2022-04-19 07:41:29 +08:00
file ( INSTALL "${SOURCE_PATH}/Copyright" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright )