mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-11 21:19:00 +08:00
7891c9d910
* Add hash-library 8 * Update CI baseline * Add patch for macOS * Update CI baseline * Allow shared builds on Linux/macOS * Update CI baseline * Address code review feedback * Update CI baseline Co-authored-by: chausner <chausner@users.noreply.github.com>
46 lines
900 B
CMake
46 lines
900 B
CMake
cmake_minimum_required(VERSION 3.5.1)
|
|
project(hash-library CXX)
|
|
|
|
set(HEADERS
|
|
crc32.h
|
|
hash.h
|
|
hmac.h
|
|
keccak.h
|
|
md5.h
|
|
sha1.h
|
|
sha256.h
|
|
sha3.h
|
|
)
|
|
|
|
set(SRCS
|
|
crc32.cpp
|
|
keccak.cpp
|
|
md5.cpp
|
|
sha1.cpp
|
|
sha256.cpp
|
|
sha3.cpp
|
|
)
|
|
|
|
add_library(hash-library ${SRCS})
|
|
|
|
target_include_directories(hash-library PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}> $<INSTALL_INTERFACE:include>)
|
|
|
|
if(NOT DISABLE_INSTALL_HEADERS)
|
|
install(FILES ${HEADERS} DESTINATION include)
|
|
endif()
|
|
|
|
install(
|
|
TARGETS hash-library
|
|
EXPORT unofficial-hash-library-targets
|
|
RUNTIME DESTINATION bin
|
|
LIBRARY DESTINATION lib
|
|
ARCHIVE DESTINATION lib
|
|
)
|
|
|
|
install(
|
|
EXPORT unofficial-hash-library-targets
|
|
FILE unofficial-hash-library-targets.cmake
|
|
NAMESPACE unofficial::
|
|
DESTINATION share/unofficial-hash-library
|
|
)
|