From 38b2e5a571e6544c9d8ec85e31a43e51db1db24f Mon Sep 17 00:00:00 2001 From: Arne Morten Kvarving Date: Fri, 9 Apr 2021 11:31:16 +0200 Subject: [PATCH] fixed: we have to "link" these to the fmt::fmt target if not, the required defines are not set when building with external libfmt --- CMakeLists.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 2bc824ac0..51ce9ebff 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -247,6 +247,9 @@ set(FLOW_TGTS) foreach(OBJ ${COMMON_MODELS} ${FLOW_MODELS}) add_library(flow_lib${OBJ} OBJECT flow/flow_ebos_${OBJ}.cpp) list(APPEND FLOW_TGTS $) + if(TARGET fmt::fmt) + target_link_libraries(flow_lib${OBJ} fmt::fmt) + endif() endforeach() set_property(TARGET flow_libblackoil PROPERTY POSITION_INDEPENDENT_CODE ON) @@ -372,6 +375,9 @@ endif() set(MEBOS_TARGETS "") foreach(OBJ ${COMMON_MODELS} blackoil) add_library(ebos_lib${OBJ} OBJECT EXCLUDE_FROM_ALL ebos/ebos_${OBJ}.cc) + if(TARGET fmt::fmt) + target_link_libraries(ebos_lib${OBJ} fmt::fmt) + endif() list(APPEND MEBOS_TARGETS $) endforeach()