diff --git a/ports/optional-lite/CONTROL b/ports/optional-lite/CONTROL new file mode 100644 index 0000000000..076a05640d --- /dev/null +++ b/ports/optional-lite/CONTROL @@ -0,0 +1,3 @@ +Source: optional-lite +Version: 3.2.0 +Description: A C++17-like optional, a nullable object for C++98, C++11 and later in a single-file header-only library diff --git a/ports/optional-lite/portfile.cmake b/ports/optional-lite/portfile.cmake new file mode 100644 index 0000000000..1716c89adc --- /dev/null +++ b/ports/optional-lite/portfile.cmake @@ -0,0 +1,31 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO martinmoene/optional-lite + REF v3.2.0 + SHA512 7c3f93dc718953118ab18edb55f6c8dc1555febb6ee491d3f7df4a8d06aba245bbfba31883a711995bb6b8d6de9f44c805cbba44b9e322f3bb5c3272106f66ec +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DOPTIONAL_LITE_OPT_BUILD_TESTS=OFF + -DOPTIONAL_LITE_OPT_BUILD_EXAMPLES=OFF +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets( + CONFIG_PATH lib/cmake/${PORT} +) + +file(REMOVE_RECURSE + ${CURRENT_PACKAGES_DIR}/debug + ${CURRENT_PACKAGES_DIR}/lib +) + +file(INSTALL + ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright +)