[CMake] trouble with find_package

Cotton Candy cottoncandycoder at gmail.com
Wed Aug 24 11:09:29 EDT 2016


Hi,
Cmake was having trouble finding the MySQL libraries on my machine so I
tried using find_package with a package finder that I downloaded (
https://gist.github.com/RenatoUtsch/1623340) called FindMySQL.cmake.

In my CMakeLists.txt file I added:

------------------------
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH}
“/Users/jones/Dropbox/Skedmo/skedmo-solver-lean/cmake/”)

find_package(MySQL)
------------------------

And I made sure that FindMySQL.cmake was in the directory that I added to
the CMAKE_MODULE_PATH.

Every time I press "Configure" on the GUI, I get the same warning message:

CMake Warning at CMakeLists.txt:38 (find_package):
By not providing "FindMySQL.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "MySQL", but
CMake did not find one.

Could not find a package configuration file provided by "MySQL" with any of
the following names:

MySQLConfig.cmake
mysql-config.cmake

Add the installation prefix of "MySQL" to CMAKE_PREFIX_PATH or set
"MySQL_DIR" to a directory containing one of the above files. If "MySQL"
provides a separate development package or SDK, be sure it has been
installed.

If I continue with "Generate", ultimately the resulting makefile does not
work. I get errors at the linker stage.


A few details about my environment:

I am working on a MacBook Pro running OS X 10.9.5.
I am using MAMP to run MySQL.
The project builds just fine using Xcode, but I am trying to switch to
CMake.

Thanks for your help.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake/attachments/20160824/d8fba7b7/attachment-0001.html>


More information about the CMake mailing list