vcpkg/ports/nanodbc/portfile.cmake
2020-09-22 16:35:25 -07:00

30 lines
902 B
CMake

# Only static libraries are supported.
# See https://github.com/nanodbc/nanodbc/issues/13
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO nanodbc/nanodbc
REF 7404a4dd7697e188df5724ab95a7553d2fc404eb
SHA512 35ca098e783d771f3df611bce84e9b8207a6a5b72c492d2f3909977bc91a7c22bb262c34768b0d97ebfbdf12eeda0214064a8ea171e7bdda7b759f93ff346f45
HEAD_REF master
)
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
OPTIONS
-DNANODBC_DISABLE_EXAMPLES=ON
-DNANODBC_DISABLE_TESTS=ON
-DNANODBC_ENABLE_UNICODE=OFF
)
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(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)