2016-10-13 19:07:01 +08:00
|
|
|
include(vcpkg_common_functions)
|
|
|
|
|
2018-11-03 07:17:07 +08:00
|
|
|
# Only static libraries are supported.
|
|
|
|
# See https://github.com/nanodbc/nanodbc/issues/13
|
2018-12-18 08:44:08 +08:00
|
|
|
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
|
|
|
|
|
2018-11-03 07:17:07 +08:00
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO nanodbc/nanodbc
|
2018-12-18 08:44:08 +08:00
|
|
|
REF fe1d590991da30dc9cb71676c4d80cb2d9acb49e
|
|
|
|
SHA512 9c7e638b15b3c7ce418374c22a76be4f3f5901e7736938a8b0549b312bb7fa80bc8d34b2a52242a5b94196bb0994481a36e043a4f71cdc1d9af778915d017ac2
|
2018-11-03 07:17:07 +08:00
|
|
|
HEAD_REF master
|
2016-10-13 19:07:01 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
vcpkg_configure_cmake(
|
|
|
|
SOURCE_PATH ${SOURCE_PATH}
|
2019-08-01 04:01:02 +08:00
|
|
|
PREFER_NINJA
|
2018-11-03 07:17:07 +08:00
|
|
|
OPTIONS
|
|
|
|
# Legacy, remove at release of v2.13
|
2016-10-13 19:07:01 +08:00
|
|
|
-DNANODBC_EXAMPLES=OFF
|
|
|
|
-DNANODBC_TEST=OFF
|
2016-10-14 02:34:02 +08:00
|
|
|
-DNANODBC_USE_UNICODE=ON
|
2018-11-03 07:17:07 +08:00
|
|
|
# /Legacy
|
|
|
|
-DNANODBC_DISABLE_EXAMPLES=ON
|
|
|
|
-DNANODBC_DISABLE_TESTS=ON
|
|
|
|
-DNANODBC_ENABLE_UNICODE=ON
|
2016-10-13 19:07:01 +08:00
|
|
|
)
|
|
|
|
|
2016-11-09 06:25:47 +08:00
|
|
|
vcpkg_install_cmake()
|
2016-10-13 19:07:01 +08:00
|
|
|
|
|
|
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
2018-11-03 07:17:07 +08:00
|
|
|
if(EXISTS ${CURRENT_PACKAGES_DIR}/cmake)
|
|
|
|
vcpkg_fixup_cmake_targets(CONFIG_PATH cmake)
|
|
|
|
endif()
|
2016-10-13 19:07:01 +08:00
|
|
|
|
2018-11-03 07:17:07 +08:00
|
|
|
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/nanodbc RENAME copyright)
|