vcpkg/ports/gsl-lite/portfile.cmake

33 lines
1.0 KiB
CMake
Raw Normal View History

vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO gsl-lite/gsl-lite
REF d0903fa87ff579c30f608bc363582e6563570342
SHA512 f4032404db0073a8ca162e627af8e2741b26a9a251499b0d0009c56ae34b69904d488a4f463c107e40ec495f79b5990c685008979b397d1b670c088ceb4508a0
HEAD_REF master
)
vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
)
vcpkg_cmake_install()
vcpkg_cmake_config_fixup(
CONFIG_PATH "lib/cmake/gsl-lite"
)
file(WRITE ${CURRENT_PACKAGES_DIR}/include/gsl-lite.hpp "#ifndef GSL_LITE_HPP_VCPKG_COMPAT_HEADER_INCLUDED
#define GSL_LITE_HPP_VCPKG_COMPAT_HEADER_INCLUDED
#pragma message(\"The header <gsl-lite.hpp> is deprecated and provided by Vcpkg for compatibility only; please include <gsl/gsl-lite.hpp> instead.\")
#include <gsl/gsl-lite.hpp>
#endif // GSL_LITE_HPP_VCPKG_COMPAT_HEADER_INCLUDED")
file(REMOVE_RECURSE
"${CURRENT_PACKAGES_DIR}/lib"
"${CURRENT_PACKAGES_DIR}/debug"
)
file(INSTALL
"${SOURCE_PATH}/LICENSE"
DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}"
RENAME copyright
)