diff options
| author | Phil Christensen <philc@microsoft.com> | 2018-12-13 11:13:43 -0800 |
|---|---|---|
| committer | Phil Christensen <philc@microsoft.com> | 2018-12-13 11:13:43 -0800 |
| commit | 5fc3a10651dc80201b4a870043a0cef6b3c72ff3 (patch) | |
| tree | 22a3a9073a29a555540539f1c5f6c0f5360b506d /ports/nanodbc | |
| parent | 9e773bd912e42a413f87e9fb1a6712461e10c4bf (diff) | |
| parent | e04b4ed5b5ff5c1b61e5ce3d70ac101ffe3237c4 (diff) | |
| download | vcpkg-5fc3a10651dc80201b4a870043a0cef6b3c72ff3.tar.gz vcpkg-5fc3a10651dc80201b4a870043a0cef6b3c72ff3.zip | |
Merge branch 'master' of https://github.com/microsoft/vcpkg into dev/philc/4914
Diffstat (limited to 'ports/nanodbc')
| -rw-r--r-- | ports/nanodbc/portfile.cmake | 39 |
1 files changed, 27 insertions, 12 deletions
diff --git a/ports/nanodbc/portfile.cmake b/ports/nanodbc/portfile.cmake index 7019852ea..ff90b4b19 100644 --- a/ports/nanodbc/portfile.cmake +++ b/ports/nanodbc/portfile.cmake @@ -1,17 +1,23 @@ -if (VCPKG_LIBRARY_LINKAGE STREQUAL static) - message(STATUS "Warning: Static building not supported yet. Building dynamic.") - set(VCPKG_LIBRARY_LINKAGE dynamic) -endif() include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/nanodbc-2.12.4) -vcpkg_download_distfile(ARCHIVE - URLS "https://github.com/nanodbc/nanodbc/archive/v2.12.4.tar.gz" - FILENAME "nanodbc-2.12.4.tar.gz" +# Only static libraries are supported. +# See https://github.com/nanodbc/nanodbc/issues/13 +if(VCPKG_USE_HEAD_VERSION) # v2.13 + vcpkg_check_linkage(ONLY_STATIC_LIBRARY) +else() # v2.12.4 + vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY) +endif() + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO nanodbc/nanodbc + REF v2.12.4 SHA512 b9a924516b2a777e5f1497774997672320548722ed53413b0a7ad5d503e2f8ca1099f5059a912b7aae410928f4c4edcdfd02e4cfbf415976cd222697b354b4e6 + HEAD_REF master ) -vcpkg_extract_source_archive(${ARCHIVE}) +# Legacy, remove at release of v2.13 +if(NOT VCPKG_USE_HEAD_VERSION) vcpkg_apply_patches( SOURCE_PATH ${SOURCE_PATH} PATCHES @@ -20,18 +26,27 @@ vcpkg_apply_patches( ${CMAKE_CURRENT_LIST_DIR}/0003_export_def.patch ${CMAKE_CURRENT_LIST_DIR}/0004_unicode.patch ) +endif() +# /Legacy vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} - OPTIONS + OPTIONS +# Legacy, remove at release of v2.13 -DNANODBC_EXAMPLES=OFF -DNANODBC_TEST=OFF -DNANODBC_USE_UNICODE=ON +# /Legacy + -DNANODBC_DISABLE_EXAMPLES=ON + -DNANODBC_DISABLE_TESTS=ON + -DNANODBC_ENABLE_UNICODE=ON ) vcpkg_install_cmake() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +if(EXISTS ${CURRENT_PACKAGES_DIR}/cmake) + vcpkg_fixup_cmake_targets(CONFIG_PATH cmake) +endif() -file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/nanodbc) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/nanodbc/LICENSE ${CURRENT_PACKAGES_DIR}/share/nanodbc/copyright)
\ No newline at end of file +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/nanodbc RENAME copyright) |
