Conversation
|
@microsoft-github-policy-service agree [company="SAP"] |
|
@microsoft-github-policy-service agree company="SAP" |
This reverts commit 937cdc4.
ports/odbccpp/vcpkg.json
Outdated
| "dependencies": [ | ||
| { | ||
| "name": "unixodbc", | ||
| "platform": "linux | osx" |
There was a problem hiding this comment.
How is ODBC provided on other platforms which are not !windows?
There was a problem hiding this comment.
Thanks for taking a look. In general I oriented on nanodbc and freetds, but I took the platform here from the supports config of unixodbc (https://github.com/microsoft/vcpkg/blob/b2f068faf45a3f04145bec0f52a66526ad590227/ports/unixodbc/vcpkg.json). For other platforms it must be provided by the system. Let me know if I miss something, I have no issue to change it to !windows if it makes sense.
| -FIND_PACKAGE(ODBC REQUIRED) | ||
| +IF(UNIX) | ||
| + FIND_PACKAGE(unixodbc CONFIG) | ||
| + IF(unixodbc_FOUND) | ||
| + SET(ODBC_TARGET UNIX::odbc) | ||
| + ENDIF() | ||
| +ENDIF() | ||
| +IF(NOT ODBC_TARGET) | ||
| + FIND_PACKAGE(ODBC REQUIRED) | ||
| + SET(ODBC_TARGET ODBC::ODBC) | ||
| +ENDIF() |
There was a problem hiding this comment.
This must match the dependencies expressed in the manifests. I have more suggestions once the manifest dependency question is answered.
There was a problem hiding this comment.
Good point, this is wrongfully adapted. Depending on the result of the other comment, this probably should be IF(LINUX OR APPLE).
|
Hey, Odbccpp is an open source wrapper for the odbc api to use in c++. Currently, it is mostly used for two other open source projects GDAL and QGIS, it would be cool for them to have it available in vcpkg. |
JavierMatosD
left a comment
There was a problem hiding this comment.
Tagging team review to discuss the proper find_package call
|
|
||
| -FIND_PACKAGE(ODBC REQUIRED) | ||
| +IF(UNIX) | ||
| + FIND_PACKAGE(unixodbc CONFIG) |
There was a problem hiding this comment.
Hmm.. https://github.com/microsoft/vcpkg/blob/master/ports/unixodbc/usage#L4 I'll need to consult the team since this ports exports unofficial targets. Tagging vcpkg-team-review
There was a problem hiding this comment.
Ok, it seems this is allowed and this should use the vcpkg provided configs instead.
| -DGTEST_FOUND=OFF | ||
| -DDOXYGEN_FOUND=OFF |
There was a problem hiding this comment.
| -DGTEST_FOUND=OFF | |
| -DDOXYGEN_FOUND=OFF | |
| -DCMAKE_DISABLE_FIND_PACKAGE_GTest=ON | |
| -DCMAKE_DISABLE_FIND_PACKAGE_Doxygen=ON |
| ) | ||
|
|
||
| vcpkg_cmake_install() | ||
|
|
There was a problem hiding this comment.
| vcpkg_copy_pdbs() |
| "dependencies": [ | ||
| { | ||
| "name": "unixodbc", | ||
| "platform": "!windows" |
There was a problem hiding this comment.
The port in vcpkg supports "linux | osx"
vcpkg.json, or explicitly disabled through patches or build system arguments such as CMAKE_DISABLE_FIND_PACKAGE_Xxx or VCPKG_LOCK_FIND_PACKAGEvcpkg.jsonmatches what upstream says.vcpkg.jsonmatches what upstream says../vcpkg x-add-version --alland committing the result.