[metrohash] installation fix (#10992)

This commit is contained in:
kreuzerkrieg 2020-05-01 03:38:52 +03:00 committed by GitHub
parent d51b4cd532
commit bdb7b8107c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 10 deletions

View File

@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 3.14)
project(MetroHash LANGUAGES CXX)
project(metrohash LANGUAGES CXX)
set(CMAKE_CXX_STANDARD 17)
add_library(metrohash
@ -8,8 +8,7 @@ add_library(metrohash
src/metrohash128crc.cpp
)
target_compile_options(metrohash PRIVATE -march=native)
target_include_directories(metrohash SYSTEM PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>/src/)
set (metro_headers src/metrohash64.h src/metrohash128.h src/metrohash128crc.h)
set(metro_headers src/metrohash.h src/metrohash64.h src/metrohash128.h src/metrohash128crc.h)
set_target_properties(metrohash PROPERTIES
PUBLIC_HEADER "${metro_headers}"
)
@ -22,10 +21,6 @@ set(config_install_dir "lib/cmake/${PROJECT_NAME}")
set(TARGETS_EXPORT_NAME "${PROJECT_NAME}Targets")
set(namespace "${PROJECT_NAME}::")
# Configure '<PROJECT-NAME>Config.cmake'
# Use variables:
# * TARGETS_EXPORT_NAME
# * PROJECT_NAME
configure_package_config_file(
"${CMAKE_SOURCE_DIR}/cmake/Config.cmake.in"
"${project_config}"
@ -37,7 +32,10 @@ install(TARGETS metrohash
LIBRARY DESTINATION "lib"
ARCHIVE DESTINATION "lib"
INCLUDES DESTINATION "include")
install(
FILES "${project_config}"
DESTINATION "${config_install_dir}"
)
install(EXPORT "${TARGETS_EXPORT_NAME}"
NAMESPACE "${namespace}"
DESTINATION "${config_install_dir}"

View File

@ -1,5 +1,5 @@
Source: metrohash
Version: 1.1.3
Version: 1.1.3-1
Homepage: https://github.com/jandrewrogers/MetroHash
Description: MetroHash is a set of state-of-the-art hash functions for non-cryptographic use cases.
Supports: !(uwp|arm|x86)

View File

@ -18,7 +18,7 @@ vcpkg_configure_cmake(
)
vcpkg_install_cmake()
vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake)
vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/${PORT})
vcpkg_copy_pdbs()
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)