mirror of
https://github.com/microsoft/vcpkg.git
synced 2025-01-14 14:37:55 +08:00
parent
c2795f1662
commit
cd0ea13812
5
ports/unixodbc/CONTROL
Normal file
5
ports/unixodbc/CONTROL
Normal file
@ -0,0 +1,5 @@
|
||||
Source: unixodbc
|
||||
Version: 2.3.7
|
||||
Homepage: https://github.com/lurcher/unixODBC
|
||||
Description: unixODBC is an Open Source ODBC sub-system and an ODBC SDK for Linux, Mac OSX, and UNIX
|
||||
Supports: (osx|linux)
|
32
ports/unixodbc/portfile.cmake
Normal file
32
ports/unixodbc/portfile.cmake
Normal file
@ -0,0 +1,32 @@
|
||||
vcpkg_fail_port_install(ON_TARGET "UWP" "Windows")
|
||||
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO lurcher/unixODBC
|
||||
REF 2.3.7
|
||||
SHA512 94e95730304990fc5ed4f76ebfb283d8327a59a3329badaba752a502a2d705549013fd95f0c92704828c301eae54081c8704acffb412fd1e1a71f4722314cec0
|
||||
HEAD_REF master
|
||||
)
|
||||
|
||||
vcpkg_configure_make(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
AUTOCONFIG
|
||||
)
|
||||
|
||||
vcpkg_install_make()
|
||||
|
||||
vcpkg_copy_pdbs()
|
||||
|
||||
if (VCPKG_LIBRARY_LINKAGE STREQUAL "static")
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin")
|
||||
endif ()
|
||||
|
||||
file(REMOVE_RECURSE
|
||||
"${CURRENT_PACKAGES_DIR}/debug/include"
|
||||
"${CURRENT_PACKAGES_DIR}/debug/share"
|
||||
"${CURRENT_PACKAGES_DIR}/debug/etc"
|
||||
"${CURRENT_PACKAGES_DIR}/etc"
|
||||
"${CURRENT_PACKAGES_DIR}/share/man"
|
||||
)
|
||||
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
|
||||
file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/unixodbcConfig.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT})
|
16
ports/unixodbc/unixodbcConfig.cmake
Normal file
16
ports/unixodbc/unixodbcConfig.cmake
Normal file
@ -0,0 +1,16 @@
|
||||
function(set_library_target NAMESPACE LIB_NAME DEBUG_LIB_FILE_NAME RELEASE_LIB_FILE_NAME INCLUDE_DIR)
|
||||
add_library(${NAMESPACE}::${LIB_NAME} STATIC IMPORTED)
|
||||
set_target_properties(${NAMESPACE}::${LIB_NAME} PROPERTIES
|
||||
IMPORTED_CONFIGURATIONS "RELEASE;DEBUG"
|
||||
IMPORTED_LOCATION_RELEASE "${RELEASE_LIB_FILE_NAME}"
|
||||
IMPORTED_LOCATION_DEBUG "${DEBUG_LIB_FILE_NAME}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${INCLUDE_DIR}"
|
||||
)
|
||||
set(${NAMESPACE}_${LIB_NAME}_FOUND 1)
|
||||
endfunction()
|
||||
|
||||
get_filename_component(ROOT "${CMAKE_CURRENT_LIST_FILE}" PATH)
|
||||
get_filename_component(ROOT "${ROOT}" PATH)
|
||||
get_filename_component(ROOT "${ROOT}" PATH)
|
||||
|
||||
set_library_target("UNIX" "odbc" "${ROOT}/debug/lib/libodbc.so" "${ROOT}/lib/libodbc.so" "${ROOT}/include/")
|
4
ports/unixodbc/usage
Normal file
4
ports/unixodbc/usage
Normal file
@ -0,0 +1,4 @@
|
||||
The package unixodbc is compatible with built-in CMake targets:
|
||||
|
||||
FIND_PACKAGE(unixodbc REQUIRED)
|
||||
TARGET_LINK_LIBRARIES(main PRIVATE UNIX::odbc) for linkage
|
@ -1774,6 +1774,12 @@ unicorn-lib:x64-uwp=fail
|
||||
unittest-cpp:arm64-windows=fail
|
||||
unittest-cpp:arm-uwp=fail
|
||||
unittest-cpp:x64-uwp=fail
|
||||
unixodbc:arm64-windows=fail
|
||||
unixodbc:arm-uwp=fail
|
||||
unixodbc:x64-uwp=fail
|
||||
unixodbc:x64-windows=fail
|
||||
unixodbc:x64-windows-static=fail
|
||||
unixodbc:x86-windows=fail
|
||||
unrar:arm64-windows=fail
|
||||
unrar:arm-uwp=fail
|
||||
unrar:x64-linux=fail
|
||||
|
Loading…
x
Reference in New Issue
Block a user