vcpkg/ports/libalkimia/portfile.cmake
Dawid Wróbel b40dcaad95
[libalkimia] new port (#20207)
* Add libalkimia port

* [libalkimia] convert manifest to JSON

* [libalkimia] use gettext port

* [libalkimia] update to HEAD

* [libalkimia] remove unused options

* [libalkimia] use current spec

* [libalkimia] only remove what's needed

* [libalkimia] use KDE_INSTALL_QMLDIR instead of manual renaming

* [libalkimia] wrap paths in quotes

* [libalkimia] update versions

* [libalkimia] enable parallel builds

* [libalkimia] update versions

* [libalkimia] enable extra features

* [libalkimia] update versions

* [libalkimia] update versions

* [libalkimia] static build fixes

* [libalkimia] update versions

* [libalkimia] only copy tools if feature enabled

* [libalkimia] update versions

* [libalkimia] mark BUNDLE_INSTALL_DIR as maybe unused

* [libalkimia] cleanup leftover static DLLs

* [libalkimia] update versions

* [libalkimia] limit DLL cleanup to Windows

* [libalkimia] update versions

* [libalkimia] DLL leftovers patched upstream

* [libalkimia] update versions

* [libalkimia] AUTO_CLEAN tools after copying

* [libalkimia] update versions
2021-11-18 21:40:22 -08:00

51 lines
1.7 KiB
CMake

vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO KDE/alkimia
REF 595186bee8409f30e5db091fffa245fc53ad92e8
SHA512 509082e22bc0a2ce0586e1167df14fd42ac85321315c1ee2914f60e695d1e2e8beae4fc93d16d0053edb520fc391a3dbe30777638285b295e761ad70512688ca
HEAD_REF master
PATCHES
fix_explicit_shared_lib.diff
dll_names.diff # https://invent.kde.org/office/alkimia/-/commit/0ff901025a747ab31ab7efba9f8899b06774f60a
)
# Prevent KDEClangFormat from writing to source effectively blocking parallel configure
file(WRITE ${SOURCE_PATH}/.clang-format "DisableFormat: true\nSortIncludes: false\n")
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
FEATURES
webengine BUILD_WITH_WEBENGINE
tools BUILD_TOOLS
)
vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS
-DKDE_INSTALL_QMLDIR=qml
-DBUNDLE_INSTALL_DIR=bin
-DBUILD_TESTING=OFF
-DBUILD_DOXYGEN_DOCS=OFF
-DBUILD_WITH_WEBKIT=OFF
-DBUILD_APPLETS=OFF
${FEATURE_OPTIONS}
MAYBE_UNUSED_VARIABLES
BUNDLE_INSTALL_DIR
)
vcpkg_cmake_install()
vcpkg_cmake_config_fixup(PACKAGE_NAME LibAlkimia5 CONFIG_PATH lib/cmake/LibAlkimia5-8.1)
vcpkg_copy_pdbs()
if ("tools" IN_LIST FEATURES)
vcpkg_copy_tools(TOOL_NAMES onlinequoteseditor5 AUTO_CLEAN)
endif()
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin")
endif()
file(INSTALL "${SOURCE_PATH}/COPYING.LIB" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)