vcpkg/ports/muparser/portfile.cmake

35 lines
1.2 KiB
CMake
Raw Normal View History

2018-01-30 00:13:09 +08:00
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO beltoforion/muparser
2022-11-22 00:35:50 +08:00
REF 59e0ce1e0d35d42713af67788f19797945d81364 # v2.3.4
SHA512 4d0261b9c155b2697ce7222d87ff19be781919e93154bf69455ce36432f66abe2a1ea80a59f7526990f7859f78259014ef56702aa5c7db2ac8c28c8e9491e1f5
HEAD_REF master
2018-01-30 00:13:09 +08:00
)
2022-01-25 07:09:13 +08:00
vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
2022-01-25 07:09:13 +08:00
OPTIONS
-DENABLE_SAMPLES=OFF
-DENABLE_OPENMP=OFF
-DENABLE_WIDE_CHAR=OFF
2018-01-30 00:13:09 +08:00
)
2022-01-25 07:09:13 +08:00
vcpkg_cmake_install()
2018-01-30 00:13:09 +08:00
vcpkg_copy_pdbs()
2022-01-25 07:09:13 +08:00
vcpkg_cmake_config_fixup(CONFIG_PATH "lib/cmake/muparser")
vcpkg_fixup_pkgconfig()
2022-01-25 07:09:13 +08:00
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/muParserDef.h" "#if defined(_UNICODE)" "#if 0")
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/muParserDLL.h" "#ifndef _UNICODE" "#if 1")
2018-01-30 00:13:09 +08: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)