diff --git a/Applications/ApplicationsLib/CMakeLists.txt b/Applications/ApplicationsLib/CMakeLists.txt index 9d734bcb839430e8e13bc73f572b84b1cf756a79..a0bbc6d0eb0276080e7d675c7519973903084ce6 100644 --- a/Applications/ApplicationsLib/CMakeLists.txt +++ b/Applications/ApplicationsLib/CMakeLists.txt @@ -4,6 +4,9 @@ set(LIB_SOURCES ${SOURCES_APPLICATIONSLIB}) # Library add_library(ApplicationsLib ${LIB_SOURCES}) +if(BUILD_SHARED_LIBS) + install(TARGETS ApplicationsLib LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) +endif() target_link_libraries(ApplicationsLib PUBLIC BaseLib GeoLib Processes logog diff --git a/Applications/DataExplorer/Base/CMakeLists.txt b/Applications/DataExplorer/Base/CMakeLists.txt index e2529a875b29b1163f51cb4916d7d0b2bbd9756e..c8f22d0819c0a77663f77b56af00838b12315691 100644 --- a/Applications/DataExplorer/Base/CMakeLists.txt +++ b/Applications/DataExplorer/Base/CMakeLists.txt @@ -35,6 +35,9 @@ add_library(QtBase ${SOURCES} ${HEADERS} ) +if(BUILD_SHARED_LIBS) + install(TARGETS QtBase LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) +endif() target_link_libraries(QtBase Qt5::Widgets) diff --git a/Applications/DataExplorer/DataView/CMakeLists.txt b/Applications/DataExplorer/DataView/CMakeLists.txt index 635ee14749960bc9bc9f3fceb48dc7f14fb7272c..97e948f7fed596b41604836b1b4bec150336e634 100644 --- a/Applications/DataExplorer/DataView/CMakeLists.txt +++ b/Applications/DataExplorer/DataView/CMakeLists.txt @@ -129,6 +129,9 @@ add_library(QtDataView ${HEADERS} ${UIS} ) +if(BUILD_SHARED_LIBS) + install(TARGETS QtDataView LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) +endif() target_link_libraries(QtDataView PUBLIC GeoLib MeshGeoToolsLib MeshLib QtBase VtkVis diff --git a/Applications/DataExplorer/DataView/DiagramView/CMakeLists.txt b/Applications/DataExplorer/DataView/DiagramView/CMakeLists.txt index 558733cebedff970f6126e98be5149782a6e87d5..d8f572e157d2b32657945e57149a58eb430d5ec9 100644 --- a/Applications/DataExplorer/DataView/DiagramView/CMakeLists.txt +++ b/Applications/DataExplorer/DataView/DiagramView/CMakeLists.txt @@ -38,6 +38,9 @@ add_library(QtDiagramView ${HEADERS} ${UIS} ) +if(BUILD_SHARED_LIBS) + install(TARGETS QtDiagramView LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) +endif() target_link_libraries(QtDiagramView PRIVATE BaseLib GeoLib QtBase DataHolderLib Qt5::Gui logog diff --git a/Applications/DataExplorer/DataView/StratView/CMakeLists.txt b/Applications/DataExplorer/DataView/StratView/CMakeLists.txt index ced706d48a552f870680fd40b6ffd175f73c0726..40a37ed959783f283168d43c024aaf1dc01e78aa 100644 --- a/Applications/DataExplorer/DataView/StratView/CMakeLists.txt +++ b/Applications/DataExplorer/DataView/StratView/CMakeLists.txt @@ -30,6 +30,9 @@ add_library(QtStratView ${HEADERS} ${UIS} ) +if(BUILD_SHARED_LIBS) + install(TARGETS QtStratView LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) +endif() target_link_libraries(QtStratView PRIVATE BaseLib GeoLib DataHolderLib QtBase Qt5::Gui diff --git a/Applications/DataExplorer/NetCdfDialog/CMakeLists.txt b/Applications/DataExplorer/NetCdfDialog/CMakeLists.txt index a5e2a4f90da4f9be24c32d66d18d0902e28c3b99..1abed72e61ec59b5e7976514f7de5521db18e197 100644 --- a/Applications/DataExplorer/NetCdfDialog/CMakeLists.txt +++ b/Applications/DataExplorer/NetCdfDialog/CMakeLists.txt @@ -1,4 +1,7 @@ add_library(NetCdfDialogLib NetCdfConfigureDialog.cpp NetCdfConfigureDialog.h) +if(BUILD_SHARED_LIBS) + install(TARGETS NetCdfConfigureDialog LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) +endif() target_link_libraries(NetCdfDialogLib PUBLIC Qt5::Widgets PRIVATE MathLib vtknetcdfcpp) set_property(TARGET NetCdfDialogLib PROPERTY FOLDER "DataExplorer") diff --git a/Applications/DataExplorer/VtkVis/CMakeLists.txt b/Applications/DataExplorer/VtkVis/CMakeLists.txt index 4274231d69157f60d10e815532f52e49d49066f6..80f65891c834256d7cb29b7201721edbcb1fbe63 100644 --- a/Applications/DataExplorer/VtkVis/CMakeLists.txt +++ b/Applications/DataExplorer/VtkVis/CMakeLists.txt @@ -128,6 +128,9 @@ add_library(VtkVis ${HEADERS} ${UIS} ) +if(BUILD_SHARED_LIBS) + install(TARGETS VtkVis LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) +endif() if(GEOTIFF_FOUND) include_directories(${GEOTIFF_INCLUDE_DIRS}) diff --git a/Applications/DataHolderLib/CMakeLists.txt b/Applications/DataHolderLib/CMakeLists.txt index 9740aafa4b5976820093e57e8fad228d7619349e..7f23991438fc1a3a044092b23a3e2e4236e3907e 100644 --- a/Applications/DataHolderLib/CMakeLists.txt +++ b/Applications/DataHolderLib/CMakeLists.txt @@ -3,6 +3,9 @@ GET_SOURCE_FILES(SOURCES_DataHolderLib) # Library add_library(DataHolderLib ${SOURCES_DataHolderLib}) +if(BUILD_SHARED_LIBS) + install(TARGETS DataHolderLib LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) +endif() target_link_libraries(DataHolderLib PUBLIC GeoLib MeshLib diff --git a/Applications/FileIO/CMakeLists.txt b/Applications/FileIO/CMakeLists.txt index 283ae99707fa5445ae869acdaeabf750acd29d95..9f624790b0d428788c030851cfc1bfa72dff0f2d 100644 --- a/Applications/FileIO/CMakeLists.txt +++ b/Applications/FileIO/CMakeLists.txt @@ -20,6 +20,9 @@ include(${PROJECT_SOURCE_DIR}/scripts/cmake/OGSEnabledElements.cmake) # Create the library add_library(ApplicationsFileIO ${SOURCES}) +if(BUILD_SHARED_LIBS) + install(TARGETS ApplicationsFileIO LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) +endif() target_link_libraries(ApplicationsFileIO PUBLIC BaseLib DataHolderLib GeoLib MathLib logog PRIVATE MeshLib diff --git a/Applications/InSituLib/CMakeLists.txt b/Applications/InSituLib/CMakeLists.txt index 732d546c4e559e08b681b4a480a38d8184faf348..486ef6cba61fbcf5841079612d1b91378f172cc5 100644 --- a/Applications/InSituLib/CMakeLists.txt +++ b/Applications/InSituLib/CMakeLists.txt @@ -3,6 +3,9 @@ GET_SOURCE_FILES(SOURCES) # Library add_library(InSituLib ${SOURCES}) +if(BUILD_SHARED_LIBS) + install(TARGETS InSituLib LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) +endif() target_link_libraries(PUBLIC BaseLib PRIVATE MeshLib) diff --git a/BaseLib/CMakeLists.txt b/BaseLib/CMakeLists.txt index c7bea9cdcf5be44d371770657810740cb156490e..ec1c2013b1818a51295150d6498a877e7d369172 100644 --- a/BaseLib/CMakeLists.txt +++ b/BaseLib/CMakeLists.txt @@ -11,6 +11,9 @@ list(APPEND SOURCES "${CMAKE_CURRENT_BINARY_DIR}/BuildInfo.cpp" BuildInfo.h) # Create the library add_library(BaseLib ${SOURCES}) +if(BUILD_SHARED_LIBS) + install(TARGETS BaseLib LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) +endif() include(GenerateExportHeader) generate_export_header(BaseLib) diff --git a/GeoLib/CMakeLists.txt b/GeoLib/CMakeLists.txt index c33ba515a66367cc4d19fcd533449d40b7bc79f4..be49c05a839cbba9346f53d74ccdffd0ea3d431a 100644 --- a/GeoLib/CMakeLists.txt +++ b/GeoLib/CMakeLists.txt @@ -12,6 +12,9 @@ endif() # Create the library add_library(GeoLib ${SOURCES}) +if(BUILD_SHARED_LIBS) + install(TARGETS GeoLib LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) +endif() target_link_libraries(GeoLib PUBLIC BaseLib MathLib logog PRIVATE tet) diff --git a/MaterialLib/CMakeLists.txt b/MaterialLib/CMakeLists.txt index 236ac28865e09ef7fa2bf7ad503ba45c6cc6a611..4c7c4d266e5cfa60a6375c2e2bc44666c8bbc93b 100644 --- a/MaterialLib/CMakeLists.txt +++ b/MaterialLib/CMakeLists.txt @@ -22,6 +22,9 @@ append_source_files(SOURCES PorousMedium/UnsaturatedProperty/RelativePermeabilit append_source_files(SOURCES TwoPhaseModels) add_library(MaterialLib ${SOURCES}) +if(BUILD_SHARED_LIBS) + install(TARGETS MaterialLib LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) +endif() include(GenerateExportHeader) generate_export_header(MaterialLib) diff --git a/MathLib/CMakeLists.txt b/MathLib/CMakeLists.txt index 26f2c130cf00d0c1a1b272eeca1dd9c275d0d33e..8a51e27b4caebc643b7dd859cd28cf9eb6f3f25c 100644 --- a/MathLib/CMakeLists.txt +++ b/MathLib/CMakeLists.txt @@ -26,6 +26,9 @@ endif() # Create the library add_library(MathLib ${SOURCES}) +if(BUILD_SHARED_LIBS) + install(TARGETS MathLib LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) +endif() include(GenerateExportHeader) generate_export_header(MathLib) diff --git a/MeshGeoToolsLib/CMakeLists.txt b/MeshGeoToolsLib/CMakeLists.txt index d890eb189951191ca597b6d1d52296e091bb4ced..983138fab6b6b443077c84392997c4d620e418b8 100644 --- a/MeshGeoToolsLib/CMakeLists.txt +++ b/MeshGeoToolsLib/CMakeLists.txt @@ -3,6 +3,9 @@ GET_SOURCE_FILES(SOURCES) # Create the library add_library(MeshGeoToolsLib ${SOURCES}) +if(BUILD_SHARED_LIBS) + install(TARGETS MeshGeoToolsLib LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) +endif() target_link_libraries(MeshGeoToolsLib PUBLIC GeoLib MathLib diff --git a/MeshLib/CMakeLists.txt b/MeshLib/CMakeLists.txt index 07135d8fd68982e726aaf73137956e44663bff4d..3b099e405e6791d5c8ae9eeca46ca8451cd40076 100644 --- a/MeshLib/CMakeLists.txt +++ b/MeshLib/CMakeLists.txt @@ -22,6 +22,9 @@ endif() # Create the library add_library(MeshLib ${SOURCES}) +if(BUILD_SHARED_LIBS) + install(TARGETS MeshLib LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) +endif() if(OGS_USE_PCH) cotire(MeshLib) endif() diff --git a/NumLib/CMakeLists.txt b/NumLib/CMakeLists.txt index 3809f1347c34ce20e415d7a631adee1c064e9bff..efd3ad4b46bc388a244828cab766c522f4408e83 100644 --- a/NumLib/CMakeLists.txt +++ b/NumLib/CMakeLists.txt @@ -16,6 +16,9 @@ APPEND_SOURCE_FILES(SOURCES Extrapolation) # Create the library add_library(NumLib ${SOURCES}) +if(BUILD_SHARED_LIBS) + install(TARGETS NumLib LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) +endif() include(GenerateExportHeader) generate_export_header(NumLib) target_include_directories(NumLib PUBLIC ${CMAKE_CURRENT_BINARY_DIR}) diff --git a/ProcessLib/BoundaryCondition/Python/CMakeLists.txt b/ProcessLib/BoundaryCondition/Python/CMakeLists.txt index 30cfd3828bd182894f28f97c60a02133533b06c3..52b1f9da15c787f89fdfb30b394456de2d3605bf 100644 --- a/ProcessLib/BoundaryCondition/Python/CMakeLists.txt +++ b/ProcessLib/BoundaryCondition/Python/CMakeLists.txt @@ -3,6 +3,10 @@ add_library(ProcessLibBoundaryConditionPython PythonBoundaryCondition.h PythonBoundaryConditionLocalAssembler.h PythonBoundaryConditionPythonSideInterface.h) +if(BUILD_SHARED_LIBS) + install(TARGETS ProcessLibBoundaryConditionPython + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) +endif() target_compile_definitions(ProcessLibBoundaryConditionPython PUBLIC OGS_USE_PYTHON) @@ -15,6 +19,10 @@ target_link_libraries(ProcessLibBoundaryConditionPython add_library(ProcessLibBoundaryConditionPythonModule PythonBoundaryConditionModule.cpp PythonBoundaryConditionModule.h) +if(BUILD_SHARED_LIBS) + install(TARGETS ProcessLibBoundaryConditionPythonModule + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) +endif() target_link_libraries(ProcessLibBoundaryConditionPythonModule PUBLIC diff --git a/ProcessLib/CMakeLists.txt b/ProcessLib/CMakeLists.txt index b2e9ad01e85589980f93167dadb16b605fa268c0..5b64144df7f8c0411e4c8966db7e24735c33cd60 100644 --- a/ProcessLib/CMakeLists.txt +++ b/ProcessLib/CMakeLists.txt @@ -20,6 +20,9 @@ APPEND_SOURCE_FILES(SOURCES SourceTerms) APPEND_SOURCE_FILES(SOURCES Utils) add_library(ProcessLib ${SOURCES}) +if(BUILD_SHARED_LIBS) + install(TARGETS ProcessLib LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) +endif() target_link_libraries(ProcessLib PUBLIC BaseLib MaterialLib MathLib MeshLib NumLib logog MeshGeoToolsLib diff --git a/ProcessLib/ComponentTransport/CMakeLists.txt b/ProcessLib/ComponentTransport/CMakeLists.txt index 8fd79d9b1acdd7ef422b1ca15d234a69a81e2f43..0b90efa851b2a1bfa9101674341b65f3d6012e0c 100644 --- a/ProcessLib/ComponentTransport/CMakeLists.txt +++ b/ProcessLib/ComponentTransport/CMakeLists.txt @@ -1,6 +1,9 @@ APPEND_SOURCE_FILES(SOURCES) add_library(ComponentTransport ${SOURCES}) +if(BUILD_SHARED_LIBS) + install(TARGETS ComponentTransport LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) +endif() target_link_libraries(ComponentTransport PUBLIC ProcessLib diff --git a/ProcessLib/GroundwaterFlow/CMakeLists.txt b/ProcessLib/GroundwaterFlow/CMakeLists.txt index df390e0d3eb922ee60e7eada6e81030f5611cc75..b60fc65b178c3b2b4b210a034cfdfbc41415e9a3 100644 --- a/ProcessLib/GroundwaterFlow/CMakeLists.txt +++ b/ProcessLib/GroundwaterFlow/CMakeLists.txt @@ -1,6 +1,9 @@ APPEND_SOURCE_FILES(SOURCES) add_library(GroundwaterFlow ${SOURCES}) +if(BUILD_SHARED_LIBS) + install(TARGETS GroundwaterFlow LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) +endif() target_link_libraries(GroundwaterFlow PUBLIC ProcessLib diff --git a/ProcessLib/HT/CMakeLists.txt b/ProcessLib/HT/CMakeLists.txt index ad8493534eb3cca53d2e250622ab4dd20527979a..0adfff1a8c7d0074814fcb0a09c0f5672fc37be7 100644 --- a/ProcessLib/HT/CMakeLists.txt +++ b/ProcessLib/HT/CMakeLists.txt @@ -1,6 +1,9 @@ APPEND_SOURCE_FILES(SOURCES) add_library(HT ${SOURCES}) +if(BUILD_SHARED_LIBS) + install(TARGETS HT LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) +endif() target_link_libraries(HT PUBLIC ProcessLib) include(Tests.cmake) diff --git a/ProcessLib/HeatConduction/CMakeLists.txt b/ProcessLib/HeatConduction/CMakeLists.txt index dab843c36936b496ac542151d58b0bee9bba62d0..d254ac48d5593c99de3c32811d2f3b825781d51e 100644 --- a/ProcessLib/HeatConduction/CMakeLists.txt +++ b/ProcessLib/HeatConduction/CMakeLists.txt @@ -1,6 +1,9 @@ APPEND_SOURCE_FILES(SOURCES) add_library(HeatConduction ${SOURCES}) +if(BUILD_SHARED_LIBS) + install(TARGETS HeatConduction LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) +endif() target_link_libraries(HeatConduction PUBLIC ProcessLib) include(Tests.cmake) diff --git a/ProcessLib/HydroMechanics/CMakeLists.txt b/ProcessLib/HydroMechanics/CMakeLists.txt index 5ac96f99ae46a70289f338fe283b9e69000ce676..abd91957bfbd49272c4a49101081df12e33cbc87 100644 --- a/ProcessLib/HydroMechanics/CMakeLists.txt +++ b/ProcessLib/HydroMechanics/CMakeLists.txt @@ -1,6 +1,9 @@ APPEND_SOURCE_FILES(SOURCES) add_library(HydroMechanics ${SOURCES}) +if(BUILD_SHARED_LIBS) + install(TARGETS HydroMechanics LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) +endif() target_link_libraries(HydroMechanics PUBLIC ProcessLib) include(Tests.cmake) diff --git a/ProcessLib/LIE/CMakeLists.txt b/ProcessLib/LIE/CMakeLists.txt index 9fc910c8815f8ec9a4c1511d08a7d0c7fca68cb0..124f58a67f1a12e9a70c8b34364581897f28ce76 100644 --- a/ProcessLib/LIE/CMakeLists.txt +++ b/ProcessLib/LIE/CMakeLists.txt @@ -5,6 +5,9 @@ APPEND_SOURCE_FILES(SOURCES SmallDeformation) APPEND_SOURCE_FILES(SOURCES SmallDeformation/LocalAssembler) add_library(LIE ${SOURCES}) +if(BUILD_SHARED_LIBS) + install(TARGETS LIE LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) +endif() target_link_libraries(LIE PUBLIC ProcessLib) include(HydroMechanics/Tests.cmake) diff --git a/ProcessLib/LiquidFlow/CMakeLists.txt b/ProcessLib/LiquidFlow/CMakeLists.txt index 9324f6ac3968d233646c5020e1baacb953a77261..b6a430d96d2d33749bff5253cadea6ad9b9c9ea8 100644 --- a/ProcessLib/LiquidFlow/CMakeLists.txt +++ b/ProcessLib/LiquidFlow/CMakeLists.txt @@ -1,6 +1,9 @@ APPEND_SOURCE_FILES(SOURCES) add_library(LiquidFlow ${SOURCES}) +if(BUILD_SHARED_LIBS) + install(TARGETS LiquidFlow LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) +endif() target_link_libraries(LiquidFlow PUBLIC ProcessLib) include(Tests.cmake) diff --git a/ProcessLib/PhaseField/CMakeLists.txt b/ProcessLib/PhaseField/CMakeLists.txt index 6a541ed532b9c8effa95aaa7e48b0aecd7578807..d3575e49e7e03d07dbc2ba61dc9df7d102ade163 100644 --- a/ProcessLib/PhaseField/CMakeLists.txt +++ b/ProcessLib/PhaseField/CMakeLists.txt @@ -1,6 +1,9 @@ APPEND_SOURCE_FILES(SOURCES) add_library(PhaseField ${SOURCES}) +if(BUILD_SHARED_LIBS) + install(TARGETS PhaseField LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) +endif() target_link_libraries(PhaseField PUBLIC ProcessLib) include(Tests.cmake) diff --git a/ProcessLib/RichardsComponentTransport/CMakeLists.txt b/ProcessLib/RichardsComponentTransport/CMakeLists.txt index 8a8a9ec2f7387119efc9f9afd565cc67773b16b0..1ea94214a510b4a1be06bad769b1ee74507807ea 100644 --- a/ProcessLib/RichardsComponentTransport/CMakeLists.txt +++ b/ProcessLib/RichardsComponentTransport/CMakeLists.txt @@ -1,6 +1,9 @@ APPEND_SOURCE_FILES(SOURCES) add_library(RichardsComponentTransport ${SOURCES}) +if(BUILD_SHARED_LIBS) + install(TARGETS RichardsComponentTransport LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) +endif() target_link_libraries(RichardsComponentTransport PUBLIC ProcessLib) include(Tests.cmake) diff --git a/ProcessLib/RichardsFlow/CMakeLists.txt b/ProcessLib/RichardsFlow/CMakeLists.txt index b7647cf90fff76a1564890a9895321886a3a1022..ce0770b754636661f24682070520a97fa363b77f 100644 --- a/ProcessLib/RichardsFlow/CMakeLists.txt +++ b/ProcessLib/RichardsFlow/CMakeLists.txt @@ -1,6 +1,9 @@ APPEND_SOURCE_FILES(SOURCES) add_library(RichardsFlow ${SOURCES}) +if(BUILD_SHARED_LIBS) + install(TARGETS RichardsFlow LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) +endif() target_link_libraries(RichardsFlow PUBLIC ProcessLib) include(Tests.cmake) diff --git a/ProcessLib/RichardsMechanics/CMakeLists.txt b/ProcessLib/RichardsMechanics/CMakeLists.txt index 6e124260816ec97a648421768a994c4f1226521e..6886684b525c2b643810403c4e5acfffa9e027f3 100644 --- a/ProcessLib/RichardsMechanics/CMakeLists.txt +++ b/ProcessLib/RichardsMechanics/CMakeLists.txt @@ -1,6 +1,9 @@ APPEND_SOURCE_FILES(SOURCES) add_library(RichardsMechanics ${SOURCES}) +if(BUILD_SHARED_LIBS) + install(TARGETS RichardsMechanics LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) +endif() target_link_libraries(RichardsMechanics PUBLIC ProcessLib RichardsFlow) include(Tests.cmake) diff --git a/ProcessLib/SmallDeformation/CMakeLists.txt b/ProcessLib/SmallDeformation/CMakeLists.txt index 341d2ebe76bcb28a0ba5d6e2525b4238037dfad3..a2fee7f8872cba77dc5c3db006a557e3efaaf2a9 100644 --- a/ProcessLib/SmallDeformation/CMakeLists.txt +++ b/ProcessLib/SmallDeformation/CMakeLists.txt @@ -1,6 +1,9 @@ APPEND_SOURCE_FILES(SOURCES) add_library(SmallDeformation ${SOURCES}) +if(BUILD_SHARED_LIBS) + install(TARGETS SmallDeformation LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) +endif() target_link_libraries(SmallDeformation PUBLIC ProcessLib) include(Tests.cmake) diff --git a/ProcessLib/TES/CMakeLists.txt b/ProcessLib/TES/CMakeLists.txt index 1a80afc2301c369c5da58add44c738f9c4a81bba..d1632b690167d971df4d44c2c2755564a2ab22cc 100644 --- a/ProcessLib/TES/CMakeLists.txt +++ b/ProcessLib/TES/CMakeLists.txt @@ -1,6 +1,9 @@ APPEND_SOURCE_FILES(SOURCES) add_library(TES ${SOURCES}) +if(BUILD_SHARED_LIBS) + install(TARGETS TES LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) +endif() target_link_libraries(TES PUBLIC ProcessLib) include(Tests.cmake) diff --git a/ProcessLib/ThermalTwoPhaseFlowWithPP/CMakeLists.txt b/ProcessLib/ThermalTwoPhaseFlowWithPP/CMakeLists.txt index 141baacb34495aa9cfe60f12be64f48c24d9f3bd..3c5d458490fd6540cd08afc62c61d8c5c6350b30 100644 --- a/ProcessLib/ThermalTwoPhaseFlowWithPP/CMakeLists.txt +++ b/ProcessLib/ThermalTwoPhaseFlowWithPP/CMakeLists.txt @@ -1,6 +1,9 @@ APPEND_SOURCE_FILES(SOURCES) add_library(ThermalTwoPhaseFlowWithPP ${SOURCES}) +if(BUILD_SHARED_LIBS) + install(TARGETS ThermalTwoPhaseFlowWithPP LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) +endif() target_link_libraries(ThermalTwoPhaseFlowWithPP PUBLIC ProcessLib) include(Tests.cmake) diff --git a/ProcessLib/ThermoMechanicalPhaseField/CMakeLists.txt b/ProcessLib/ThermoMechanicalPhaseField/CMakeLists.txt index 48a52b712d146c97171ed7a39ba0be9d1c49b969..d13bd372521a1cd80b1562b4ca2ef186a97cf59b 100644 --- a/ProcessLib/ThermoMechanicalPhaseField/CMakeLists.txt +++ b/ProcessLib/ThermoMechanicalPhaseField/CMakeLists.txt @@ -1,6 +1,9 @@ APPEND_SOURCE_FILES(SOURCES) add_library(ThermoMechanicalPhaseField ${SOURCES}) +if(BUILD_SHARED_LIBS) + install(TARGETS ThermoMechanicalPhaseField LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) +endif() target_link_libraries(ThermoMechanicalPhaseField PUBLIC ProcessLib) include(Tests.cmake) diff --git a/ProcessLib/ThermoMechanics/CMakeLists.txt b/ProcessLib/ThermoMechanics/CMakeLists.txt index 3d6de7a861c2ef241da4b3909ef487afbcdd4317..7368f6f8d2e09f33211fdc24f195f567049c0e95 100644 --- a/ProcessLib/ThermoMechanics/CMakeLists.txt +++ b/ProcessLib/ThermoMechanics/CMakeLists.txt @@ -1,6 +1,9 @@ APPEND_SOURCE_FILES(SOURCES) add_library(ThermoMechanics ${SOURCES}) +if(BUILD_SHARED_LIBS) + install(TARGETS ThermoMechanics LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) +endif() target_link_libraries(ThermoMechanics PUBLIC ProcessLib) include(Tests.cmake) diff --git a/ProcessLib/TwoPhaseFlowWithPP/CMakeLists.txt b/ProcessLib/TwoPhaseFlowWithPP/CMakeLists.txt index 1a186fc256b2915b1edd11010fc25a258ee59042..5b194400ac17e0cda531ce73db8b424c77ee175e 100644 --- a/ProcessLib/TwoPhaseFlowWithPP/CMakeLists.txt +++ b/ProcessLib/TwoPhaseFlowWithPP/CMakeLists.txt @@ -1,6 +1,9 @@ APPEND_SOURCE_FILES(SOURCES) add_library(TwoPhaseFlowWithPP ${SOURCES}) +if(BUILD_SHARED_LIBS) + install(TARGETS TwoPhaseFlowWithPP LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) +endif() target_link_libraries(TwoPhaseFlowWithPP PUBLIC ProcessLib) include(Tests.cmake) diff --git a/ProcessLib/TwoPhaseFlowWithPrho/CMakeLists.txt b/ProcessLib/TwoPhaseFlowWithPrho/CMakeLists.txt index cc04858fe350127b814597e8f24afbc4b992704e..0574fb24517a72c4a6f5883d311bd99062d08d62 100644 --- a/ProcessLib/TwoPhaseFlowWithPrho/CMakeLists.txt +++ b/ProcessLib/TwoPhaseFlowWithPrho/CMakeLists.txt @@ -1,6 +1,9 @@ APPEND_SOURCE_FILES(SOURCES) add_library(TwoPhaseFlowWithPrho ${SOURCES}) +if(BUILD_SHARED_LIBS) + install(TARGETS TwoPhaseFlowWithPrho LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) +endif() target_link_libraries(TwoPhaseFlowWithPrho PUBLIC ProcessLib) include(Tests.cmake) diff --git a/ThirdParty/logog/CMakeLists.txt b/ThirdParty/logog/CMakeLists.txt index 3b244eda44ebda60b58e851ac562db7fdf7cd4c1..bfdf3f09fb9a8605fa28354a8065d4ca34dd8dc1 100644 --- a/ThirdParty/logog/CMakeLists.txt +++ b/ThirdParty/logog/CMakeLists.txt @@ -53,5 +53,9 @@ if (CMAKE_PROJECT_NAME STREQUAL logog) add_custom_target (logog-doc ${DOXYGEN_EXECUTABLE} ${CMAKE_SOURCE_DIR}/doxyfile WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} COMMENT "Generating source code documentation with Doxygen." VERBATIM) - endif() # DOXYGEN_FOUND + endif() # DOXYGEN_FOUND +else() + if(BUILD_SHARED_LIBS) + install(TARGETS logog LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) + endif() endif () # CMAKE_PROJECT_NAME = logog diff --git a/scripts/cmake/MetisSetup.cmake b/scripts/cmake/MetisSetup.cmake index 9e2ea36a94e143ac80fc8e50edd9519da232dafb..41677c5243d0dd9e20430e476f8c425b6e33ec64 100644 --- a/scripts/cmake/MetisSetup.cmake +++ b/scripts/cmake/MetisSetup.cmake @@ -23,6 +23,9 @@ include_directories(BEFORE ${METIS_PATH}/libmetis) file(GLOB metis_sources ${METIS_PATH}/libmetis/*.c) # Build libmetis. add_library(metis ${GKlib_sources} ${metis_sources}) +if(BUILD_SHARED_LIBS) + install(TARGETS metis LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) +endif() if(UNIX) target_link_libraries(metis m)