Skip to content

Commit

Permalink
Fix linking of ExternalIO on Wheeler
Browse files Browse the repository at this point in the history
  • Loading branch information
nilsvu committed Oct 3, 2023
1 parent 11217b8 commit d28116c
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions src/IO/External/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@

set(LIBRARY ExternalIO)

if (NOT TARGET SpEC::Exporter AND NOT TARGET FUKA::Exporter)
return()
set(_LIB_TYPE INTERFACE)
if (TARGET FUKA::Exporter)
set(_LIB_TYPE "")
endif()

add_spectre_library(${LIBRARY})
add_spectre_library(${LIBRARY} ${_LIB_TYPE})

if (TARGET SpEC::Exporter)
spectre_target_headers(
Expand All @@ -18,11 +19,14 @@ if (TARGET SpEC::Exporter)
)
target_link_libraries(
${LIBRARY}
PUBLIC
INTERFACE
DataStructures
ErrorHandling
SpEC::Exporter
Utilities
)
target_compile_definitions(
ExternalIO INTERFACE HAS_SPEC_EXPORTER)
${LIBRARY} INTERFACE HAS_SPEC_EXPORTER)
endif()

if (TARGET FUKA::Exporter)
Expand All @@ -40,18 +44,14 @@ if (TARGET FUKA::Exporter)
target_link_libraries(
${LIBRARY}
PUBLIC
DataStructures
FUKA::Exporter
GeneralRelativity
Hydro
Utilities
PRIVATE
ErrorHandling
)
target_compile_definitions(
ExternalIO INTERFACE HAS_FUKA_EXPORTER)
${LIBRARY} INTERFACE HAS_FUKA_EXPORTER)
endif()

target_link_libraries(
${LIBRARY}
PUBLIC
DataStructures
ErrorHandling
Utilities
)

0 comments on commit d28116c

Please sign in to comment.