Skip to content

Commit 7ba48a1

Browse files
authored
Merge pull request #6717 from tjhei/cmake-gwb-allow-dynamic
cmake: allow installing GWB as a shared library
2 parents b046925 + b31da85 commit 7ba48a1

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -655,6 +655,7 @@ if(${ASPECT_BUILD_DEBUG} STREQUAL "ON")
655655
"${DEAL_II_LINKER_FLAGS} ${DEAL_II_LINKER_FLAGS_DEBUG}"
656656
)
657657
target_link_libraries(${TARGET_EXE_DEBUG} dealii::dealii_debug)
658+
set_target_properties(${TARGET_EXE_DEBUG} PROPERTIES INSTALL_RPATH "$ORIGIN/../lib")
658659
endif()
659660

660661
if(${ASPECT_BUILD_RELEASE} STREQUAL "ON")
@@ -670,6 +671,7 @@ if(${ASPECT_BUILD_RELEASE} STREQUAL "ON")
670671
"${DEAL_II_LINKER_FLAGS} ${DEAL_II_LINKER_FLAGS_RELEASE}"
671672
)
672673
target_link_libraries(${TARGET_EXE_RELEASE} dealii::dealii_release)
674+
set_target_properties(${TARGET_EXE_RELEASE} PROPERTIES INSTALL_RPATH "$ORIGIN/../lib")
673675
endif()
674676

675677
# Make sure we have the rpath to our dependencies set:

contrib/world_builder/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -559,7 +559,7 @@ endif()
559559

560560
# binary:
561561
install(CODE "message(Installing...)")
562-
install(TARGETS ${WB_TARGET} EXPORT WorldBuilder DESTINATION bin)
562+
install(TARGETS ${WB_TARGET} EXPORT WorldBuilder DESTINATION lib)
563563
install(EXPORT WorldBuilder DESTINATION bin)
564564

565565
if(WB_MAKE_FORTRAN_WRAPPER)

0 commit comments

Comments
 (0)