vcpkg/ports/libdatrie/portfile.cmake

41 lines
1.1 KiB
CMake
Raw Normal View History

set(LIBDATRIE_VERSION 0.2.13)
2017-12-21 08:57:14 +08:00
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO tlwg/libdatrie
REF v${LIBDATRIE_VERSION}
SHA512 38f5a3ee1f3ca0f0601a5fcfeec3892cb34857d4b4720b8e018ca1beb6520c4c10af3bd2f0e4d64367cb256e8e2bca4d0a59b1c81fb36782613d2c258b64df59
HEAD_REF master
PATCHES
fix-exports.patch
2017-12-21 08:57:14 +08:00
)
file(COPY "${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt" DESTINATION "${SOURCE_PATH}")
file(COPY "${CMAKE_CURRENT_LIST_DIR}/config.h.cmake" DESTINATION "${SOURCE_PATH}")
2017-12-21 08:57:14 +08:00
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
INVERTED_FEATURES
tool SKIP_TOOL
)
2017-12-21 08:57:14 +08:00
vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
2017-12-21 08:57:14 +08:00
OPTIONS
-DVERSION=${LIBDATRIE_VERSION}
${FEATURE_OPTIONS}
2017-12-21 08:57:14 +08:00
OPTIONS_DEBUG
-DSKIP_TOOL=ON
-DSKIP_HEADERS=ON
)
vcpkg_cmake_install()
2017-12-21 08:57:14 +08:00
vcpkg_copy_pdbs()
vcpkg_fixup_pkgconfig()
2017-12-21 08:57:14 +08:00
if(NOT SKIP_TOOL)
vcpkg_copy_tools(TOOL_NAMES trietool AUTO_CLEAN)
2017-12-21 08:57:14 +08:00
endif()
file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)