mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-16 15:10:11 +08:00
0e1dc12185
* [rollup:2021-07-16 1/7] PR #18201 (@JackBoosY) [vcpkg-cmake] Add check for unused cmake variables * [rollup:2021-07-16 2/7] PR #18397 (@strega-nil) [vcpkg_list] add new function * [rollup:2021-07-16 3/7] PR #18782 (@strega-nil) [scripts-audit] vcpkg_build_ninja * [rollup:2021-07-16 4/7] PR #18784 (@strega-nil) [scripts-audit] vcpkg_minimum_required * [rollup:2021-07-16 5/7] PR #18785 (@strega-nil) [scripts-audit] vcpkg_replace_string * [rollup:2021-07-16 6/7] PR #18786 (@strega-nil) [scripts-audit] windows scripts * [rollup:2021-07-16 7/7] PR #18945 (@strega-nil) [many ports] remove deprecated vcpkg_check_features call [1/5] Co-authored-by: nicole mazzuca <mazzucan@outlook.com> Co-authored-by: PhoebeHui <20694052+PhoebeHui@users.noreply.github.com>
41 lines
1.0 KiB
CMake
41 lines
1.0 KiB
CMake
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
|
|
|
|
vcpkg_fail_port_install(ON_TARGET "UWP")
|
|
|
|
vcpkg_from_github(
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
REPO dmlc/dmlc-core
|
|
REF d3fd7c5e9b9c280d3081ada3fb62705547c00bf1
|
|
SHA512 6887d52ddd00949866c27bea3c860abb8a7ecf61feeac79d67d260635e9c3e490b6f0538cbc0ccc1f03e90ab4094bfc0fcb938adb3fb5afe9fea813d47cc7430
|
|
HEAD_REF master
|
|
)
|
|
|
|
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
|
FEATURES
|
|
openmp ENABLE_OPENMP
|
|
)
|
|
|
|
if(VCPKG_CRT_LINKAGE STREQUAL dynamic)
|
|
set(DMLC_FORCE_SHARED_CRT ON)
|
|
else()
|
|
set(DMLC_FORCE_SHARED_CRT OFF)
|
|
endif()
|
|
|
|
vcpkg_configure_cmake(
|
|
SOURCE_PATH ${SOURCE_PATH}
|
|
PREFER_NINJA
|
|
DISABLE_PARALLEL_CONFIGURE
|
|
OPTIONS
|
|
-DDMLC_FORCE_SHARED_CRT=${DMLC_FORCE_SHARED_CRT}
|
|
-DUSE_OPENMP=${ENABLE_OPENMP}
|
|
)
|
|
|
|
vcpkg_install_cmake()
|
|
|
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
|
|
|
vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/dmlc)
|
|
|
|
# Handle copyright
|
|
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
|