Skip to content
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

Merged
merged 3 commits into from Feb 25, 2017
Merged

Fix building ODBC connector on OSX/macOS #13

merged 3 commits into from Feb 25, 2017

Conversation

unilynx
Copy link
Contributor

@unilynx unilynx commented Feb 24, 2017

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:

cmake -DWITH_OPENSSL=On -DOPENSSL_INCLUDE_DIR=/usr/local/opt/openssl/include -DOPENSSL_SSL_LIBRARY=/usr/local/opt/openssl/lib/libssl.dylib -DOPENSSL_CRYPTO_LIBRARY=/usr/local/opt/openssl/lib/libcrypto.dylib

@lawrinn
Copy link
Collaborator

lawrinn commented Feb 24, 2017

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,
Lawrin

@unilynx
Copy link
Contributor Author

unilynx commented Feb 24, 2017

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)
Copy link
Collaborator

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})
Copy link
Collaborator

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)

Copy link
Contributor Author

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.

@lawrinn lawrinn merged commit 677f3c9 into mariadb-corporation:odbc-2.0 Feb 25, 2017
@unilynx unilynx deleted the osx-fix branch February 28, 2017 17:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants