aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkreuzerkrieg <kreuzerkrieg@gmail.com>2020-05-01 03:38:52 +0300
committerGitHub <noreply@github.com>2020-04-30 17:38:52 -0700
commitbdb7b8107cba67368455696c7e088c1c5b0cd3a0 (patch)
treed9662598d61804369766f4084f1d600b170780e3
parentd51b4cd532662e5a32d3d0799430edc502d7d296 (diff)
downloadvcpkg-bdb7b8107cba67368455696c7e088c1c5b0cd3a0.tar.gz
vcpkg-bdb7b8107cba67368455696c7e088c1c5b0cd3a0.zip
[metrohash] installation fix (#10992)
-rw-r--r--ports/metrohash/CMakeLists.txt14
-rw-r--r--ports/metrohash/CONTROL2
-rw-r--r--ports/metrohash/portfile.cmake2
3 files changed, 8 insertions, 10 deletions
diff --git a/ports/metrohash/CMakeLists.txt b/ports/metrohash/CMakeLists.txt
index 04a667c5c..4db2b42ee 100644
--- a/ports/metrohash/CMakeLists.txt
+++ b/ports/metrohash/CMakeLists.txt
@@ -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}"
diff --git a/ports/metrohash/CONTROL b/ports/metrohash/CONTROL
index 276c530e0..85a795a3c 100644
--- a/ports/metrohash/CONTROL
+++ b/ports/metrohash/CONTROL
@@ -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)
diff --git a/ports/metrohash/portfile.cmake b/ports/metrohash/portfile.cmake
index ad26b8b6d..1c272c818 100644
--- a/ports/metrohash/portfile.cmake
+++ b/ports/metrohash/portfile.cmake
@@ -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)