[CMake] How to find MinGW static library in Windows?
Vyacheslav Karamov
ubuntulist at yandex.ru
Tue Apr 17 12:20:44 EDT 2012
Hi All!
I have some MinGW static libraries and I need to use them in VS2008
project which is generated by CMake.
if (${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
set(CMAKE_FIND_LIBRARY_PREFIXES ${CMAKE_FIND_LIBRARY_PREFIXES} lib)
set(CMAKE_FIND_LIBRARY_SUFFIXES ".a" ${CMAKE_FIND_LIBRARY_SUFFIXES})
....
find_library(libatlas
NAME atlas
HINTS
${CMAKE_CURRENT_SOURCE_DIR}/${CMAKE_SYSTEM_NAME}/atlas/x86sse2/lib
DOC "Atlas libraries"
)
target_link_libraries(${lib_name}
${libatlas}
)
But CMake adds .lib at the end of the library name. This is not what I
expect.
----
WBR,
Vyacheslav.
More information about the CMake
mailing list