Enable usage of fmtlib on the system.

If fmtlib is present on the system we used that one
in the normal mode (not header only). Otherwise we
fallback to the embedded one header only.
Searching for the library is done on opm-common.
This commit is contained in:
Markus Blatt 2021-03-11 20:03:00 +01:00
parent a05bb1a0b9
commit 6766f2f81e

View File

@ -161,8 +161,10 @@ macro (config_hook)
endif()
opm_need_version_of ("opm-models")
add_definitions(-DFMT_HEADER_ONLY)
list(APPEND EXTRA_INCLUDES SYSTEM ${PROJECT_SOURCE_DIR}/external/fmtlib/include)
if(NOT fmt_FOUND)
add_definitions(-DFMT_HEADER_ONLY)
list(APPEND EXTRA_INCLUDES SYSTEM ${PROJECT_SOURCE_DIR}/external/fmtlib/include)
endif()
include_directories(${EXTRA_INCLUDES})
endmacro (config_hook)