2022-12-14 11:26:59 +08:00
if ( VCPKG_TARGET_IS_WINDOWS )
vcpkg_check_linkage ( ONLY_DYNAMIC_LIBRARY )
endif ( )
2023-01-05 04:11:05 +08:00
if ( VCPKG_TARGET_IS_LINUX )
message ( WARNING "${PORT} currently requires the following packages:\n libtool\n This can be installed on Ubuntu systems via\n sudo apt-get install -y libtool\n" )
endif ( )
2022-12-14 11:26:59 +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 s - y a t a / m a r i s a - t r i e
R E F 0 0 6 0 2 0 c 1 d f 7 6 d 0 d 7 d c 6 1 1 8 d a c c 2 2 d a 6 4 d a 2 e 3 5 c 4
S H A 5 1 2 0 5 d d 7 c c 8 1 a 6 3 4 7 d 4 5 2 8 6 5 4 c 1 9 6 1 7 a f 1 6 d e 8 d 7 3 5 2 a d 9 e 3 8 d 5 f 1 c d 2 9 6 d 8 8 5 2 7 3 7 7 e c b f e d 9 d b e 7 2 2 3 6 2 d 6 4 3 6 9 c d 7 9 2 d 1 a e 0 4 1 0 3 1 9 8 5 4 b 5 4 6 c e 0 b 6 0 8 1 a c 5 6 0 a 4 0 c 0 f
H E A D _ R E F m a s t e r
2023-01-17 04:48:48 +08:00
P A T C H E S
r e m o v e - w i n d o w s - t e s t s . p a t c h
2022-12-14 11:26:59 +08:00
)
if ( VCPKG_TARGET_IS_WINDOWS AND NOT VCPKG_TARGET_IS_MINGW )
vcpkg_install_msbuild (
S O U R C E _ P A T H " $ { S O U R C E _ P A T H } "
2023-01-17 04:48:48 +08:00
P R O J E C T _ S U B P A T H " v s 2 0 1 9 / v s 2 0 1 9 . s l n "
2022-12-14 11:26:59 +08:00
L I C E N S E _ S U B P A T H C O P Y I N G . m d
2023-01-17 04:48:48 +08:00
P L A T F O R M " $ { T R I P L E T _ S Y S T E M _ A R C H } "
2022-12-14 11:26:59 +08:00
A L L O W _ R O O T _ I N C L U D E S
)
2023-01-17 04:48:48 +08:00
file ( MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/include" )
file ( MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/include/marisa" )
file ( INSTALL "${SOURCE_PATH}/include/marisa.h" DESTINATION "${CURRENT_PACKAGES_DIR}/include" )
file ( GLOB MARISA_DIR_HEADERS "${SOURCE_PATH}/include/marisa/*.h" )
file ( INSTALL ${ MARISA_DIR_HEADERS } DESTINATION "${CURRENT_PACKAGES_DIR}/include/marisa" )
2022-12-14 11:26:59 +08:00
vcpkg_clean_msbuild ( )
set ( prefix "${CURRENT_INSTALLED_DIR}" )
set ( exec_prefix "\${prefix}" )
set ( bindir "\${prefix}/bin" )
set ( libdir "\${prefix}/lib" )
set ( includedir "\${prefix}/include" )
configure_file ( "${SOURCE_PATH}/marisa.pc.in" "${CURRENT_PACKAGES_DIR}/lib/pkgconfig/marisa.pc" @ONLY )
vcpkg_replace_string ( "${CURRENT_PACKAGES_DIR}/lib/pkgconfig/marisa.pc" "-lmarisa" "-llibmarisa" )
if ( NOT VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug" )
set ( prefix "${CURRENT_INSTALLED_DIR}/debug" )
set ( exec_prefix "\${prefix}" )
set ( bindir "\${prefix}/bin" )
set ( libdir "\${prefix}/lib" )
set ( includedir "\${prefix}/include" )
configure_file ( "${SOURCE_PATH}/marisa.pc.in" "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/marisa.pc" @ONLY )
vcpkg_replace_string ( "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/marisa.pc" "-lmarisa" "-llibmarisa" )
endif ( )
else ( )
vcpkg_configure_make (
S O U R C E _ P A T H " $ { S O U R C E _ P A T H } "
A U T O C O N F I G
C O P Y _ S O U R C E
)
vcpkg_install_make ( )
file ( REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share" )
file ( INSTALL "${SOURCE_PATH}/COPYING.md" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright )
endif ( )
vcpkg_copy_pdbs ( )
vcpkg_fixup_pkgconfig ( )
file ( INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" )