Dear all,

I'm a cmake-beginner and my problem is to avoid the application of a system 
library.

It exist a hdf5 installation in the system /usr/lib and in my home directory, 
but if I set in my CMakeLists.txt something like [1] nothing is happend, i.e. 
the system libs are still used. :(

Thanks for help!


[1]

SET(HDF5_PATHS "/home/test/install/gcc/hdf5-1.8.4_serial_v16")

FIND_LIBRARY(HDF5_LIBRARY hdf5 ${HDF5_PATHS}/lib  NO_DEFAULT_PATH )

FIND_PATH(HDF5_INCLUDE_DIR hdf5.h ${HDF5_PATHS}/include NO_DEFAULT_PATH 
NO_CMAKE_SYSTEM_PATH)

SET(EXTRA_LIBS ${HDF5_LIBRARY})

ADD_EXECUTABLE(vibrating_string main.cpp)

target_link_libraries(vibrating_string ${EXTRA_LIBS})
_______________________________________________
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