diff --git a/CMakeLists.txt b/CMakeLists.txt index d9e0a937..4fd4014b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -102,6 +102,7 @@ option(BUILD_PASTRI "build the pastri code" OFF) option(BUILD_TIMECMPR "build the time based compression code" OFF) option(BUILD_RANDOMACCESS "build the random access code" OFF) option(BUILD_DOCKER_CONTAINERS "build docker containers for testing" OFF) +option(BUILD_FORTRAN "build the fortran interface" OFF) if(BUILD_DOCKER_CONTAINERS) foreach(CONTAINER Centos Fedora Ubuntu Travis CentosPackaged) diff --git a/sz.pc.in b/sz.pc.in index 77ea8e31..324a8932 100644 --- a/sz.pc.in +++ b/sz.pc.in @@ -1,4 +1,4 @@ -includedir=@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_INCLUDEDIR@ +includedir=@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_INCLUDEDIR@/sz libdir=@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_LIBDIR@ Name: SZ diff --git a/sz/CMakeLists.txt b/sz/CMakeLists.txt index 248cfdf8..19ae57db 100644 --- a/sz/CMakeLists.txt +++ b/sz/CMakeLists.txt @@ -85,6 +85,13 @@ endif() if(BUILD_RANDOMACCESS) target_compile_definitions(SZ PUBLIC HAVE_RANDOMACCESS) endif() +if(BUILD_FORTRAN) + enable_language(Fortran) + target_sources(SZ PRIVATE + ${CMAKE_CURRENT_SOURCE_DIR}/src/rw_interface.F90 + ${CMAKE_CURRENT_SOURCE_DIR}/src/sz_interface.F90 + ) +endif() install (TARGETS SZ ${thirdparty_export} EXPORT SZConfig ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}