mirror of https://github.com/microsoft/vcpkg.git
[enchantum] fix cmake config path (#53257)
Co-authored-by: Billy Robert O'Neal III <bion@microsoft.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
parent
a2bc44ec9e
commit
c4d9956c0c
|
|
@ -13,5 +13,12 @@ vcpkg_cmake_configure(
|
|||
)
|
||||
|
||||
vcpkg_cmake_install()
|
||||
vcpkg_cmake_config_fixup(CONFIG_PATH "cmake")
|
||||
|
||||
# upstream installs enchantumConfig.cmake into <prefix>/cmake but enchantumTargets.cmake
|
||||
# into <prefix>/share/enchantum/cmake; merge them so the config's include() resolves
|
||||
file(RENAME "${CURRENT_PACKAGES_DIR}/cmake/enchantumConfig.cmake" "${CURRENT_PACKAGES_DIR}/share/${PORT}/cmake/enchantumConfig.cmake")
|
||||
file(RENAME "${CURRENT_PACKAGES_DIR}/cmake/enchantumConfigVersion.cmake" "${CURRENT_PACKAGES_DIR}/share/${PORT}/cmake/enchantumConfigVersion.cmake")
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/cmake")
|
||||
|
||||
vcpkg_cmake_config_fixup(CONFIG_PATH "share/${PORT}/cmake")
|
||||
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")
|
||||
|
|
|
|||
|
|
@ -1,7 +1,8 @@
|
|||
{
|
||||
"name": "enchantum",
|
||||
"version": "0.4.0",
|
||||
"description": "Header-only C++20 fast compile time enum reflection library.",
|
||||
"port-version": 1,
|
||||
"description": "Header-only C++17 fast compile time enum reflection library.",
|
||||
"homepage": "https://github.com/ZXShady/enchantum",
|
||||
"license": "MIT",
|
||||
"dependencies": [
|
||||
|
|
|
|||
|
|
@ -0,0 +1,4 @@
|
|||
set(VCPKG_POLICY_EMPTY_PACKAGE enabled)
|
||||
|
||||
vcpkg_cmake_configure(SOURCE_PATH "${CURRENT_PORT_DIR}/project")
|
||||
vcpkg_cmake_build()
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
cmake_minimum_required(VERSION 3.20)
|
||||
project(vcpkg_ci_enchantum LANGUAGES CXX)
|
||||
|
||||
find_package(enchantum CONFIG REQUIRED)
|
||||
|
||||
add_executable(vcpkg_ci_enchantum main.cpp)
|
||||
target_link_libraries(vcpkg_ci_enchantum PRIVATE enchantum::enchantum)
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
#include <enchantum/enchantum.hpp>
|
||||
|
||||
#include <string_view>
|
||||
|
||||
enum class color
|
||||
{
|
||||
red,
|
||||
green,
|
||||
blue
|
||||
};
|
||||
|
||||
int main()
|
||||
{
|
||||
return enchantum::to_string(color::green) == std::string_view{"green"} ? 0 : 1;
|
||||
}
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
{
|
||||
"name": "vcpkg-ci-enchantum",
|
||||
"version-string": "ci",
|
||||
"description": "Validates enchantum CMake integration",
|
||||
"dependencies": [
|
||||
"enchantum",
|
||||
{
|
||||
"name": "vcpkg-cmake",
|
||||
"host": true
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -2842,7 +2842,7 @@
|
|||
},
|
||||
"enchantum": {
|
||||
"baseline": "0.4.0",
|
||||
"port-version": 0
|
||||
"port-version": 1
|
||||
},
|
||||
"enet": {
|
||||
"baseline": "1.3.18",
|
||||
|
|
|
|||
|
|
@ -1,5 +1,10 @@
|
|||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "af0dbe6760759ad1a3a04b1f6f90657c0cb70ea5",
|
||||
"version": "0.4.0",
|
||||
"port-version": 1
|
||||
},
|
||||
{
|
||||
"git-tree": "9e632360b3bc5934e84c78c8382c9645af4a089a",
|
||||
"version": "0.4.0",
|
||||
|
|
|
|||
Loading…
Reference in New Issue