wavebitscientific / datetime-fortran

Date and time manipulation for modern Fortran
MIT License
137 stars 50 forks source link

Document building with cmake and autotools #45

Closed milancurcic closed 6 years ago

dongli commented 6 years ago

I used the following CMake codes to import datetime-fortran:

find_package (PkgConfig)
if (${PKG_CONFIG_FOUND})
  pkg_search_module (DATETIME REQUIRED datetime-fortran)
  if (${DATETIME_FOUND})
    include_directories (${DATETIME_INCLUDE_DIRS})
    link_directories (${DATETIME_LIBRARY_DIRS})
  else ()
    message (FATAL_ERROR "Pkg-config could not find datetime-fortran library!")
  endif ()
else ()
  message (FATAL_ERROR "Unable to find datetime-fortran library!")
endif ()