diff --git a/src/external/esmf_time_f90/CMakeLists.txt b/src/external/esmf_time_f90/CMakeLists.txt index 6546880fb4..d9a531886d 100644 --- a/src/external/esmf_time_f90/CMakeLists.txt +++ b/src/external/esmf_time_f90/CMakeLists.txt @@ -22,6 +22,12 @@ add_library(esmf ${_esmf_time_src}) mpas_fortran_target(esmf) add_library(${PROJECT_NAME}::external::esmf ALIAS esmf) +# This library is MPAS's bundled ESMF time-manager stubs, not the full ESMF. Naming the +# file libesmf lets the loader substitute a real ESMF found via LD_LIBRARY_PATH, +# breaking every MPAS executable. Changing the output name results in the library +# being installed as libesmf_time.{so,a} and resolves the name conflict. +set_target_properties(esmf PROPERTIES OUTPUT_NAME esmf_time) + target_compile_definitions(esmf PRIVATE HIDE_MPI=1) target_include_directories(esmf PUBLIC $)