mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-18 19:40:18 +08:00
050e71d01d
* [various ports] remove references to CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS * [alac,benchmark,capnproto] Fix check_linkage call * [fastlz] Fix SHA512 * [coroutine] Fix dynamic build * [folly] Find double-conversion * [gamma] Use vcpkg_from_github * [librsync] Enable static builds * [netcdf-cxx4] Fix SHA512 * [octomap] Fix static build * [tidy-html5] Fix static build * [various ports] remove custom messages for shared/static builds, modernize some scripts in the meantime * [folly] Use ras0219's fix for link paths * [octomap] Fix exported targets * [uvatlas] Set tool download SHA512 * [duktape+python2] fix portfile to call configure with correct python version, manage python2 also outside win32 * [suitesparse] osx fix * [gtkmm] Call vcpkg_check_linkage after including vcpkg functions * [duktape] Resolve conflicts * [duktape] FIxed typo in Python paths * [wangle] Find zlib * [openssl-uwp] Fix SHA512 * [glib] Allow static builds on non-Windows * [suitesparse] Fix build on Windows * [multiple ports] Bump CONTROL version * [multiple ports] Fix description indent * [directxtk] Fix CONTROL file * [bde,duktape,qpid-proton] Build packages with python2 installed * [binn] remove CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS * [gdal,live555,uriparser] Fix regressions * [live555] Update to 2019.04.24
70 lines
2.9 KiB
CMake
70 lines
2.9 KiB
CMake
include(vcpkg_common_functions)
|
|
|
|
vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY ONLY_DYNAMIC_CRT)
|
|
|
|
if (TRIPLET_SYSTEM_ARCH MATCHES "arm")
|
|
message(FATAL_ERROR "ARM is currently not supported")
|
|
elseif (TRIPLET_SYSTEM_ARCH MATCHES "x86")
|
|
message(FATAL_ERROR "x86 is not supported. Please use pmdk:x64-windows instead.")
|
|
endif()
|
|
|
|
# Download source
|
|
vcpkg_from_github(
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
REPO pmem/pmdk
|
|
REF 1.6
|
|
SHA512 f66e4edf1937d51abfa7c087b65a64109cd3d2a8d9587d6c4fc28a1003d67ec1f35a0011c9a9d0bfe76ad7227be83e86582f8405c988eac828d8ae5d0a399483
|
|
HEAD_REF master
|
|
PATCHES
|
|
"${CMAKE_CURRENT_LIST_DIR}/addPowerShellExecutionPolicy.patch"
|
|
"${CMAKE_CURRENT_LIST_DIR}/v141.patch"
|
|
)
|
|
|
|
get_filename_component(PMDK_VERSION "${SOURCE_PATH}" NAME)
|
|
string(REPLACE "pmdk-" "" PMDK_VERSION "${PMDK_VERSION}")
|
|
|
|
# Build only the selected projects
|
|
vcpkg_build_msbuild(
|
|
PROJECT_PATH ${SOURCE_PATH}/src/PMDK.sln
|
|
TARGET "Solution Items\\libpmem,Solution Items\\libpmemlog,Solution Items\\libpmemblk,Solution Items\\libpmemobj,Solution Items\\libpmempool,Solution Items\\libvmem,Solution Items\\Tools\\pmempool"
|
|
OPTIONS /p:SRCVERSION=${PMDK_VERSION}
|
|
)
|
|
|
|
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)
|
|
|
|
# Remove unneeded header files
|
|
file(REMOVE ${CURRENT_PACKAGES_DIR}/include/libvmmalloc.h)
|
|
file(REMOVE ${CURRENT_PACKAGES_DIR}/include/librpmem.h)
|
|
|
|
# Install libraries (debug)
|
|
file(GLOB LIB_DEBUG_FILES ${DEBUG_ARTIFACTS_PATH}/libs/libpmem*.lib)
|
|
file(INSTALL ${LIB_DEBUG_FILES} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib)
|
|
file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/libpmemcommon.lib)
|
|
file(GLOB LIB_DEBUG_FILES ${DEBUG_ARTIFACTS_PATH}/libs/libpmem*.dll)
|
|
file(INSTALL ${LIB_DEBUG_FILES} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin)
|
|
|
|
# Install libraries (release)
|
|
file(GLOB LIB_RELEASE_FILES ${RELEASE_ARTIFACTS_PATH}/libs/libpmem*.lib)
|
|
file(INSTALL ${LIB_RELEASE_FILES} DESTINATION ${CURRENT_PACKAGES_DIR}/lib)
|
|
file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/libpmemcommon.lib)
|
|
file(GLOB LIB_RELEASE_FILES ${RELEASE_ARTIFACTS_PATH}/libs/libpmem*.dll)
|
|
file(INSTALL ${LIB_RELEASE_FILES} DESTINATION ${CURRENT_PACKAGES_DIR}/bin)
|
|
|
|
# Install tools (release only)
|
|
file(INSTALL ${RELEASE_ARTIFACTS_PATH}/libs/pmempool.exe DESTINATION ${CURRENT_PACKAGES_DIR}/tools/pmdk)
|
|
|
|
vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/pmdk)
|
|
|
|
vcpkg_copy_pdbs()
|
|
|
|
# Handle copyright
|
|
file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/pmdk)
|
|
file(RENAME ${CURRENT_PACKAGES_DIR}/share/pmdk/LICENSE ${CURRENT_PACKAGES_DIR}/share/pmdk/copyright)
|