# 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 = # VCPKG_TARGET_ARCHITECTURE = target architecture (x64, x86, arm) # include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO coin-or/Osi REF releases/0.107.9 SHA512 52501e2fa81ad9ec1412596b5945e11f2d5c5c91bdb148f41dad9efb8e4a033cfc2f76e389b9e546593b89ae6c7f74c32e6c5b78337c967ad0c90cd6a7183a28 ) 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(BUILD_SHARED_LIBS ON) else() set(BUILD_SHARED_LIBS OFF) endif() vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA # Disable this option if project cannot be built with Ninja OPTIONS -DBUILD_SHARED_LIBS=${BUILD_SHARED_LIBS} ) vcpkg_install_cmake() vcpkg_copy_pdbs() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) vcpkg_fixup_cmake_targets(CONFIG_PATH "lib/cmake/Osi") # Handle copyright file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/osi RENAME copyright) # Post-build test for cmake libraries # vcpkg_test_cmake(PACKAGE_NAME osi)