FindLinAl.cmake 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. # Find the DBV library LinAl headers and library.
  2. #
  3. # LINAL_INCLUDE_DIR - where to find Linal/linal.h, etc.
  4. # LINAL_LIBRARIES - List of libraries.
  5. # LINAL_FOUND - True if LinAl found.
  6. # Look for the library.
  7. #execute_process(COMMAND /home/dbv/3rdparty64-gcc43/LinAl/bin/linal-config --libs
  8. # OUTPUT_VARIABLE LINAL_LIBRARIES)
  9. set(LINAL_LIBRARIES "/home/dbv/3rdparty64-gcc43/LinAl/lib/libLinAl.so;/home/dbv/3rdparty64-gcc43/LinAl/lib/libarpack++.a;/home/dbv/3rdparty64-gcc43/LinAl/lib/libsuperlu.a;/home/dbv/3rdparty64-gcc43/LinAl/lib/libarpack.a;/home/dbv/3rdparty64-gcc43/LinAl/lib/liblapack.a;/home/dbv/3rdparty64-gcc43/LinAl/lib/libblas.so")
  10. IF(UNIX) #find gfortran
  11. # If the faster 'gold' linker is used, to avoid complaints about undefined symbol
  12. # '_gfortran_concat_string', '_gfortran_pow_i4_i4', ... , let's link against gfortran libraries.
  13. # These errors happen while linking against VTK static built with R support
  14. SET(CMAKE_FIND_LIBRARY_SUFFIXES_SAVED ${CMAKE_FIND_LIBRARY_SUFFIXES}) # Backup
  15. LIST(APPEND CMAKE_FIND_LIBRARY_SUFFIXES ".so.3")
  16. FIND_LIBRARY(GFortran_LIBRARY gfortran)
  17. SET(CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES_SAVED}) # Restore
  18. LIST(APPEND LINAL_LIBRARIES ${GFortran_LIBRARY})
  19. # message(STATUS "GFortran_LIBRARY: ${GFortran_LIBRARY}")
  20. ENDIF()
  21. MARK_AS_ADVANCED(LINAL_LIBRARIES)
  22. # Look for the header file.
  23. #execute_process(COMMAND /home/dbv/3rdparty64-gcc43/LinAl/bin/linal-config --cxxflags
  24. # OUTPUT_VARIABLE LINAL_INCLUDE_DIR)
  25. set(LINAL_INCLUDE_DIR "/home/dbv/3rdparty64-gcc43/LinAl/include/")
  26. MARK_AS_ADVANCED(LINAL_INCLUDE_DIR)
  27. # handle the QUIETLY and REQUIRED arguments and set LINAL_FOUND to TRUE if
  28. # all listed variables are TRUE
  29. INCLUDE(FindPackageHandleStandardArgs)
  30. FIND_PACKAGE_HANDLE_STANDARD_ARGS(LINAL DEFAULT_MSG LINAL_LIBRARIES LINAL_INCLUDE_DIR)
  31. #IF(MATIO_FOUND)
  32. # SET(MATIO_LIBRARIES ${MATIO_LIBRARY} ${HDF5_LIBRARIES})
  33. # SET(MATIO_INCLUDE_DIRS ${MATIO_INCLUDE_DIR} ${HDF5_INCLUDE_DIR})
  34. #ELSE(MATIO_FOUND)
  35. #SET(MATIO_LIBRARIES)
  36. #SET(MATIO_INCLUDE_DIRS)
  37. #ENDIF(MATIO_FOUND)