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
2021-07-16 08:19:56 +08:00
R E F b 4 8 e 7 7 c f 4 f 6 f a 0 7 9 2 c 5 f 4 b 6 3 9 7 0 7 a 2 b 0 6 7 5 e 4 6 1 b
S H A 5 1 2 2 d 2 0 8 6 7 9 6 1 b 8 d 8 a 0 c b 0 4 1 1 1 9 2 1 4 6 8 8 2 b 9 7 6 c 1 2 7 6 d 2 e 8 e c d 9 a 7 e e 3 f 1 e b 2 8 7 f 6 4 e 5 9 2 8 2 7 3 6 f 5 8 c 6 4 1 b 6 6 a b f 6 3 b a 4 5 c 9 4 2 1 f 2 7 e 1 3 e c 0 9 a 0 b 1 0 8 1 4 c d 5 6 9 8 7 b 1 8 c b 5 b
2019-03-16 06:29:08 +08:00
H E A D _ R E F m a s t e r
2021-07-16 08:19:56 +08:00
P A T C H E S
f i x _ c m a k e l i s t . p a t c h
2021-08-03 07:44:53 +08:00
f i x - u w p . p a t c h
2016-10-16 02:52:05 +08:00
)
2021-03-23 06:52:17 +08:00
if ( VCPKG_TARGET_IS_UWP )
message ( WARNING "Feature network couldn't be enabled on UWP, disable http and ftp automatically." )
set ( ENABLE_NETWORK 0 )
else ( )
set ( ENABLE_NETWORK 1 )
endif ( )
2021-07-16 08:19:56 +08:00
vcpkg_check_features ( OUT_FEATURE_OPTIONS FEATURE_OPTIONS
F E A T U R E S
2021-08-03 07:44:53 +08:00
" 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 (
2017-04-06 07:07:40 +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 T P = $ { E N A B L E _ N E T W O R K }
- D L I B X M L 2 _ W I T H _ F T P = $ { E N A B L E _ N E T W O R K }
- 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
- 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 _ D O C B = O N
- D L I B X M L 2 _ W I T H _ I C O N V = O N
- D L I B X M L 2 _ W I T H _ I S O 8 8 5 9 X = O N
- D L I B X M L 2 _ W I T H _ Z L I B = O N
- 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 _ L Z M A = O N
- D L I B X M L 2 _ W I T H _ L E G A C Y = O N
- 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
2021-08-03 07:44:53 +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
configure_file ( "${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake" "${CURRENT_PACKAGES_DIR}/share/${PORT}/vcpkg-cmake-wrapper.cmake" @ONLY )
if ( "tools" IN_LIST FEATURES )
vcpkg_copy_tools ( TOOL_NAMES xmllint xmlcatalog AUTO_CLEAN )
endif ( )
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 ( )
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
2021-07-16 08:19:56 +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.
file ( COPY "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" )
file ( INSTALL "${SOURCE_PATH}/Copyright" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright )
#Cleanup
file ( REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include" )
file ( REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share" )
file ( REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/lib/xml2Conf.sh" "${CURRENT_PACKAGES_DIR}/debug/lib/xml2Conf.sh" )