vcpkg/ports/cdt/portfile.cmake

33 lines
882 B
CMake
Raw Normal View History

vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO artem-ogre/CDT
REF "${VERSION}"
SHA512 cffccb96d8cb13e7cb2edf9e105e5ee193ec1c3f2872ee5fba7a47758d9651e1b0f02af9122b840e90a07a4b9f3773c30ac9b11b966741301c853429d49c0627
HEAD_REF master
)
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
FEATURES
"64-bit-index-type" CDT_USE_64_BIT_INDEX_TYPE
"as-compiled-library" CDT_USE_AS_COMPILED_LIBRARY
)
if (NOT CDT_USE_AS_COMPILED_LIBRARY)
set(VCPKG_BUILD_TYPE "release") # header-only
endif()
vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}/CDT"
OPTIONS
${FEATURE_OPTIONS}
)
vcpkg_cmake_install()
vcpkg_cmake_config_fixup(CONFIG_PATH cmake)
if (CDT_USE_AS_COMPILED_LIBRARY)
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
endif()
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")