New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix building ODBC connector on OSX/macOS #13
Conversation
|
Hello unilynx! Thank you for your contribution! Similar to other open source projects, the MariaDB Corporation needs to have shared ownership of all code that is included in the MariaDB C/ODBC distribution. The easiest way to achieve this is by submitting your code under the BSD-new license. The other alternative is to sign the code contribution agreement which can be found here: https://mariadb.com/kb/en/mariadb/mca/ Please indicate in a comment below that you are contributing your new code of the whole pull request, including one or several files that are either new files or modified ones, under the BSD-new license or that you have filled out the contribution agreement and sent it. Best regards, |
|
I'm contributing all the changes in this pull request under the BSD-new license. |
CMakeLists.txt
Outdated
| @@ -127,6 +127,15 @@ IF(NOT WIN32) | |||
| ELSE() | |||
| MESSAGE(FATAL_ERROR "Driver Manager was not found") | |||
| ENDIF() | |||
|
|
|||
| # Looking for iconv files | |||
| INCLUDE(${CMAKE_SOURCE_DIR}/cmake/FindIconv.cmake) | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't we have here something like IF(APPLE), since (at the moment) we don't need that dependency on other platforms?
| INCLUDE(${CMAKE_SOURCE_DIR}/cmake/FindIconv.cmake) | ||
| IF(ICONV_FOUND) | ||
| INCLUDE_DIRECTORIES(${ICONV_INCLUDE_DIR}) | ||
| SET(PLATFORM_DEPENDENCIES ${PLATFORM_DEPENDENCIES} ${ICONV_LIBRARIES}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps it makes sense to add ICONV_LIBRARIES to dependencies only if ICONV_EXTERNAL. Or that is another reason to add IF(APPLE)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No problem.. I've changed that block from IF(NOT WIN32) to a separate IF(APPLE) block.
These fixes allow the ODBC connector to be built on OSX. It requires homebrew to supply cmake, unixodbc, openssl and the mariadb-connector-c, and then still some overrides on the CMake command line to build:
This worked for me: