Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion ports/enchantum/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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")
3 changes: 2 additions & 1 deletion ports/enchantum/vcpkg.json
Original file line number Diff line number Diff line change
@@ -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": [
Expand Down
4 changes: 4 additions & 0 deletions scripts/test_ports/vcpkg-ci-enchantum/portfile.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
set(VCPKG_POLICY_EMPTY_PACKAGE enabled)

vcpkg_cmake_configure(SOURCE_PATH "${CURRENT_PORT_DIR}/project")
vcpkg_cmake_build()
7 changes: 7 additions & 0 deletions scripts/test_ports/vcpkg-ci-enchantum/project/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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)
15 changes: 15 additions & 0 deletions scripts/test_ports/vcpkg-ci-enchantum/project/main.cpp
Original file line number Diff line number Diff line change
@@ -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;
}
12 changes: 12 additions & 0 deletions scripts/test_ports/vcpkg-ci-enchantum/vcpkg.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"name": "vcpkg-ci-enchantum",
"version-string": "ci",
"description": "Validates enchantum CMake integration",
"dependencies": [
"enchantum",
{
"name": "vcpkg-cmake",
"host": true
}
]
}
2 changes: 1 addition & 1 deletion versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -2842,7 +2842,7 @@
},
"enchantum": {
"baseline": "0.4.0",
"port-version": 0
"port-version": 1
},
"enet": {
"baseline": "1.3.18",
Expand Down
5 changes: 5 additions & 0 deletions versions/e-/enchantum.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "af0dbe6760759ad1a3a04b1f6f90657c0cb70ea5",
"version": "0.4.0",
"port-version": 1
},
{
"git-tree": "9e632360b3bc5934e84c78c8382c9645af4a089a",
"version": "0.4.0",
Expand Down
Loading