Hello,

I would like to link against several .lib windows libraries.
So, I set up the link paths via the following commands:

if (MKL_FOUND)
  set(LINK_PATHS ${LINK_PATHS} "${mkl_solver_PATH}")
endif (MKL_FOUND)
if (MPI_FOUND)
  set(LINK_PATHS ${LINK_PATHS} "${MPI_BASE_PATH}/lib")
endif (MPI_FOUND)

link_directories(${LINK_PATHS})

Now, I list the libraries to link against in a variable: LINK_LIBS

set(LINK_LIBS odbc32 libifport libifcore)

if (MKL_FOUND)
  set(LINK_LIBS ${LINK_LIBS} ${ATLAS_LIBRARIES})
endif (MKL_FOUND)

if (MPI_FOUND)
  set(LINK_LIBS ${LINK_LIBS} fmpich2)
endif (MPI_FOUND)

target_link_libraries(arc2d ${LINK_LIBS})

Now, if I build my project, there is a link error because a lot of symbols are 
not found. If I do a nmake VERBOSE=1, I see that the link command has only the 
last library: fmpich2.

So, my question is: how do I add several libraries in the command 
"target_link_libraries" and how do I add several paths in link_directories 
under windows ?
Do I need to add a ".lib" string to each libraries ?
Do I need to add the complete path to each libraries ?

Best regards,

YC
_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to