diff options
Diffstat (limited to 'vcpkg/ports/muparser')
| -rw-r--r-- | vcpkg/ports/muparser/portfile.cmake | 35 | ||||
| -rw-r--r-- | vcpkg/ports/muparser/vcpkg.json | 23 |
2 files changed, 58 insertions, 0 deletions
diff --git a/vcpkg/ports/muparser/portfile.cmake b/vcpkg/ports/muparser/portfile.cmake new file mode 100644 index 0000000..1781760 --- /dev/null +++ b/vcpkg/ports/muparser/portfile.cmake @@ -0,0 +1,35 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO beltoforion/muparser + REF "v${VERSION}" + SHA512 48610dd112b5c8e1ea7615e29c9f9ca185091392b651794de039c14edfad4c62a6ae1d087393fdfd8d03a99f94a6e71275b86ddc8027234d322030bc7c25223e + HEAD_REF master +) + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + openmp ENABLE_OPENMP +) + +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" + OPTIONS ${FEATURE_OPTIONS} + -DENABLE_SAMPLES=OFF + -DENABLE_WIDE_CHAR=OFF +) + +vcpkg_cmake_install() +vcpkg_copy_pdbs() + +vcpkg_cmake_config_fixup(CONFIG_PATH "lib/cmake/muparser") +vcpkg_fixup_pkgconfig() + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/muParserFixes.h" "#ifndef MUPARSER_STATIC" "#if 0") +else() + vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/muParserFixes.h" "#ifndef MUPARSER_STATIC" "#if 1") +endif() + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") + +file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/vcpkg/ports/muparser/vcpkg.json b/vcpkg/ports/muparser/vcpkg.json new file mode 100644 index 0000000..eb7b4a3 --- /dev/null +++ b/vcpkg/ports/muparser/vcpkg.json @@ -0,0 +1,23 @@ +{ + "name": "muparser", + "version": "2.3.5", + "description": "Fast math parser library", + "homepage": "https://github.com/beltoforion/muparser", + "license": "BSD-2-Clause", + "supports": "!uwp", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ], + "features": { + "openmp": { + "description": "Enable OpenMP for multithreading" + } + } +} |