2021-05-01 02:03:26 +08:00
|
|
|
set(LIBOSIP2_VER "5.2.0")
|
2019-09-26 03:19:45 +08:00
|
|
|
|
|
|
|
vcpkg_download_distfile(ARCHIVE
|
2020-01-06 14:33:00 -08:00
|
|
|
URLS "https://ftp.gnu.org/gnu/osip/libosip2-${LIBOSIP2_VER}.tar.gz" "https://www.mirrorservice.org/sites/ftp.gnu.org/gnu/osip/libosip2-${LIBOSIP2_VER}.tar.gz"
|
2019-09-26 03:19:45 +08:00
|
|
|
FILENAME "libosip2-${LIBOSIP2_VER}.tar.gz"
|
2021-05-01 02:03:26 +08:00
|
|
|
SHA512 cc714ab5669c466ee8f0de78cf74a8b7633f3089bf104c9c1474326840db3d791270159456f9deb877af2df346b04493e8f796b2bb7d2be134f6c08b25a29f83
|
2019-09-26 03:19:45 +08:00
|
|
|
)
|
|
|
|
|
2021-10-15 19:24:21 -07:00
|
|
|
set(PATCHES)
|
2021-05-01 02:03:26 +08:00
|
|
|
if(VCPKG_TARGET_IS_WINDOWS)
|
|
|
|
list(APPEND PATCHES fix-path-in-project.patch)
|
|
|
|
endif()
|
|
|
|
|
2023-04-13 18:13:15 +02:00
|
|
|
vcpkg_extract_source_archive(
|
|
|
|
SOURCE_PATH
|
2021-10-15 19:24:21 -07:00
|
|
|
ARCHIVE "${ARCHIVE}"
|
2021-05-01 02:03:26 +08:00
|
|
|
PATCHES ${PATCHES}
|
2019-09-26 03:19:45 +08:00
|
|
|
)
|
|
|
|
|
2021-10-15 19:24:21 -07:00
|
|
|
if(VCPKG_TARGET_IS_WINDOWS)
|
|
|
|
# Use /Z7 rather than /Zi to avoid "fatal error C1090: PDB API call failed, error code '23': (0x00000006)"
|
|
|
|
foreach(VCXPROJ IN ITEMS
|
|
|
|
"${SOURCE_PATH}/platform/vsnet/osip2.vcxproj"
|
|
|
|
"${SOURCE_PATH}/platform/vsnet/osipparser2.vcxproj")
|
|
|
|
vcpkg_replace_string(
|
|
|
|
"${VCXPROJ}"
|
|
|
|
"<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>"
|
|
|
|
"<DebugInformationFormat>OldStyle</DebugInformationFormat>"
|
|
|
|
)
|
|
|
|
endforeach()
|
|
|
|
|
2023-08-15 21:03:21 +02:00
|
|
|
vcpkg_msbuild_install(
|
2021-05-01 02:03:26 +08:00
|
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
|
|
|
PROJECT_SUBPATH "platform/vsnet/osip2.vcxproj"
|
|
|
|
)
|
2021-10-15 19:24:21 -07:00
|
|
|
|
2023-08-15 21:03:21 +02:00
|
|
|
file(COPY "${SOURCE_PATH}/include/" DESTINATION "${CURRENT_PACKAGES_DIR}/include")
|
|
|
|
|
|
|
|
vcpkg_msbuild_install(
|
2021-05-01 02:03:26 +08:00
|
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
|
|
|
PROJECT_SUBPATH "platform/vsnet/osipparser2.vcxproj"
|
|
|
|
)
|
|
|
|
|
|
|
|
elseif(VCPKG_TARGET_IS_LINUX OR VCPKG_TARGET_IS_OSX)
|
2021-10-15 19:24:21 -07:00
|
|
|
vcpkg_configure_make(SOURCE_PATH "${SOURCE_PATH}")
|
2021-05-01 02:03:26 +08:00
|
|
|
vcpkg_install_make()
|
|
|
|
vcpkg_fixup_pkgconfig()
|
2021-10-15 19:24:21 -07:00
|
|
|
|
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
|
2021-05-01 02:03:26 +08:00
|
|
|
endif()
|
2019-09-26 03:19:45 +08:00
|
|
|
|
2023-08-15 21:03:21 +02:00
|
|
|
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/COPYING")
|