2019-05-03 13:57:43 +08:00
|
|
|
vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY ONLY_DYNAMIC_CRT)
|
2018-03-22 16:35:02 +08:00
|
|
|
|
2022-06-24 04:48:37 +08:00
|
|
|
set(PMDK_VERSION "1.12.0")
|
2019-10-08 01:35:13 +08:00
|
|
|
|
2018-03-22 16:35:02 +08:00
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
2018-03-30 04:52:58 +08:00
|
|
|
REPO pmem/pmdk
|
2022-06-24 04:48:37 +08:00
|
|
|
REF 73d8f958e855904dc0776a7d77d0f0d3698a65b1 #v1.12.0
|
|
|
|
SHA512 ffe77796c9028478985ca98e4162a671e3e7f580faa46b31d0dcf8c5e97aa6478044efdf7ad238285044f18f754a20a4e2a1b5992c7b9cffa709884eb62007ab
|
2018-03-22 16:35:02 +08:00
|
|
|
HEAD_REF master
|
|
|
|
)
|
|
|
|
|
|
|
|
# Build only the selected projects
|
|
|
|
vcpkg_build_msbuild(
|
2018-03-30 04:52:58 +08:00
|
|
|
PROJECT_PATH ${SOURCE_PATH}/src/PMDK.sln
|
2020-03-07 02:09:15 +08:00
|
|
|
TARGET "Solution Items\\libpmem,Solution Items\\libpmemlog,Solution Items\\libpmemblk,Solution Items\\libpmemobj,Solution Items\\libpmempool,Solution Items\\Tools\\pmempool"
|
2018-03-30 04:52:58 +08:00
|
|
|
OPTIONS /p:SRCVERSION=${PMDK_VERSION}
|
2018-03-22 16:35:02 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
set(DEBUG_ARTIFACTS_PATH ${SOURCE_PATH}/src/x64/Debug)
|
|
|
|
set(RELEASE_ARTIFACTS_PATH ${SOURCE_PATH}/src/x64/Release)
|
|
|
|
|
|
|
|
# Install header files
|
|
|
|
file(GLOB HEADER_FILES ${SOURCE_PATH}/src/include/*.h)
|
|
|
|
file(INSTALL ${HEADER_FILES} DESTINATION ${CURRENT_PACKAGES_DIR}/include)
|
|
|
|
file(GLOB HEADER_FILES ${SOURCE_PATH}/src/include/libpmemobj/*.h)
|
|
|
|
file(INSTALL ${HEADER_FILES} DESTINATION ${CURRENT_PACKAGES_DIR}/include/libpmemobj)
|
2018-03-30 04:52:58 +08:00
|
|
|
|
2018-03-22 16:35:02 +08:00
|
|
|
# Remove unneeded header files
|
|
|
|
file(REMOVE ${CURRENT_PACKAGES_DIR}/include/libvmmalloc.h)
|
|
|
|
file(REMOVE ${CURRENT_PACKAGES_DIR}/include/librpmem.h)
|
2018-03-30 04:52:58 +08:00
|
|
|
|
2018-03-22 16:35:02 +08:00
|
|
|
# Install libraries (debug)
|
2019-04-24 04:15:23 +08:00
|
|
|
file(GLOB LIB_DEBUG_FILES ${DEBUG_ARTIFACTS_PATH}/libs/libpmem*.lib)
|
2018-03-22 16:35:02 +08:00
|
|
|
file(INSTALL ${LIB_DEBUG_FILES} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib)
|
|
|
|
file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/libpmemcommon.lib)
|
2019-04-24 04:15:23 +08:00
|
|
|
file(GLOB LIB_DEBUG_FILES ${DEBUG_ARTIFACTS_PATH}/libs/libpmem*.dll)
|
2018-03-22 16:35:02 +08:00
|
|
|
file(INSTALL ${LIB_DEBUG_FILES} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin)
|
|
|
|
|
|
|
|
# Install libraries (release)
|
2019-04-24 04:15:23 +08:00
|
|
|
file(GLOB LIB_RELEASE_FILES ${RELEASE_ARTIFACTS_PATH}/libs/libpmem*.lib)
|
2018-03-22 16:35:02 +08:00
|
|
|
file(INSTALL ${LIB_RELEASE_FILES} DESTINATION ${CURRENT_PACKAGES_DIR}/lib)
|
|
|
|
file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/libpmemcommon.lib)
|
2019-04-24 04:15:23 +08:00
|
|
|
file(GLOB LIB_RELEASE_FILES ${RELEASE_ARTIFACTS_PATH}/libs/libpmem*.dll)
|
2018-03-22 16:35:02 +08:00
|
|
|
file(INSTALL ${LIB_RELEASE_FILES} DESTINATION ${CURRENT_PACKAGES_DIR}/bin)
|
|
|
|
|
|
|
|
# Install tools (release only)
|
2020-08-19 07:32:41 +08:00
|
|
|
file(INSTALL ${RELEASE_ARTIFACTS_PATH}/libs/pmempool.exe DESTINATION ${CURRENT_PACKAGES_DIR}/tools/${PORT})
|
2018-03-30 04:52:58 +08:00
|
|
|
|
|
|
|
vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/pmdk)
|
2018-03-22 16:35:02 +08:00
|
|
|
|
|
|
|
vcpkg_copy_pdbs()
|
|
|
|
|
2019-12-24 07:36:57 +08:00
|
|
|
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
|