vcpkg/ports/gmime/portfile.cmake

41 lines
1.1 KiB
CMake
Raw Normal View History

2017-10-19 20:19:29 +08:00
include(vcpkg_common_functions)
set(LIB_NAME gmime)
set(LIB_VERSION 3.2.3)
2017-10-19 20:19:29 +08:00
set(LIB_FILENAME ${LIB_NAME}-${LIB_VERSION}.tar.xz)
vcpkg_download_distfile(ARCHIVE
URLS "https://download.gnome.org/sources/gmime/3.2/${LIB_FILENAME}"
2017-10-19 20:19:29 +08:00
FILENAME "${LIB_FILENAME}"
SHA512 abaf9059baf0c045d5b62757953ee2fa0779462eb32142bb41be40c376fc7ac2b3e4a56fd66177fbbe1dca35c6168a251542b14a844125c2cfcc9a99888179b4
2017-10-19 20:19:29 +08:00
)
2019-04-30 00:56:18 +08:00
vcpkg_extract_source_archive_ex(
OUT_SOURCE_PATH SOURCE_PATH
ARCHIVE ${ARCHIVE}
REF ${LIB_VERSION}
)
2017-10-19 20:19:29 +08:00
file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
# We can use file supplied with original sources
configure_file(${SOURCE_PATH}/build/vs2010/unistd.h ${SOURCE_PATH} COPYONLY)
2017-12-07 17:59:08 +08:00
configure_file(${CMAKE_CURRENT_LIST_DIR}/config.h ${SOURCE_PATH})
2017-10-19 20:19:29 +08:00
configure_file(${CMAKE_CURRENT_LIST_DIR}/gmime.def ${SOURCE_PATH} COPYONLY)
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
2017-10-26 07:57:12 +08:00
PREFER_NINJA
2017-10-19 20:19:29 +08:00
)
vcpkg_install_cmake()
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
# License and man
file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${LIB_NAME} RENAME copyright)
vcpkg_copy_pdbs()