fixed: we have to "link" these to the fmt::fmt target

if not, the required defines are not set when building
with external libfmt
This commit is contained in:
Arne Morten Kvarving 2021-04-09 11:31:16 +02:00
parent 3d738e8383
commit 38b2e5a571

View File

@ -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 $<TARGET_OBJECTS:flow_lib${OBJ}>)
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 $<TARGET_OBJECTS:ebos_lib${OBJ}>)
endforeach()