vcpkg/ports/freetds/portfile.cmake
Thomas1664 b25a13c578
[freetds, unixodbc] Update (#24279)
* [freetds] Update to 1.3.10

* version

* Add dependence on mysql

* version

* mysql patch

* version

* Add warning for required system libs

* version

* Remove mysql dependence

* version

* Fix supports

* version

* Add mysql dependence

* version

* Add feature tools

* version

* Add dependency on unixodbc

* format

* version

* remove mysql

* version

* Update unixodbc

* version

* remove man

* version

* fix cmake

* version

* test

* fix path

* version

* disable wide characters on UNIX

* add to ci baseline

* version

* don't check for UWP

* version

* remove unixodbc from ci baseline

* Fix deprecated license

* version

* Unsupported on unix

* version
2022-05-13 15:46:37 -07:00

62 lines
1.9 KiB
CMake

vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO freetds/freetds
REF v1.3.10
HEAD_REF master
SHA512 78b494c04e3436bfdc4997e6f0196baef27246bb7ad825c487a16f247d13c99324a39d52bfe8f5306164ae3f5c7eb43ca83944b24a3ce6b4bcd733849b4064ad
PATCHES
disable-tests.patch
)
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
FEATURES
openssl WITH_OPENSSL
tools WITH_TOOLS
)
vcpkg_find_acquire_program(PERL)
get_filename_component(PERL_PATH ${PERL} DIRECTORY)
vcpkg_add_to_path("${PERL_PATH}")
if (VCPKG_TARGET_IS_WINDOWS)
vcpkg_find_acquire_program(GPERF)
get_filename_component(GPERF_PATH ${GPERF} DIRECTORY)
vcpkg_add_to_path(${GPERF_PATH})
else()
if (NOT EXISTS /usr/bin/gperf)
message(FATAL_ERROR "freetds requires gperf, these can be installed on Ubuntu systems via apt-get install gperf.")
endif()
endif()
set(_WCHAR_SUPPORT ON)
if(NOT VCPKG_TARGET_IS_WINDOWS)
set(_WCHAR_SUPPORT OFF)
endif()
vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
DISABLE_PARALLEL_CONFIGURE
OPTIONS
${FEATURE_OPTIONS}
-DENABLE_ODBC_WIDE=${_WCHAR_SUPPORT}
)
vcpkg_cmake_install()
vcpkg_copy_pdbs()
if("tools" IN_LIST FEATURES)
vcpkg_copy_tools(TOOL_NAMES bsqldb bsqlodbc datacopy defncopy freebcp tdspool tsql AUTO_CLEAN)
if(EXISTS "${CURRENT_PACKAGES_DIR}/etc")
file(INSTALL "${CURRENT_PACKAGES_DIR}/etc" DESTINATION "${CURRENT_PACKAGES_DIR}/tools/${PORT}/etc")
endif()
endif()
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/etc" "${CURRENT_PACKAGES_DIR}/debug/etc")
if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin")
endif()
file(INSTALL "${SOURCE_PATH}/COPYING.txt" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)