vcpkg/ports/muparser/portfile.cmake

36 lines
1.1 KiB
CMake
Raw Normal View History

2018-01-29 18:13:09 +02:00
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO beltoforion/muparser
2024-12-23 17:07:17 +01:00
REF "v${VERSION}"
SHA512 48610dd112b5c8e1ea7615e29c9f9ca185091392b651794de039c14edfad4c62a6ae1d087393fdfd8d03a99f94a6e71275b86ddc8027234d322030bc7c25223e
HEAD_REF master
2018-01-29 18:13:09 +02:00
)
2024-12-23 17:07:17 +01:00
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
FEATURES
openmp ENABLE_OPENMP
)
2022-01-25 00:09:13 +01:00
vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
2024-12-23 17:07:17 +01:00
OPTIONS ${FEATURE_OPTIONS}
-DENABLE_SAMPLES=OFF
-DENABLE_WIDE_CHAR=OFF
2018-01-29 18:13:09 +02:00
)
2022-01-25 00:09:13 +01:00
vcpkg_cmake_install()
2018-01-29 18:13:09 +02:00
vcpkg_copy_pdbs()
2022-01-25 00:09:13 +01:00
vcpkg_cmake_config_fixup(CONFIG_PATH "lib/cmake/muparser")
vcpkg_fixup_pkgconfig()
2022-01-25 00:09:13 +01:00
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)