mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-13 11:59:02 +08:00
f23ebed76f
* [cmake] Update to 3.17.1 * update cmake directory name * [cpuid] Fix install headers. * [stormlib] Fix install headers * [murmurhash] Fix install headers * [metrohash] Fix install headers * update baseline * update baseline * [otl] update hash * update baseline * [gts] Do not use ninja to avoid empty implib issue * update baseline * [dmlc] Re-trigger ci test * [replxx] Re-trigger ci test * update baseline * [osg] Re-trigger ci test * [replxx] Fix build failure * Set cmake min version to 3.17.1 * update baseline * [libnice] Re-trigger ci test * [mlpack] Re-trigger ci test * update to 3.17.2 * update cmake hash * update baseline * update baseline * update baseline * update baseline * Update scripts/ci.baseline.txt Co-authored-by: Billy O'Neal <billy.oneal@gmail.com> * update baseline * update baseline * [magnum] Set magnum:arm64-windows to skip in baseline * [nanogui] Set nanogui:arm64-windows to fail in baseline * [nettle] Set nettle:x64-windows to fail, waiting for fix this issue in another PR * re-trigger CI test * update baseline * Install unixODBC in Linux * [nanodbc] Re-trigger CI test * update baseline * Remove space * update baseline
44 lines
1.4 KiB
CMake
44 lines
1.4 KiB
CMake
cmake_minimum_required(VERSION 3.14)
|
|
project(metrohash LANGUAGES CXX)
|
|
set(CMAKE_CXX_STANDARD 17)
|
|
|
|
add_library(metrohash
|
|
src/metrohash64.cpp
|
|
src/metrohash128.cpp
|
|
src/metrohash128crc.cpp
|
|
)
|
|
target_compile_options(metrohash PRIVATE -march=native)
|
|
set(metro_headers src/metrohash.h src/metrohash64.h src/metrohash128.h src/metrohash128crc.h)
|
|
set_target_properties(metrohash PROPERTIES
|
|
PUBLIC_HEADER "${metro_headers}"
|
|
)
|
|
|
|
include(CMakePackageConfigHelpers)
|
|
|
|
set(generated_dir "${CMAKE_CURRENT_BINARY_DIR}/generated")
|
|
set(project_config "${generated_dir}/${PROJECT_NAME}Config.cmake")
|
|
set(config_install_dir "lib/cmake/${PROJECT_NAME}")
|
|
set(TARGETS_EXPORT_NAME "${PROJECT_NAME}Targets")
|
|
set(namespace "${PROJECT_NAME}::")
|
|
|
|
configure_package_config_file(
|
|
"${CMAKE_SOURCE_DIR}/cmake/Config.cmake.in"
|
|
"${project_config}"
|
|
INSTALL_DESTINATION "${config_install_dir}"
|
|
)
|
|
#Installation
|
|
install(TARGETS metrohash
|
|
EXPORT "${TARGETS_EXPORT_NAME}"
|
|
LIBRARY DESTINATION "lib"
|
|
ARCHIVE DESTINATION "lib"
|
|
PUBLIC_HEADER DESTINATION "include")
|
|
|
|
install(
|
|
FILES "${project_config}"
|
|
DESTINATION "${config_install_dir}"
|
|
)
|
|
install(EXPORT "${TARGETS_EXPORT_NAME}"
|
|
NAMESPACE "${namespace}"
|
|
DESTINATION "${config_install_dir}"
|
|
)
|