diff --git a/ports/stillwater-universal/fix-install-path.patch b/ports/stillwater-universal/fix-install-path.patch new file mode 100644 index 0000000000..03f44ca447 --- /dev/null +++ b/ports/stillwater-universal/fix-install-path.patch @@ -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) diff --git a/ports/stillwater-universal/portfile.cmake b/ports/stillwater-universal/portfile.cmake new file mode 100644 index 0000000000..c5bc26e93c --- /dev/null +++ b/ports/stillwater-universal/portfile.cmake @@ -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") + diff --git a/ports/stillwater-universal/usage b/ports/stillwater-universal/usage new file mode 100644 index 0000000000..5a71245cf3 --- /dev/null +++ b/ports/stillwater-universal/usage @@ -0,0 +1,4 @@ +The package stillwater-universal provides CMake targets: + + find_package(universal CONFIG REQUIRED) + target_link_libraries(main PRIVATE universal::universal) diff --git a/ports/stillwater-universal/vcpkg.json b/ports/stillwater-universal/vcpkg.json new file mode 100644 index 0000000000..d9ee3c4d70 --- /dev/null +++ b/ports/stillwater-universal/vcpkg.json @@ -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 + } + ] +} diff --git a/versions/baseline.json b/versions/baseline.json index 93ac7808ab..b827f33a11 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -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 diff --git a/versions/s-/stillwater-universal.json b/versions/s-/stillwater-universal.json new file mode 100644 index 0000000000..c33ff6df3f --- /dev/null +++ b/versions/s-/stillwater-universal.json @@ -0,0 +1,9 @@ +{ + "versions": [ + { + "git-tree": "2381846a48db7cc424095bc60a21c8432d702a0f", + "version": "3.96", + "port-version": 0 + } + ] +}