mirror of https://github.com/ecmwf/eccodes.git
ECC-1143: Fix for Fortran modules within bundles
This commit is contained in:
parent
5863d3eecb
commit
28cdad35a5
|
@ -42,10 +42,15 @@ if( HAVE_FORTRAN )
|
||||||
# SOURCES grib_fortran.c grib_f77.c
|
# SOURCES grib_fortran.c grib_f77.c
|
||||||
# LIBS eccodes )
|
# LIBS eccodes )
|
||||||
|
|
||||||
ecbuild_add_library( TARGET eccodes_f90
|
# Note: $<BUILD_INTERFACE:...> will be present only while building (for the whole bundle),
|
||||||
SOURCES grib_fortran.c grib_f90.f90 eccodes_f90.f90 grib_kinds.h
|
# whereas $<INSTALL_INTERFACE:...> is only present once you install the package / bundle
|
||||||
GENERATED grib_f90.f90 eccodes_f90.f90
|
ecbuild_add_library( TARGET eccodes_f90
|
||||||
PRIVATE_LIBS eccodes )
|
SOURCES grib_fortran.c grib_f90.f90 eccodes_f90.f90 grib_kinds.h
|
||||||
|
GENERATED grib_f90.f90 eccodes_f90.f90
|
||||||
|
PUBLIC_INCLUDES $<BUILD_INTERFACE:${CMAKE_Fortran_MODULE_DIRECTORY}>
|
||||||
|
$<INSTALL_INTERFACE:${INSTALL_INCLUDE_DIR}>
|
||||||
|
PRIVATE_LIBS eccodes )
|
||||||
|
|
||||||
if( DEFINED ecbuild_VERSION AND NOT ${ecbuild_VERSION} VERSION_LESS 3.1 )
|
if( DEFINED ecbuild_VERSION AND NOT ${ecbuild_VERSION} VERSION_LESS 3.1 )
|
||||||
# Installed module directory is not in the PUBLIC INCLUDES!
|
# Installed module directory is not in the PUBLIC INCLUDES!
|
||||||
target_include_directories( eccodes_f90 PUBLIC $<INSTALL_INTERFACE:${INSTALL_INCLUDE_DIR}> )
|
target_include_directories( eccodes_f90 PUBLIC $<INSTALL_INTERFACE:${INSTALL_INCLUDE_DIR}> )
|
||||||
|
|
Loading…
Reference in New Issue