2017-01-19 21:23:52 +08:00
|
|
|
vcpkg_download_distfile(ARCHIVE
|
2017-05-08 17:04:00 +08:00
|
|
|
URLS "http://www.oberhumer.com/opensource/lzo/download/lzo-2.10.tar.gz"
|
|
|
|
FILENAME "lzo-2.10.tar.gz"
|
|
|
|
SHA512 a3dae5e4a6b93b1f5bf7435e8ab114a9be57252e9efc5dd444947d7a2d031b0819f34bcaeb35f60b5629a01b1238d738735a64db8f672be9690d3c80094511a4
|
2017-01-19 21:23:52 +08:00
|
|
|
)
|
2019-10-08 01:35:13 +08:00
|
|
|
|
2023-03-08 06:14:52 +08:00
|
|
|
vcpkg_extract_source_archive(
|
|
|
|
SOURCE_PATH
|
|
|
|
ARCHIVE "${ARCHIVE}"
|
2021-01-23 06:11:20 +08:00
|
|
|
PATCHES always_install_pc.patch
|
2019-10-08 01:35:13 +08:00
|
|
|
)
|
2017-01-19 21:23:52 +08:00
|
|
|
|
2017-05-28 19:44:08 +08:00
|
|
|
set(LZO_STATIC OFF)
|
|
|
|
set(LZO_SHARED OFF)
|
|
|
|
if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
|
|
|
|
set(LZO_STATIC ON)
|
|
|
|
else()
|
|
|
|
set(LZO_SHARED ON)
|
|
|
|
endif()
|
|
|
|
|
2023-03-08 06:14:52 +08:00
|
|
|
vcpkg_cmake_configure(
|
|
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
2017-05-28 19:44:08 +08:00
|
|
|
OPTIONS
|
|
|
|
-DENABLE_STATIC=${LZO_STATIC}
|
|
|
|
-DENABLE_SHARED=${LZO_SHARED}
|
2017-01-19 21:23:52 +08:00
|
|
|
)
|
|
|
|
|
2023-03-08 06:14:52 +08:00
|
|
|
vcpkg_cmake_install()
|
2021-01-23 06:11:20 +08:00
|
|
|
vcpkg_fixup_pkgconfig()
|
2017-01-21 09:03:11 +08:00
|
|
|
vcpkg_copy_pdbs()
|
|
|
|
|
2023-03-08 06:14:52 +08:00
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/share/doc")
|
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/libexec")
|
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/libexec")
|
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
|
2017-01-19 21:23:52 +08:00
|
|
|
|
2020-03-28 10:51:48 +08:00
|
|
|
if(VCPKG_TARGET_IS_WINDOWS AND VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
|
2023-03-08 06:14:52 +08:00
|
|
|
file(READ "${CURRENT_PACKAGES_DIR}/include/lzo/lzoconf.h" LZO_CONFIG)
|
2017-05-28 19:44:08 +08:00
|
|
|
string(REPLACE "# define __LZO_EXPORT1 /*empty*/"
|
|
|
|
"# define __LZO_EXPORT1 __declspec(dllimport)" LZO_CONFIG "${LZO_CONFIG}")
|
2023-03-08 06:14:52 +08:00
|
|
|
file(WRITE "${CURRENT_PACKAGES_DIR}/include/lzo/lzoconf.h" "${LZO_CONFIG}")
|
2017-05-28 19:44:08 +08:00
|
|
|
endif()
|
|
|
|
|
2023-03-08 06:14:52 +08:00
|
|
|
file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|