Bamaco
Bamaco

Reputation: 590

Problem configuring cmake for mysql connector c++

I am attempting to install MySql connector c++ library on my Mac OS, but when I try to configure it as such:

cmake .. -DCMAKE_INSTALL_PREFIX=/usr/local/mysql/connector-c++-8.0 

I get the following error in the middle:

Configuring CDK as part of MySQL_CONCPP project
-- Looking for SSL library.
CMake Error at cdk/cmake/DepFindSSL.cmake:79 (message):
 Cannot find appropriate system libraries for SSL.  Make sure you've
  specified a supported SSL version.  Consult the documentation for WITH_SSL
 alternatives
Call Stack (most recent call first):
 cdk/cmake/DepFindSSL.cmake:354 (main)
  cdk/cmake/dependency.cmake:42 (include)
 cdk/CMakeLists.txt:96 (find_dependency)


-- Setting up Protobuf.

Documentation for WITH_SSL option suggests I put in a path, but I have no clue what to put in

https://dev.mysql.com/doc/connector-cpp/8.0/en/connector-cpp-source-configuration-options.html#option_cmake_with_ssl

Upvotes: 0

Views: 681

Answers (1)

Bamaco
Bamaco

Reputation: 590

I ended up following @pptaszni suggestion and used brew to re-install openssl into a safe location

$ brew install openssl

Then I used the path as follow

$ cmake .. -DCMAKE_INSTALL_PREFIX=/usr/local/mysql/connector-c++-8.0 -DWITH_SSL=/usr/local/Cellar/[email protected]/1.1.1k  -DBUILD_STATIC=ON -DCMAKE_BUILD_TYPE=Debug
$ cmake --build . --config Debug
$ sudo cmake --build . --target install --config Debug

And the library installed properly.

Upvotes: 1

Related Questions