vcpkg/ports/luau/portfile.cmake
2024-11-11 23:31:39 -08:00

39 lines
976 B
CMake

vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO luau-lang/luau
REF ${VERSION}
SHA512 a3be52f7958d364693c0bc2541b08082852917b53a80cc4fbdde3167c9068b269f8476882592eafac4c4d674ed6d51ba25a52eaa3b2b6d4dce4603f6aad73f6b
HEAD_REF master
PATCHES
cmake-config-export.patch
)
vcpkg_check_features(
OUT_FEATURE_OPTIONS FEATURE_OPTIONS
FEATURES
tool LUAU_BUILD_CLI
)
vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS
-DVERSION=${VERSION}
${FEATURE_OPTIONS}
OPTIONS_DEBUG
-DLUAU_BUILD_CLI=OFF
)
vcpkg_cmake_install()
vcpkg_cmake_config_fixup(PACKAGE_NAME "unofficial-luau")
if("tool" IN_LIST FEATURES)
vcpkg_copy_tools(TOOL_NAMES luau AUTO_CLEAN)
endif()
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE.txt")