2018-11-03 00:17:07 +01:00
|
|
|
# Only static libraries are supported.
|
|
|
|
# See https://github.com/nanodbc/nanodbc/issues/13
|
2018-12-17 16:44:08 -08:00
|
|
|
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
|
2021-07-23 01:38:59 -04:00
|
|
|
|
2018-11-03 00:17:07 +01:00
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO nanodbc/nanodbc
|
2020-10-13 13:17:32 -07:00
|
|
|
REF 7404a4dd7697e188df5724ab95a7553d2fc404eb # v2.13.0
|
2020-09-23 01:35:25 +02:00
|
|
|
SHA512 35ca098e783d771f3df611bce84e9b8207a6a5b72c492d2f3909977bc91a7c22bb262c34768b0d97ebfbdf12eeda0214064a8ea171e7bdda7b759f93ff346f45
|
2018-11-03 00:17:07 +01:00
|
|
|
HEAD_REF master
|
2021-10-14 05:41:53 +08:00
|
|
|
PATCHES
|
|
|
|
rename-version.patch
|
|
|
|
add-missing-include.patch
|
2021-11-17 01:41:50 +01:00
|
|
|
find-unixodbc.patch
|
2023-10-03 05:31:05 +02:00
|
|
|
no-werror.patch
|
2016-10-13 19:07:01 +08:00
|
|
|
)
|
2021-08-04 13:27:40 -07:00
|
|
|
file(RENAME "${SOURCE_PATH}/VERSION" "${SOURCE_PATH}/VERSION.txt")
|
2016-10-13 19:07:01 +08:00
|
|
|
|
2021-07-23 01:38:59 -04:00
|
|
|
if(DEFINED NANODBC_ODBC_VERSION)
|
|
|
|
set(NANODBC_ODBC_VERSION -DNANODBC_ODBC_VERSION=${NANODBC_ODBC_VERSION})
|
|
|
|
endif()
|
|
|
|
|
2021-10-14 05:41:53 +08:00
|
|
|
vcpkg_cmake_configure(
|
|
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
2018-11-03 00:17:07 +01:00
|
|
|
OPTIONS
|
|
|
|
-DNANODBC_DISABLE_EXAMPLES=ON
|
|
|
|
-DNANODBC_DISABLE_TESTS=ON
|
2019-12-21 04:23:33 +08:00
|
|
|
-DNANODBC_ENABLE_UNICODE=OFF
|
2021-07-23 01:38:59 -04:00
|
|
|
${NANODBC_ODBC_VERSION}
|
2016-10-13 19:07:01 +08:00
|
|
|
)
|
|
|
|
|
2021-10-14 05:41:53 +08:00
|
|
|
vcpkg_cmake_install()
|
2016-10-13 19:07:01 +08:00
|
|
|
|
2021-10-14 05:41:53 +08:00
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
2020-09-27 17:51:49 -07:00
|
|
|
if(VCPKG_TARGET_IS_WINDOWS)
|
2021-10-14 05:41:53 +08:00
|
|
|
vcpkg_cmake_config_fixup(CONFIG_PATH cmake)
|
2020-09-27 17:51:49 -07:00
|
|
|
else()
|
2021-10-14 05:41:53 +08:00
|
|
|
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/${PORT})
|
2018-11-03 00:17:07 +01:00
|
|
|
endif()
|
2016-10-13 19:07:01 +08:00
|
|
|
|
2021-10-14 05:41:53 +08:00
|
|
|
file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|