[CMake] Problem with recognising the MSYS environment

Hendrik Sattler post at hendrik-sattler.de
Fri Apr 17 04:02:45 EDT 2009


Zitat von Arjen Markus <arjen.markus at deltares.nl>:
> With -G "MSYS Makefiles" I do get the proper setting for MSYS.
> The find_library command still insists on using the MS Visual C/C++
> versions of the libraries, though, so I need to use my workaround
> still. But at least one point is solved.

What libraries do you want to lookup with find_library()? If those are  
system/compiler libraries (e.g. ws2), don't do that but link them by  
their name, e.g. target_link_libraries(x ws2). This will always give  
you the right one.
Find_library() should only be used for libraries that are not system  
or compiler specific, e.g. you look but libfoo but never for libm.

HS




More information about the CMake mailing list