[CMake] trouble with find_package

Petr Kmoch petr.kmoch at gmail.com
Wed Aug 24 11:21:00 EDT 2016


Hi.

In your e-mail, there are curly quotes in the set() command. Is that an
artifact of e-mailing, or are they actually present in your code? The
latter could indeed cause the error you're seeing.

Petr

On 24 August 2016 at 17:09, Cotton Candy <cottoncandycoder at gmail.com> wrote:

> 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.
>
>
>
> --
>
> Powered by www.kitware.com
>
> Please keep messages on-topic and check the CMake FAQ at:
> http://www.cmake.org/Wiki/CMake_FAQ
>
> Kitware offers various services to support the CMake community. For more
> information on each offering, please visit:
>
> CMake Support: http://cmake.org/cmake/help/support.html
> CMake Consulting: http://cmake.org/cmake/help/consulting.html
> CMake Training Courses: http://cmake.org/cmake/help/training.html
>
> Visit other Kitware open-source projects at http://www.kitware.com/
> opensource/opensource.html
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/cmake
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake/attachments/20160824/f4285fcb/attachment.html>


More information about the CMake mailing list