mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-24 05:48:25 +08:00
50 lines
1.9 KiB
CMake
50 lines
1.9 KiB
CMake
# Common Ambient Variables:
|
|
# CURRENT_BUILDTREES_DIR = ${VCPKG_ROOT_DIR}\buildtrees\${PORT}
|
|
# CURRENT_PACKAGES_DIR = ${VCPKG_ROOT_DIR}\packages\${PORT}_${TARGET_TRIPLET}
|
|
# CURRENT_PORT_DIR = ${VCPKG_ROOT_DIR}\ports\${PORT}
|
|
# PORT = current port name (zlib, etc)
|
|
# TARGET_TRIPLET = current triplet (x86-windows, x64-windows-static, etc)
|
|
# VCPKG_CRT_LINKAGE = C runtime linkage type (static, dynamic)
|
|
# VCPKG_LIBRARY_LINKAGE = target library linkage type (static, dynamic)
|
|
# VCPKG_ROOT_DIR = <C:\path\to\current\vcpkg>
|
|
# VCPKG_TARGET_ARCHITECTURE = target architecture (x64, x86, arm)
|
|
#
|
|
|
|
include(vcpkg_common_functions)
|
|
vcpkg_from_github(
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
REPO coin-or/CoinUtils
|
|
REF releases/2.10.14
|
|
SHA512 2d5108e096f126cf98750a4892ca4d946d0bad41b65f29001c116c5ad15aa4900c3091d163fa16b6a55f0518344c6681ad95bbc6efa431c77aaaaa751494c48b
|
|
)
|
|
|
|
file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
|
|
file(COPY ${CMAKE_CURRENT_LIST_DIR}/Config.cmake.in DESTINATION ${SOURCE_PATH})
|
|
if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
|
|
set(VCPKG_LIBRARY_LINKAGE static)
|
|
endif()
|
|
|
|
|
|
vcpkg_configure_cmake(
|
|
SOURCE_PATH ${SOURCE_PATH}
|
|
PREFER_NINJA # Disable this option if project cannot be built with Ninja
|
|
OPTIONS
|
|
-DBUILD_SHARED_LIBS=OFF
|
|
# OPTIONS -DUSE_THIS_IN_ALL_BUILDS=1 -DUSE_THIS_TOO=2
|
|
# OPTIONS_RELEASE -DOPTIMIZE=1
|
|
# OPTIONS_DEBUG -DDEBUGGABLE=1
|
|
)
|
|
|
|
vcpkg_install_cmake()
|
|
vcpkg_copy_pdbs()
|
|
|
|
vcpkg_fixup_cmake_targets(CONFIG_PATH "lib/cmake/CoinUtils")
|
|
|
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
|
|
|
# Handle copyright
|
|
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/coinutils RENAME copyright)
|
|
|
|
# Post-build test for cmake libraries
|
|
# vcpkg_test_cmake(PACKAGE_NAME coinutils)
|