[CMake] find_library/find_path not working on mingw

Karolin Varner karo at cupdev.net
Mon Mar 2 16:53:26 EST 2015


Hi Clément, hi Omar,
thanks for all you're tipps!

It turns out that I had CMAKE_FIND_ROOT_PATH and the PATHS as well as
the HINTS are not used if they're not somewhere under
CMAKE_FIND_ROOT_PATH.  Since all the libs are in a common prefix, I just
added that to CMAKE_FIND_ROOT_PATH.

On 02/27/2015 01:24 AM, Clément Gregoire wrote:
> Hi, you probably want to take a look at
> http://www.cmake.org/Bug/view.php?id=15370

On 02/27/2015 10:27 AM, Omar Valerio wrote:
> FIND_LIBRARY(ZMQ_LIB zmq HINTS "/usr/lib")
>
> Instead of FIND_PATH, you may want to use INCLUDE_DIRECTORIES.
> http://www.cmake.org/cmake/help/v3.0/command/include_directories.html

I am actually passing the result of find_path into include_directories.
The point of using find_path is mostly to give some feedback "Hey, we
could not find that stuff".

Thank you very much,
Karolin


More information about the CMake mailing list