@@ -34,16 +34,27 @@ if(USE_GETM)
3434 )
3535endif ()
3636
37- option (USE_FABM "Enable FABM-based drivers" OFF )
38- if (USE_FABM)
37+ include (FindFABM )
38+
39+ # Add FABM include directories if found
40+ if (FABM_INCLUDE_DIRS)
41+ target_include_directories (mossco_drivers PRIVATE ${FABM_INCLUDE_DIRS} )
42+ endif ()
43+ if (FABM_LIBRARIES)
44+ target_link_libraries (mossco_drivers PRIVATE ${FABM_LIBRARIES} )
45+ endif ()
46+
47+ option (USE_FABM "Enable FABM-based drivers" ON )
48+ #if(USE_FABM)
49+ # FABM drivers are enabled by default, so we append them to DRIVER_SOURCES
3950 list (APPEND DRIVER_SOURCES
40- fabm0d_driver.F90
41- fabm_benthic_driver.F90
42- fabm_gotm_driver.F90
51+ # fabm0d_driver.F90
52+ # fabm_benthic_driver.F90
53+ # fabm_gotm_driver.F90
4354 fabm_pelagic_driver.F90
4455 fabm_sediment_driver.F90
4556 )
46- endif ()
57+ # endif()
4758
4859# Option to enable or disable EROSED-related sources
4960option (USE_EROSED "Enable EROSED-related drivers (biotypes, benthoseffect_class)" OFF )
@@ -77,6 +88,7 @@ endif()
7788
7889
7990# Option to enable or disable clm_driver.F90
91+ # @todo this really depends on working netcdf only
8092option (USE_CLM "Enable CLM file-based coupling" OFF )
8193if (USE_CLM )
8294 list (APPEND DRIVER_SOURCES
@@ -90,6 +102,8 @@ target_sources(mossco_drivers PRIVATE ${DRIVER_SOURCES})
90102# Link against mossco_utilities to get access to ESMF, versioning, NetCDF (via ESMF), etc.
91103# Using PUBLIC will propagate the usage requirements of mossco_utilities (like its INTERFACE include directories
92104# and link libraries) to targets that link against mossco_drivers.
105+
106+ target_include_directories (mossco_drivers PUBLIC ${CMAKE_BINARY_DIR } /src/utilities )
93107target_link_libraries (mossco_drivers PUBLIC mossco_utilities )
94108
95109# Ensure that consumers of mossco_drivers can find Fortran modules (.mod files)
0 commit comments