[universal] add new port (#49952)

This commit is contained in:
Ayush Sah 2026-03-18 13:34:40 +05:30 committed by GitHub
parent d80ef16dfa
commit 7de07c3862
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 100 additions and 0 deletions

View File

@ -0,0 +1,37 @@
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -559,19 +559,10 @@
# Set up install directories. INCLUDE_INSTALL_DIR and
# CMAKECONFIG_INSTALL_DIR must not be absolute paths.
-if(WIN32)
- set(include_install_dir Include)
- set(include_install_dir_full Include)
- set(config_install_dir CMake)
-elseif(UNIX)
- set(include_install_dir include)
- set(include_install_dir_postfix "${project_library_target_name}")
- set(include_install_dir_full "${include_install_dir}/${include_install_dir_postfix}")
-
- set(config_install_dir share/${PACKAGE_NAME})
-else()
- message(FATAL_ERROR "Not supported system type. Options: UNIX or WIN32.")
-endif()
+set(include_install_dir include)
+set(include_install_dir_full "${include_install_dir}")
+
+set(config_install_dir CMake)
##### Gather git repo related information
# Get the current working branch
@@ -658,7 +649,8 @@
DESTINATION ${config_install_dir} COMPONENT cmake)
# Install headers
-install(DIRECTORY ${PROJECT_SOURCE_DIR}/include/${project_library_target_name}
- DESTINATION ${include_install_dir})
+install(DIRECTORY ${PROJECT_SOURCE_DIR}/include/sw/universal
+ DESTINATION ${include_install_dir}
+ FILES_MATCHING PATTERN "*.hpp")
if(UNIVERSAL_BUILD_ALL)

View File

@ -0,0 +1,29 @@
set(VCPKG_BUILD_TYPE release)
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO stillwater-sc/universal
REF "v${VERSION}"
SHA512 b4015a3c68aa17417f39867de0f036e7706442f9d7cdc470b6f237b98e341d6875a73fd22579713cf28976b7dd6bbfbad700023dda44a977ed0722efa5880284
HEAD_REF master
PATCHES
fix-install-path.patch
)
vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS
-DUNIVERSAL_ENABLE_TESTS=OFF
-DUNIVERSAL_VERBOSE_BUILD=OFF
)
vcpkg_cmake_install()
vcpkg_cmake_config_fixup(CONFIG_PATH CMake PACKAGE_NAME universal)
file(REMOVE_RECURSE
"${CURRENT_PACKAGES_DIR}/include/universal/internal/variablecascade"
)
file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")

View File

@ -0,0 +1,4 @@
The package stillwater-universal provides CMake targets:
find_package(universal CONFIG REQUIRED)
target_link_libraries(main PRIVATE universal::universal)

View File

@ -0,0 +1,17 @@
{
"name": "stillwater-universal",
"version": "3.96",
"description": "A header-only C++ library for plug-in replacement number systems for native types",
"homepage": "https://github.com/stillwater-sc/universal",
"license": "MIT",
"dependencies": [
{
"name": "vcpkg-cmake",
"host": true
},
{
"name": "vcpkg-cmake-config",
"host": true
}
]
}

View File

@ -9552,6 +9552,10 @@
"baseline": "1.4.1",
"port-version": 0
},
"stillwater-universal": {
"baseline": "3.96",
"port-version": 0
},
"stlab": {
"baseline": "2.3.0",
"port-version": 0

View File

@ -0,0 +1,9 @@
{
"versions": [
{
"git-tree": "2381846a48db7cc424095bc60a21c8432d702a0f",
"version": "3.96",
"port-version": 0
}
]
}