fixed: building without examples

This commit is contained in:
Arne Morten Kvarving 2023-03-13 11:29:30 +01:00
parent d87ac33791
commit a6b2d2438b

View File

@ -364,11 +364,14 @@ target_compile_definitions(dunecommon INTERFACE DUNE_COMMON_VERSION_MAJOR=${DUNE
target_compile_definitions(dunecommon INTERFACE DUNE_COMMON_VERSION_MINOR=${DUNE_COMMON_VERSION_MINOR})
target_compile_definitions(dunecommon INTERFACE DUNE_COMMON_VERSION_REVISION=${DUNE_COMMON_VERSION_REVISION})
if(Boost_UNIT_TEST_FRAMEWORK_FOUND)
foreach(src examples/co2brinepvt.cpp ${DUNE_TEST_SOURCE_FILES})
foreach(src ${DUNE_TEST_SOURCE_FILES})
get_filename_component(tgt ${src} NAME_WE)
target_link_libraries(${tgt} dunecommon)
endforeach()
endif()
if(BUILD_EXAMPLES)
target_link_libraries(co2brinepvt dunecommon)
endif()
# Install build system files and documentation
install(DIRECTORY cmake