diff --git a/Applications/ApplicationsLib/CMakeLists.txt b/Applications/ApplicationsLib/CMakeLists.txt index da92d0680d80d716194fa1198484c2dd84db4605..49f077b1ff81be529b9e5c23960a553d4f02748d 100644 --- a/Applications/ApplicationsLib/CMakeLists.txt +++ b/Applications/ApplicationsLib/CMakeLists.txt @@ -3,10 +3,7 @@ get_source_files(SOURCES_APPLICATIONSLIB) set(LIB_SOURCES ${SOURCES_APPLICATIONSLIB}) # Library -add_library(ApplicationsLib ${LIB_SOURCES}) -if(BUILD_SHARED_LIBS) - install(TARGETS ApplicationsLib LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) -endif() +ogs_add_library(ApplicationsLib ${LIB_SOURCES}) target_link_libraries(ApplicationsLib PUBLIC BaseLib GeoLib NumLib Processes logog @@ -26,10 +23,6 @@ foreach(process ${ProcessesList}) endif() endforeach() -if(OGS_USE_PCH) - cotire(ApplicationsLib) -endif() - if(OGS_USE_PYTHON) target_link_libraries(ApplicationsLib PRIVATE pybind11::pybind11) endif() diff --git a/Applications/CLI/CMakeLists.txt b/Applications/CLI/CMakeLists.txt index 06eceb456d8915de28ff90d74b805f0343bec66b..89c02475ad622327de1b12d28ec0202d82243f84 100644 --- a/Applications/CLI/CMakeLists.txt +++ b/Applications/CLI/CMakeLists.txt @@ -33,7 +33,7 @@ if(OGS_USE_PYTHON) # appropriate message should be presented. The note is kept for the case # that the automatic detection does not work due to whatever reason. - add_library(ogs_embedded_python ogs_embedded_python.cpp) + ogs_add_library(ogs_embedded_python ogs_embedded_python.cpp) # Performance warning from # https://github.com/pybind/pybind11/blob/master/docs/compiling.rst: Since @@ -57,9 +57,6 @@ if(OGS_USE_PYTHON) # by the linker. target_compile_definitions(ogs_embedded_python PRIVATE OGS_BUILD_SHARED_LIBS) - install(TARGETS ogs_embedded_python - LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) - endif() endif() diff --git a/Applications/DataExplorer/Base/CMakeLists.txt b/Applications/DataExplorer/Base/CMakeLists.txt index 112e81c89b668f324f94449399f8aa5703c955b6..6a0843fb91f4b4f8e7f7f11e95a347027704b657 100644 --- a/Applications/DataExplorer/Base/CMakeLists.txt +++ b/Applications/DataExplorer/Base/CMakeLists.txt @@ -29,15 +29,8 @@ source_group("UI Files" REGULAR_EXPRESSION "\\w*\\.ui") source_group("Moc Files" REGULAR_EXPRESSION "moc_.*") # Create the library -add_library(QtBase ${SOURCES} ${HEADERS}) -if(BUILD_SHARED_LIBS) - install(TARGETS QtBase LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) -endif() +ogs_add_library(QtBase ${SOURCES} ${HEADERS}) target_link_libraries(QtBase Qt5::Widgets) set_property(TARGET QtBase PROPERTY FOLDER "DataExplorer") - -if(OGS_USE_PCH) - cotire(QtBase) -endif() diff --git a/Applications/DataExplorer/DataView/CMakeLists.txt b/Applications/DataExplorer/DataView/CMakeLists.txt index 216248285f4f03636ffcfbc68afedbeda4d6dda3..11b6e866ad8b74c3584f28a537b9aef3c8ee0eab 100644 --- a/Applications/DataExplorer/DataView/CMakeLists.txt +++ b/Applications/DataExplorer/DataView/CMakeLists.txt @@ -121,10 +121,7 @@ if(GEOTIFF_FOUND) include_directories(${GEOTIFF_INCLUDE_DIRS}) endif() # GEOTIFF_FOUND -add_library(QtDataView ${SOURCES} ${HEADERS} ${UIS}) -if(BUILD_SHARED_LIBS) - install(TARGETS QtDataView LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) -endif() +ogs_add_library(QtDataView ${SOURCES} ${HEADERS} ${UIS}) target_link_libraries(QtDataView PUBLIC GeoLib @@ -149,7 +146,3 @@ endif() # GEOTIFF_FOUND add_autogen_include(QtDataView) set_property(TARGET QtDataView PROPERTY FOLDER "DataExplorer") - -if(OGS_USE_PCH) - cotire(QtDataView) -endif() diff --git a/Applications/DataExplorer/DataView/DiagramView/CMakeLists.txt b/Applications/DataExplorer/DataView/DiagramView/CMakeLists.txt index 3da36416dcf351c121f4172cc3a70059d447dc05..96c1a84c45a68522800006986dbcbbc68c3bc59d 100644 --- a/Applications/DataExplorer/DataView/DiagramView/CMakeLists.txt +++ b/Applications/DataExplorer/DataView/DiagramView/CMakeLists.txt @@ -29,10 +29,7 @@ include_directories(${SOURCE_DIR_REL}/BaseLib file(GLOB_RECURSE UIS CONFIGURE_DEPENDS *.ui) source_group("UI Files" FILES ${UIS}) -add_library(QtDiagramView ${SOURCES} ${HEADERS} ${UIS}) -if(BUILD_SHARED_LIBS) - install(TARGETS QtDiagramView LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) -endif() +ogs_add_library(QtDiagramView ${SOURCES} ${HEADERS} ${UIS}) target_link_libraries(QtDiagramView PRIVATE BaseLib @@ -45,7 +42,3 @@ target_link_libraries(QtDiagramView add_autogen_include(QtDiagramView) set_property(TARGET QtDiagramView PROPERTY FOLDER "DataExplorer") - -if(OGS_USE_PCH) - cotire(QtDiagramView) -endif() diff --git a/Applications/DataExplorer/DataView/StratView/CMakeLists.txt b/Applications/DataExplorer/DataView/StratView/CMakeLists.txt index e88986209cab8d87195b0f9fb13ff5152d38490b..348af52b269827fc2accf914733d4ae43364cdc4 100644 --- a/Applications/DataExplorer/DataView/StratView/CMakeLists.txt +++ b/Applications/DataExplorer/DataView/StratView/CMakeLists.txt @@ -13,10 +13,7 @@ include_directories(${CMAKE_CURRENT_SOURCE_DIR} file(GLOB_RECURSE UI_FILES CONFIGURE_DEPENDS *.ui) source_group("UI Files" FILES ${UI_FILES}) -add_library(QtStratView ${SOURCES} ${HEADERS} ${UIS}) -if(BUILD_SHARED_LIBS) - install(TARGETS QtStratView LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) -endif() +ogs_add_library(QtStratView ${SOURCES} ${HEADERS} ${UIS}) target_link_libraries(QtStratView PRIVATE BaseLib @@ -27,7 +24,3 @@ target_link_libraries(QtStratView add_autogen_include(QtStratView) set_property(TARGET QtStratView PROPERTY FOLDER "DataExplorer") - -if(OGS_USE_PCH) - cotire(QtStratView) -endif() diff --git a/Applications/DataExplorer/NetCdfDialog/CMakeLists.txt b/Applications/DataExplorer/NetCdfDialog/CMakeLists.txt index b932c64fef14a009070edba23e897ab56239ba7b..79faf9ddb48ce57bbd89b3b1ea58e74bd0339e70 100644 --- a/Applications/DataExplorer/NetCdfDialog/CMakeLists.txt +++ b/Applications/DataExplorer/NetCdfDialog/CMakeLists.txt @@ -1,8 +1,4 @@ -add_library(NetCdfDialogLib NetCdfConfigureDialog.cpp NetCdfConfigureDialog.h) -if(BUILD_SHARED_LIBS) - install(TARGETS NetCdfConfigureDialog - LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) -endif() +ogs_add_library(NetCdfDialogLib NetCdfConfigureDialog.cpp NetCdfConfigureDialog.h) target_link_libraries(NetCdfDialogLib PUBLIC Qt5::Widgets ${NETCDF_LIBRARIES_CXX} diff --git a/Applications/DataExplorer/VtkVis/CMakeLists.txt b/Applications/DataExplorer/VtkVis/CMakeLists.txt index cb0841b1950dcbd653da029903ce3641afb1e2df..35580d426424094c010f787c2bd06e7c5039c647 100644 --- a/Applications/DataExplorer/VtkVis/CMakeLists.txt +++ b/Applications/DataExplorer/VtkVis/CMakeLists.txt @@ -119,10 +119,7 @@ include_directories(${CMAKE_CURRENT_SOURCE_DIR} ${GUI_SOURCE_DIR_REL}/DataView ${GUI_SOURCE_DIR_REL}/VtkModules/Qt) -add_library(VtkVis ${SOURCES} ${HEADERS} ${UIS}) -if(BUILD_SHARED_LIBS) - install(TARGETS VtkVis LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) -endif() +ogs_add_library(VtkVis ${SOURCES} ${HEADERS} ${UIS}) if(GEOTIFF_FOUND) include_directories(${GEOTIFF_INCLUDE_DIRS}) @@ -145,7 +142,3 @@ endif() set_property(TARGET VtkVis PROPERTY FOLDER "DataExplorer") add_autogen_include(VtkVis) - -if(OGS_USE_PCH) - cotire(VtkVis) -endif() diff --git a/Applications/DataHolderLib/CMakeLists.txt b/Applications/DataHolderLib/CMakeLists.txt index 40e7e38bd433a935a2063b0e0f12f04e5aafc2da..606d95218fd52ad88ebef6f397bb3cd84236127a 100644 --- a/Applications/DataHolderLib/CMakeLists.txt +++ b/Applications/DataHolderLib/CMakeLists.txt @@ -2,13 +2,6 @@ get_source_files(SOURCES_DataHolderLib) # Library -add_library(DataHolderLib ${SOURCES_DataHolderLib}) -if(BUILD_SHARED_LIBS) - install(TARGETS DataHolderLib LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) -endif() +ogs_add_library(DataHolderLib ${SOURCES_DataHolderLib}) target_link_libraries(DataHolderLib PUBLIC GeoLib MeshLib PRIVATE BaseLib logog) - -if(OGS_USE_PCH) - cotire(DataHolderLib) -endif() diff --git a/Applications/FileIO/CMakeLists.txt b/Applications/FileIO/CMakeLists.txt index d8fd5e927cd7af7e6733650968c870c73a8109b4..e20207a689756babee3646ea69b3207bf89c051f 100644 --- a/Applications/FileIO/CMakeLists.txt +++ b/Applications/FileIO/CMakeLists.txt @@ -23,11 +23,7 @@ endif() 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() +ogs_add_library(ApplicationsFileIO ${SOURCES}) target_link_libraries(ApplicationsFileIO PUBLIC BaseLib DataHolderLib @@ -49,10 +45,6 @@ if(OGS_BUILD_SWMM) target_link_libraries(ApplicationsFileIO PRIVATE SwmmInterface) endif() -if(OGS_USE_PCH) - cotire(ApplicationsFileIO) -endif() - configure_file(XmlIO/OpenGeoSysCND.xsd ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/OpenGeoSysCND.xsd COPYONLY) configure_file(XmlIO/OpenGeoSysNum.xsd diff --git a/Applications/InSituLib/CMakeLists.txt b/Applications/InSituLib/CMakeLists.txt index 3103fa1a1c2c9d4cdddae6942d5465679e761e6e..6502bb0fdf5ab4e04d5fb9a21ce07c5f1285d299 100644 --- a/Applications/InSituLib/CMakeLists.txt +++ b/Applications/InSituLib/CMakeLists.txt @@ -2,13 +2,6 @@ get_source_files(SOURCES) # Library -add_library(InSituLib ${SOURCES}) -if(BUILD_SHARED_LIBS) - install(TARGETS InSituLib LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) -endif() +ogs_add_library(InSituLib ${SOURCES}) target_link_libraries(PUBLIC BaseLib PRIVATE MeshLib) - -if(OGS_USE_PCH) - cotire(InSituLib) -endif() diff --git a/Applications/Utils/OGSFileConverter/CMakeLists.txt b/Applications/Utils/OGSFileConverter/CMakeLists.txt index 8fca073290d3b5def7a402eab5fbf3213e8a2ab1..e7ead14d3127f4d05e203cb687e733dedc0d7e32 100644 --- a/Applications/Utils/OGSFileConverter/CMakeLists.txt +++ b/Applications/Utils/OGSFileConverter/CMakeLists.txt @@ -1,12 +1,8 @@ -add_library(OGSFileConverterLib FileListDialog.h OGSFileConverter.h +ogs_add_library(OGSFileConverterLib FileListDialog.h OGSFileConverter.h FileListDialog.cpp OGSFileConverter.cpp) target_link_libraries(OGSFileConverterLib PUBLIC ApplicationsFileIO MathLib QtBase ${VTK_LIBRARIES} INTERFACE MeshLib) -if(BUILD_SHARED_LIBS) - install(TARGETS OGSFileConverterLib - LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) -endif() set_target_properties(OGSFileConverterLib PROPERTIES AUTOMOC TRUE AUTOUIC TRUE) @@ -20,8 +16,4 @@ add_autogen_include(OGSFileConverterLib) set_target_properties(OGSFileConverter OGSFileConverterLib PROPERTIES FOLDER "Utilities") -if(OGS_USE_PCH) - cotire(OGSFileConverterLib) -endif() - install(TARGETS OGSFileConverter RUNTIME DESTINATION bin COMPONENT Utilities) diff --git a/BaseLib/CMakeLists.txt b/BaseLib/CMakeLists.txt index 462833dcfdb0d94c2dc7ac0c49e8cf2642cf5b0b..390520d234a74081c506cc959b4b382fb42376d6 100644 --- a/BaseLib/CMakeLists.txt +++ b/BaseLib/CMakeLists.txt @@ -1,21 +1,12 @@ get_source_files(SOURCES) append_source_files(SOURCES IO) - append_source_files(SOURCES IO/XmlIO) - if(OGS_BUILD_GUI) append_source_files(SOURCES IO/XmlIO/Qt) endif() # 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) -target_include_directories(BaseLib PUBLIC ${CMAKE_CURRENT_BINARY_DIR}) +ogs_add_library(BaseLib ${SOURCES}) target_link_libraries(BaseLib PUBLIC logog Boost::boost) @@ -26,7 +17,3 @@ endif() if(OGS_BUILD_GUI) target_link_libraries(BaseLib PUBLIC Qt5::Xml Qt5::XmlPatterns) endif() - -if(OGS_USE_PCH) - cotire(BaseLib) -endif() diff --git a/ChemistryLib/CMakeLists.txt b/ChemistryLib/CMakeLists.txt index c4f43c333a9bfc03ae48d733b56511221f0fe260..c9461b3baf5d5ba82546619c79a1da8898b5fec5 100644 --- a/ChemistryLib/CMakeLists.txt +++ b/ChemistryLib/CMakeLists.txt @@ -5,10 +5,7 @@ append_source_files(SOURCES PhreeqcKernelData) append_source_files(SOURCES Common) # Create the library -add_library(ChemistryLib ${SOURCES}) -if(BUILD_SHARED_LIBS) - install(TARGETS ChemistryLib LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) -endif() +ogs_add_library(ChemistryLib ${SOURCES}) include(GenerateExportHeader) generate_export_header(ChemistryLib) @@ -16,7 +13,3 @@ generate_export_header(ChemistryLib) target_link_libraries(ChemistryLib PUBLIC iphreeqc PRIVATE NumLib) set_target_properties(ChemistryLib PROPERTIES CXX_STANDARD 14) - -if(OGS_USE_PCH) - cotire(ChemistryLib) -endif() diff --git a/GeoLib/CMakeLists.txt b/GeoLib/CMakeLists.txt index a3360c98fdddf2d5eb3d14cd733cd47997856739..d6118a16d65d19235b175101d982d910da32c201 100644 --- a/GeoLib/CMakeLists.txt +++ b/GeoLib/CMakeLists.txt @@ -10,10 +10,7 @@ if(OGS_BUILD_GUI) endif() # Create the library -add_library(GeoLib ${SOURCES}) -if(BUILD_SHARED_LIBS) - install(TARGETS GeoLib LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) -endif() +ogs_add_library(GeoLib ${SOURCES}) target_link_libraries(GeoLib PUBLIC BaseLib MathLib logog PRIVATE tet) @@ -21,10 +18,6 @@ if(OGS_BUILD_GUI) target_link_libraries(GeoLib PUBLIC Qt5::Xml Qt5::XmlPatterns) endif() -if(OGS_USE_PCH) - cotire(GeoLib) -endif() - configure_file(IO/XmlIO/OpenGeoSysGLI.xsd ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/OpenGeoSysGLI.xsd COPYONLY) configure_file(IO/XmlIO/OpenGeoSysSTN.xsd diff --git a/InfoLib/CMakeLists.txt b/InfoLib/CMakeLists.txt index 6b549876c4885dca1942af8bad8ac33652b7633c..8930756290fccaf263375b09c6e70f970509bd15 100644 --- a/InfoLib/CMakeLists.txt +++ b/InfoLib/CMakeLists.txt @@ -2,13 +2,8 @@ foreach(lib Git CMake Test) configure_file(${CMAKE_CURRENT_SOURCE_DIR}/${lib}Info.cpp.in ${CMAKE_CURRENT_BINARY_DIR}/${lib}Info.cpp @ONLY) - add_library(${lib}InfoLib ${CMAKE_CURRENT_BINARY_DIR}/${lib}Info.cpp + ogs_add_library(${lib}InfoLib ${CMAKE_CURRENT_BINARY_DIR}/${lib}Info.cpp ${lib}Info.h) - include(GenerateExportHeader) - generate_export_header(${lib}InfoLib) target_include_directories(${lib}InfoLib PUBLIC ${CMAKE_CURRENT_BINARY_DIR}) - if(BUILD_SHARED_LIBS) - install(TARGETS ${lib}InfoLib LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) - endif() endforeach(lib) diff --git a/MaterialLib/CMakeLists.txt b/MaterialLib/CMakeLists.txt index 3b1e47b060a26f7f23139743d003f4e2cc317d1d..69ba77725b8f775800327b4ac5c6083a3d7b6fcb 100644 --- a/MaterialLib/CMakeLists.txt +++ b/MaterialLib/CMakeLists.txt @@ -34,10 +34,7 @@ if(OGS_USE_MFRONT) add_subdirectory(SolidModels/MFront) endif() -add_library(MaterialLib ${SOURCES}) -if(BUILD_SHARED_LIBS) - install(TARGETS MaterialLib LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) -endif() +ogs_add_library(MaterialLib ${SOURCES}) include(GenerateExportHeader) generate_export_header(MaterialLib) @@ -48,7 +45,3 @@ target_link_libraries(MaterialLib PRIVATE MathLib MeshLib ParameterLib) if(OGS_USE_MFRONT) target_link_libraries(MaterialLib PUBLIC MaterialLib_SolidModels_MFront) endif() - -if(OGS_USE_PCH) - cotire(MaterialLib) -endif() diff --git a/MaterialLib/SolidModels/MFront/CMakeLists.txt b/MaterialLib/SolidModels/MFront/CMakeLists.txt index d197cc6c02354b5fef6d5731d3d2a54262b27f73..6facf3fc1416de3699a491ec8643f4b289a04838 100644 --- a/MaterialLib/SolidModels/MFront/CMakeLists.txt +++ b/MaterialLib/SolidModels/MFront/CMakeLists.txt @@ -2,12 +2,7 @@ set(SOURCES CreateMFront.cpp CreateMFront.h) list(APPEND SOURCES MFront.cpp MFront.h) -add_library(MaterialLib_SolidModels_MFront ${SOURCES}) - -if(BUILD_SHARED_LIBS) - install(TARGETS MaterialLib_SolidModels_MFront - LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) -endif() +ogs_add_library(MaterialLib_SolidModels_MFront ${SOURCES}) target_link_libraries(MaterialLib_SolidModels_MFront PUBLIC BaseLib NumLib logog OgsMFrontBehaviour diff --git a/MathLib/CMakeLists.txt b/MathLib/CMakeLists.txt index 4b1030bcd5ee7097f830e2ee7a54e17a771756a6..a27d9fa6cee26f681b9f884bf57e282e617cef4f 100644 --- a/MathLib/CMakeLists.txt +++ b/MathLib/CMakeLists.txt @@ -25,13 +25,7 @@ if(OGS_USE_PETSC) 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) +ogs_add_library(MathLib ${SOURCES}) target_include_directories(MathLib PUBLIC ${CMAKE_CURRENT_BINARY_DIR}) set_target_properties(MathLib PROPERTIES LINKER_LANGUAGE CXX) @@ -59,7 +53,3 @@ if(OGS_USE_PETSC) target_include_directories(MathLib PUBLIC ${PETSC_INCLUDE_DIRS}) target_link_libraries(MathLib PUBLIC ${PETSC_LIBRARIES}) endif() - -if(OGS_USE_PCH) - cotire(MathLib) -endif() diff --git a/MeshGeoToolsLib/CMakeLists.txt b/MeshGeoToolsLib/CMakeLists.txt index 8a6ea49d716e8d158887d488f3d19923ecf23137..4bafd9791befbbb8650795751bc0ea556e585e60 100644 --- a/MeshGeoToolsLib/CMakeLists.txt +++ b/MeshGeoToolsLib/CMakeLists.txt @@ -2,15 +2,8 @@ get_source_files(SOURCES) # Create the library -add_library(MeshGeoToolsLib ${SOURCES}) -if(BUILD_SHARED_LIBS) - install(TARGETS MeshGeoToolsLib LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) -endif() +ogs_add_library(MeshGeoToolsLib ${SOURCES}) target_link_libraries(MeshGeoToolsLib PUBLIC GeoLib MathLib PRIVATE BaseLib MeshLib logog) - -if(OGS_USE_PCH) - cotire(MeshGeoToolsLib) -endif() diff --git a/MeshLib/CMakeLists.txt b/MeshLib/CMakeLists.txt index e92236424e017d68d213fadb0685e309f15ccc1a..b739688c335effc0e826fbbc0b3780e660372115 100644 --- a/MeshLib/CMakeLists.txt +++ b/MeshLib/CMakeLists.txt @@ -21,13 +21,7 @@ if(OGS_USE_PETSC) 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() +ogs_add_library(MeshLib ${SOURCES}) target_link_libraries(MeshLib PUBLIC BaseLib diff --git a/NumLib/CMakeLists.txt b/NumLib/CMakeLists.txt index 7c744d1536b16a19e91e42de824cb7b34969bf68..7d66a36d90b55d3679a199c82e7254bf6840a74b 100644 --- a/NumLib/CMakeLists.txt +++ b/NumLib/CMakeLists.txt @@ -14,12 +14,7 @@ append_source_files(SOURCES ODESolver) 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) +ogs_add_library(NumLib ${SOURCES}) target_include_directories(NumLib PUBLIC ${CMAKE_CURRENT_BINARY_DIR}) set_target_properties(NumLib PROPERTIES LINKER_LANGUAGE CXX) @@ -31,7 +26,3 @@ target_link_libraries(NumLib MeshLib logog PRIVATE MeshGeoToolsLib) - -if(OGS_USE_PCH) - cotire(NumLib) -endif() diff --git a/ParameterLib/CMakeLists.txt b/ParameterLib/CMakeLists.txt index b13a5dd19c45facd778a5fd0a0e8450734938ee5..9c54b8e304b8befc474740f1ef53a85c01f3ee0f 100644 --- a/ParameterLib/CMakeLists.txt +++ b/ParameterLib/CMakeLists.txt @@ -1,17 +1,10 @@ # Source files get_source_files(SOURCES) -add_library(ParameterLib ${SOURCES}) -if(BUILD_SHARED_LIBS) - install(TARGETS ParameterLib LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) -endif() +ogs_add_library(ParameterLib ${SOURCES}) include(GenerateExportHeader) generate_export_header(ParameterLib) target_include_directories(ParameterLib PUBLIC ${CMAKE_CURRENT_BINARY_DIR}) target_link_libraries(ParameterLib PUBLIC MathLib PRIVATE BaseLib MeshLib) - -if(OGS_USE_PCH) - cotire(ParameterLib) -endif() diff --git a/ProcessLib/BoundaryCondition/Python/CMakeLists.txt b/ProcessLib/BoundaryCondition/Python/CMakeLists.txt index 2c3615ed9b32551ad05f29f057946c5db89c1812..caa5e62b1ea353a0499918e500d4af800ac0ed06 100644 --- a/ProcessLib/BoundaryCondition/Python/CMakeLists.txt +++ b/ProcessLib/BoundaryCondition/Python/CMakeLists.txt @@ -1,14 +1,10 @@ -add_library(ProcessLibBoundaryConditionPython +ogs_add_library(ProcessLibBoundaryConditionPython PythonBoundaryCondition.cpp PythonBoundaryCondition.h PythonBoundaryConditionLocalAssembler.h PythonBoundaryConditionPythonSideInterface.h BHEInflowPythonBoundaryCondition.h BHEInflowPythonBoundaryConditionPythonSideInterface.h) -if(BUILD_SHARED_LIBS) - install(TARGETS ProcessLibBoundaryConditionPython - LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) -endif() target_compile_definitions(ProcessLibBoundaryConditionPython PUBLIC OGS_USE_PYTHON) @@ -23,14 +19,10 @@ target_link_libraries(ProcessLibBoundaryConditionPython PRIVATE pybind11::pybind11) # For the embedded Python module -add_library(ProcessLibBoundaryConditionPythonModule +ogs_add_library(ProcessLibBoundaryConditionPythonModule PythonBoundaryConditionModule.cpp PythonBoundaryConditionModule.h BHEInflowPythonBoundaryConditionModule.cpp BHEInflowPythonBoundaryConditionModule.h) -if(BUILD_SHARED_LIBS) - install(TARGETS ProcessLibBoundaryConditionPythonModule - LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) -endif() target_link_libraries(ProcessLibBoundaryConditionPythonModule PUBLIC ProcessLibBoundaryConditionPython diff --git a/ProcessLib/CMakeLists.txt b/ProcessLib/CMakeLists.txt index 59708f4d487cd82787e324acbe108b12a7a7d9a5..ce79822dcbe7593eab43921078a7b7a1a9f7b8e0 100644 --- a/ProcessLib/CMakeLists.txt +++ b/ProcessLib/CMakeLists.txt @@ -17,10 +17,7 @@ append_source_files(SOURCES Output) 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() +ogs_add_library(ProcessLib ${SOURCES}) target_link_libraries(ProcessLib PUBLIC BaseLib @@ -50,7 +47,3 @@ endif() if(OGS_INSITU) target_link_libraries(ProcessLib InSituLib) endif() - -if(OGS_USE_PCH) - cotire(ProcessLib) -endif() diff --git a/ProcessLib/ComponentTransport/CMakeLists.txt b/ProcessLib/ComponentTransport/CMakeLists.txt index a805d7787177a8ccfc133af8ad09c5d72375fd90..e7694fa42480426ba0a863c0d46695c58cdf298d 100644 --- a/ProcessLib/ComponentTransport/CMakeLists.txt +++ b/ProcessLib/ComponentTransport/CMakeLists.txt @@ -1,10 +1,6 @@ append_source_files(SOURCES) -add_library(ComponentTransport ${SOURCES}) -if(BUILD_SHARED_LIBS) - install(TARGETS ComponentTransport - LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) -endif() +ogs_add_library(ComponentTransport ${SOURCES}) target_link_libraries(ComponentTransport PUBLIC ProcessLib PRIVATE ParameterLib) diff --git a/ProcessLib/GroundwaterFlow/CMakeLists.txt b/ProcessLib/GroundwaterFlow/CMakeLists.txt index aa41559e83af01907e3a06d670e30ea317137e4d..ec13ffc725965b9eedfe4c4882a52a334ad132eb 100644 --- a/ProcessLib/GroundwaterFlow/CMakeLists.txt +++ b/ProcessLib/GroundwaterFlow/CMakeLists.txt @@ -1,9 +1,6 @@ append_source_files(SOURCES) -add_library(GroundwaterFlow ${SOURCES}) -if(BUILD_SHARED_LIBS) - install(TARGETS GroundwaterFlow LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) -endif() +ogs_add_library(GroundwaterFlow ${SOURCES}) target_link_libraries(GroundwaterFlow PUBLIC ProcessLib PRIVATE ParameterLib) diff --git a/ProcessLib/HT/CMakeLists.txt b/ProcessLib/HT/CMakeLists.txt index 17818b31a0f83bf131e6e2a49425c814f65d201c..dfc62fb7782c0e9b364a023a41e05ebf000e42dd 100644 --- a/ProcessLib/HT/CMakeLists.txt +++ b/ProcessLib/HT/CMakeLists.txt @@ -1,9 +1,6 @@ append_source_files(SOURCES) -add_library(HT ${SOURCES}) -if(BUILD_SHARED_LIBS) - install(TARGETS HT LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) -endif() +ogs_add_library(HT ${SOURCES}) target_link_libraries(HT PUBLIC ProcessLib PRIVATE ParameterLib) if(BUILD_TESTING) diff --git a/ProcessLib/HeatConduction/CMakeLists.txt b/ProcessLib/HeatConduction/CMakeLists.txt index 60321def8d2252fd482fd99e81c3c4aa6048bea3..0c405947a06ac7647ba897742040a2e77019cce2 100644 --- a/ProcessLib/HeatConduction/CMakeLists.txt +++ b/ProcessLib/HeatConduction/CMakeLists.txt @@ -1,9 +1,6 @@ append_source_files(SOURCES) -add_library(HeatConduction ${SOURCES}) -if(BUILD_SHARED_LIBS) - install(TARGETS HeatConduction LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) -endif() +ogs_add_library(HeatConduction ${SOURCES}) target_link_libraries(HeatConduction PUBLIC ProcessLib PRIVATE ParameterLib) if(BUILD_TESTING) diff --git a/ProcessLib/HeatTransportBHE/CMakeLists.txt b/ProcessLib/HeatTransportBHE/CMakeLists.txt index e7604af78b329fb8853c395dc97d8eefabddd187..29edec17081b822849fee787ecb17f87615b2f22 100644 --- a/ProcessLib/HeatTransportBHE/CMakeLists.txt +++ b/ProcessLib/HeatTransportBHE/CMakeLists.txt @@ -3,17 +3,13 @@ append_source_files(SOURCES BHE) append_source_files(SOURCES BoundaryConditions) append_source_files(SOURCES LocalAssemblers) -add_library(HeatTransportBHE ${SOURCES}) +ogs_add_library(HeatTransportBHE ${SOURCES}) target_link_libraries(HeatTransportBHE PUBLIC ProcessLib) if (OGS_USE_PYTHON) target_link_libraries(HeatTransportBHE PRIVATE pybind11::pybind11) endif() -if(BUILD_SHARED_LIBS) - install(TARGETS HeatTransportBHE - LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) -endif() target_link_libraries(HeatTransportBHE PUBLIC ProcessLib PRIVATE ParameterLib) if(BUILD_TESTING) diff --git a/ProcessLib/HydroMechanics/CMakeLists.txt b/ProcessLib/HydroMechanics/CMakeLists.txt index 7f4a35326264d1350ed086f00f63eb272d6a4c33..36b6d27a15fee83cb3d4e07ae57733ec4ab963d7 100644 --- a/ProcessLib/HydroMechanics/CMakeLists.txt +++ b/ProcessLib/HydroMechanics/CMakeLists.txt @@ -1,9 +1,6 @@ append_source_files(SOURCES) -add_library(HydroMechanics ${SOURCES}) -if(BUILD_SHARED_LIBS) - install(TARGETS HydroMechanics LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) -endif() +ogs_add_library(HydroMechanics ${SOURCES}) target_link_libraries(HydroMechanics PUBLIC ProcessLib PRIVATE ParameterLib) if(BUILD_TESTING) diff --git a/ProcessLib/LIE/CMakeLists.txt b/ProcessLib/LIE/CMakeLists.txt index 82d04ba4e4b39f32408e99748d6a56a6a949e8dd..da00cec0e52d776a3a6f9a1d8f9a7d27002ad324 100644 --- a/ProcessLib/LIE/CMakeLists.txt +++ b/ProcessLib/LIE/CMakeLists.txt @@ -4,10 +4,7 @@ append_source_files(SOURCES HydroMechanics/LocalAssembler) 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() +ogs_add_library(LIE ${SOURCES}) target_link_libraries(LIE PUBLIC ProcessLib LIECommon PRIVATE ParameterLib) if(BUILD_TESTING) diff --git a/ProcessLib/LIE/Common/CMakeLists.txt b/ProcessLib/LIE/Common/CMakeLists.txt index 807b396591c6f2474e380d1574cb20e52ff0ac08..67cba9650fa5d7aa3e470974322dcbdd96f4ec29 100644 --- a/ProcessLib/LIE/Common/CMakeLists.txt +++ b/ProcessLib/LIE/Common/CMakeLists.txt @@ -1,7 +1,4 @@ append_source_files(SOURCES) -add_library(LIECommon ${SOURCES}) -if(BUILD_SHARED_LIBS) - install(TARGETS LIECommon LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) -endif() +ogs_add_library(LIECommon ${SOURCES}) target_link_libraries(LIECommon PUBLIC MeshLib) diff --git a/ProcessLib/LiquidFlow/CMakeLists.txt b/ProcessLib/LiquidFlow/CMakeLists.txt index aff397040710cfc4ede9c4f003efc07ca88e2454..f3ef35b6ba888b021f6efc7c1bc389affd1e3113 100644 --- a/ProcessLib/LiquidFlow/CMakeLists.txt +++ b/ProcessLib/LiquidFlow/CMakeLists.txt @@ -1,9 +1,6 @@ append_source_files(SOURCES) -add_library(LiquidFlow ${SOURCES}) -if(BUILD_SHARED_LIBS) - install(TARGETS LiquidFlow LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) -endif() +ogs_add_library(LiquidFlow ${SOURCES}) target_link_libraries(LiquidFlow PUBLIC ProcessLib PRIVATE ParameterLib) if(BUILD_TESTING) diff --git a/ProcessLib/PhaseField/CMakeLists.txt b/ProcessLib/PhaseField/CMakeLists.txt index 310e2d432f75716d59ac65dcf3e4a57068562820..63b39f5e18be3a602f327319ba936be68e97901e 100644 --- a/ProcessLib/PhaseField/CMakeLists.txt +++ b/ProcessLib/PhaseField/CMakeLists.txt @@ -1,9 +1,6 @@ append_source_files(SOURCES) -add_library(PhaseField ${SOURCES}) -if(BUILD_SHARED_LIBS) - install(TARGETS PhaseField LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) -endif() +ogs_add_library(PhaseField ${SOURCES}) target_link_libraries(PhaseField PUBLIC ProcessLib PRIVATE ParameterLib) if(BUILD_TESTING) diff --git a/ProcessLib/RichardsComponentTransport/CMakeLists.txt b/ProcessLib/RichardsComponentTransport/CMakeLists.txt index 41de747e740c3a0b6f5eab07cb46f58333b91895..594c3d1a0411f3c6e51e136a75ed9a6d8e90df8a 100644 --- a/ProcessLib/RichardsComponentTransport/CMakeLists.txt +++ b/ProcessLib/RichardsComponentTransport/CMakeLists.txt @@ -1,10 +1,6 @@ append_source_files(SOURCES) -add_library(RichardsComponentTransport ${SOURCES}) -if(BUILD_SHARED_LIBS) - install(TARGETS RichardsComponentTransport - LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) -endif() +ogs_add_library(RichardsComponentTransport ${SOURCES}) target_link_libraries(RichardsComponentTransport PUBLIC ProcessLib PRIVATE ParameterLib) diff --git a/ProcessLib/RichardsFlow/CMakeLists.txt b/ProcessLib/RichardsFlow/CMakeLists.txt index e6f84adaf99cdcf5c5cfaaccef32355ddaef54fc..b474e6de3d7305b48bd772108faf0939ed37758a 100644 --- a/ProcessLib/RichardsFlow/CMakeLists.txt +++ b/ProcessLib/RichardsFlow/CMakeLists.txt @@ -1,9 +1,6 @@ append_source_files(SOURCES) -add_library(RichardsFlow ${SOURCES}) -if(BUILD_SHARED_LIBS) - install(TARGETS RichardsFlow LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) -endif() +ogs_add_library(RichardsFlow ${SOURCES}) target_link_libraries(RichardsFlow PUBLIC ProcessLib PRIVATE ParameterLib) if(BUILD_TESTING) diff --git a/ProcessLib/RichardsMechanics/CMakeLists.txt b/ProcessLib/RichardsMechanics/CMakeLists.txt index 15ca94b70dda3ae6dd4a9df253222fa6cfb877cc..2850a9a05aa9e596d3a5ab888eae12422a42c651 100644 --- a/ProcessLib/RichardsMechanics/CMakeLists.txt +++ b/ProcessLib/RichardsMechanics/CMakeLists.txt @@ -1,14 +1,7 @@ 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 - PRIVATE ParameterLib) +ogs_add_library(RichardsMechanics ${SOURCES}) +target_link_libraries(RichardsMechanics PUBLIC ProcessLib PRIVATE ParameterLib) if(BUILD_TESTING) include(Tests.cmake) diff --git a/ProcessLib/SmallDeformation/CMakeLists.txt b/ProcessLib/SmallDeformation/CMakeLists.txt index 062f9666e7904a406a4c0122ef310571111c9305..d8155b447a33940a544113902e467c5dcddcc956 100644 --- a/ProcessLib/SmallDeformation/CMakeLists.txt +++ b/ProcessLib/SmallDeformation/CMakeLists.txt @@ -1,10 +1,6 @@ append_source_files(SOURCES) -add_library(SmallDeformation ${SOURCES}) -if(BUILD_SHARED_LIBS) - install(TARGETS SmallDeformation - LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) -endif() +ogs_add_library(SmallDeformation ${SOURCES}) target_link_libraries(SmallDeformation PUBLIC ProcessLib PRIVATE ParameterLib) if(BUILD_TESTING) diff --git a/ProcessLib/SmallDeformationNonlocal/CMakeLists.txt b/ProcessLib/SmallDeformationNonlocal/CMakeLists.txt index 741858e8617ae2bf88fbfbf545ec9f33e1182e35..a00485ff530aaf4da290b077d9f7d87d67210af6 100644 --- a/ProcessLib/SmallDeformationNonlocal/CMakeLists.txt +++ b/ProcessLib/SmallDeformationNonlocal/CMakeLists.txt @@ -1,13 +1,9 @@ append_source_files(SOURCES) -add_library(SmallDeformationNonlocal ${SOURCES}) +ogs_add_library(SmallDeformationNonlocal ${SOURCES}) target_link_libraries(SmallDeformationNonlocal PUBLIC ProcessLib PRIVATE ParameterLib) -if(BUILD_SHARED_LIBS) - install(TARGETS SmallDeformationNonlocal - LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) -endif() if(BUILD_TESTING) include(Tests.cmake) diff --git a/ProcessLib/SourceTerms/Python/CMakeLists.txt b/ProcessLib/SourceTerms/Python/CMakeLists.txt index c5f55ad02084e0bcd9f0af69c8701e0c03e76d1c..0406ad087e4ef2451382a5eb08d39feb307d3ea0 100644 --- a/ProcessLib/SourceTerms/Python/CMakeLists.txt +++ b/ProcessLib/SourceTerms/Python/CMakeLists.txt @@ -1,14 +1,10 @@ -add_library(ProcessLibSourceTermPython - CreatePythonSourceTerm.cpp - CreatePythonSourceTerm.h - PythonSourceTerm.cpp - PythonSourceTerm.h - PythonSourceTermLocalAssembler.h - PythonSourceTermPythonSideInterface.h) -if(BUILD_SHARED_LIBS) - install(TARGETS ProcessLibSourceTermPython - LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) -endif() +ogs_add_library(ProcessLibSourceTermPython + CreatePythonSourceTerm.cpp + CreatePythonSourceTerm.h + PythonSourceTerm.cpp + PythonSourceTerm.h + PythonSourceTermLocalAssembler.h + PythonSourceTermPythonSideInterface.h) target_compile_definitions(ProcessLibSourceTermPython PUBLIC OGS_USE_PYTHON) @@ -22,12 +18,8 @@ target_link_libraries(ProcessLibSourceTermPython PRIVATE pybind11::pybind11) # For the embedded Python module -add_library(ProcessLibSourceTermPythonModule PythonSourceTermModule.cpp - PythonSourceTermModule.h) -if(BUILD_SHARED_LIBS) - install(TARGETS ProcessLibSourceTermPythonModule - LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) -endif() +ogs_add_library(ProcessLibSourceTermPythonModule PythonSourceTermModule.cpp + PythonSourceTermModule.h) target_link_libraries(ProcessLibSourceTermPythonModule PUBLIC ProcessLibSourceTermPython pybind11::pybind11) diff --git a/ProcessLib/SteadyStateDiffusion/CMakeLists.txt b/ProcessLib/SteadyStateDiffusion/CMakeLists.txt index 44edb0f9601c3a7be90fc038156db0da59519c1d..34202c747e8ce18efdd75eb5686c21663105f5ea 100644 --- a/ProcessLib/SteadyStateDiffusion/CMakeLists.txt +++ b/ProcessLib/SteadyStateDiffusion/CMakeLists.txt @@ -1,10 +1,8 @@ append_source_files(SOURCES) -add_library(SteadyStateDiffusion ${SOURCES}) -if(BUILD_SHARED_LIBS) - install(TARGETS SteadyStateDiffusion LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) -endif() +ogs_add_library(SteadyStateDiffusion ${SOURCES}) -target_link_libraries(SteadyStateDiffusion PUBLIC ProcessLib PRIVATE ParameterLib) +target_link_libraries(SteadyStateDiffusion PUBLIC ProcessLib + PRIVATE ParameterLib) include(Tests.cmake) diff --git a/ProcessLib/TES/CMakeLists.txt b/ProcessLib/TES/CMakeLists.txt index 6ed8040b8e0591d6102e48c9865efbda9cad91a8..94a321bb0d8ad9514036d4d475ad5719203db38d 100644 --- a/ProcessLib/TES/CMakeLists.txt +++ b/ProcessLib/TES/CMakeLists.txt @@ -1,9 +1,7 @@ append_source_files(SOURCES) -add_library(TES ${SOURCES}) -if(BUILD_SHARED_LIBS) - install(TARGETS TES LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) -endif() +ogs_add_library(TES ${SOURCES}) + target_link_libraries(TES PUBLIC ProcessLib PRIVATE ParameterLib) if(BUILD_TESTING) diff --git a/ProcessLib/ThermalTwoPhaseFlowWithPP/CMakeLists.txt b/ProcessLib/ThermalTwoPhaseFlowWithPP/CMakeLists.txt index 628c076042064981ab6b2ab7fdb932fbdb54d5be..ca66cf505c4f266de0aa293632808df5e1e9e25e 100644 --- a/ProcessLib/ThermalTwoPhaseFlowWithPP/CMakeLists.txt +++ b/ProcessLib/ThermalTwoPhaseFlowWithPP/CMakeLists.txt @@ -1,6 +1,6 @@ append_source_files(SOURCES) -add_library(ThermalTwoPhaseFlowWithPP ${SOURCES}) +ogs_add_library(ThermalTwoPhaseFlowWithPP ${SOURCES}) if(BUILD_SHARED_LIBS) install(TARGETS ThermalTwoPhaseFlowWithPP LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) diff --git a/ProcessLib/ThermoHydroMechanics/CMakeLists.txt b/ProcessLib/ThermoHydroMechanics/CMakeLists.txt index b6eb5a7873003ff9d4061f02a809763c62440185..f80f5b788eae83c027e53066a374a1aba984a557 100644 --- a/ProcessLib/ThermoHydroMechanics/CMakeLists.txt +++ b/ProcessLib/ThermoHydroMechanics/CMakeLists.txt @@ -1,10 +1,6 @@ append_source_files(SOURCES) -add_library(ThermoHydroMechanics ${SOURCES}) -if(BUILD_SHARED_LIBS) - install(TARGETS ThermoHydroMechanics - LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) -endif() +ogs_add_library(ThermoHydroMechanics ${SOURCES}) target_link_libraries(ThermoHydroMechanics PUBLIC ProcessLib PRIVATE ParameterLib) diff --git a/ProcessLib/ThermoMechanicalPhaseField/CMakeLists.txt b/ProcessLib/ThermoMechanicalPhaseField/CMakeLists.txt index 59571260b997b472f0aa795192e241c19456f5c8..d53db208ff362da862982b26bbfee0dac15dfede 100644 --- a/ProcessLib/ThermoMechanicalPhaseField/CMakeLists.txt +++ b/ProcessLib/ThermoMechanicalPhaseField/CMakeLists.txt @@ -1,10 +1,6 @@ append_source_files(SOURCES) -add_library(ThermoMechanicalPhaseField ${SOURCES}) -if(BUILD_SHARED_LIBS) - install(TARGETS ThermoMechanicalPhaseField - LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) -endif() +ogs_add_library(ThermoMechanicalPhaseField ${SOURCES}) target_link_libraries(ThermoMechanicalPhaseField PUBLIC ProcessLib PRIVATE ParameterLib) diff --git a/ProcessLib/ThermoMechanics/CMakeLists.txt b/ProcessLib/ThermoMechanics/CMakeLists.txt index 41c6f654eee080619ecfef0a6a891680de9565fc..7ecb35b34bc9fe1534299aca36a9bd10c80d4513 100644 --- a/ProcessLib/ThermoMechanics/CMakeLists.txt +++ b/ProcessLib/ThermoMechanics/CMakeLists.txt @@ -1,9 +1,6 @@ append_source_files(SOURCES) -add_library(ThermoMechanics ${SOURCES}) -if(BUILD_SHARED_LIBS) - install(TARGETS ThermoMechanics LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) -endif() +ogs_add_library(ThermoMechanics ${SOURCES}) target_link_libraries(ThermoMechanics PUBLIC ProcessLib PRIVATE ParameterLib) if(BUILD_TESTING) diff --git a/ProcessLib/TwoPhaseFlowWithPP/CMakeLists.txt b/ProcessLib/TwoPhaseFlowWithPP/CMakeLists.txt index 685c97cf1c5625e80b9d47efc928c913b4232727..62de80bb32c6f8640b2950e45fc53423d4cbd9b0 100644 --- a/ProcessLib/TwoPhaseFlowWithPP/CMakeLists.txt +++ b/ProcessLib/TwoPhaseFlowWithPP/CMakeLists.txt @@ -1,10 +1,6 @@ append_source_files(SOURCES) -add_library(TwoPhaseFlowWithPP ${SOURCES}) -if(BUILD_SHARED_LIBS) - install(TARGETS TwoPhaseFlowWithPP - LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) -endif() +ogs_add_library(TwoPhaseFlowWithPP ${SOURCES}) target_link_libraries(TwoPhaseFlowWithPP PUBLIC ProcessLib PRIVATE ParameterLib) if(BUILD_TESTING) diff --git a/ProcessLib/TwoPhaseFlowWithPrho/CMakeLists.txt b/ProcessLib/TwoPhaseFlowWithPrho/CMakeLists.txt index 3d0eb0ee3d217367a3d090667a088cc63044e03b..41ab460fc984fcac41157553fe64b05e689380b0 100644 --- a/ProcessLib/TwoPhaseFlowWithPrho/CMakeLists.txt +++ b/ProcessLib/TwoPhaseFlowWithPrho/CMakeLists.txt @@ -1,10 +1,6 @@ append_source_files(SOURCES) -add_library(TwoPhaseFlowWithPrho ${SOURCES}) -if(BUILD_SHARED_LIBS) - install(TARGETS TwoPhaseFlowWithPrho - LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) -endif() +ogs_add_library(TwoPhaseFlowWithPrho ${SOURCES}) target_link_libraries(TwoPhaseFlowWithPrho PUBLIC ProcessLib PRIVATE ParameterLib)