diff --git a/Applications/ApplicationsLib/CMakeLists.txt b/Applications/ApplicationsLib/CMakeLists.txt index 0b1b31de32b..98181bde224 100644 --- a/Applications/ApplicationsLib/CMakeLists.txt +++ b/Applications/ApplicationsLib/CMakeLists.txt @@ -12,13 +12,14 @@ target_link_libraries( GeoLib NumLib $<$,$>:VTK::ParallelMPI> + $<$>,$>:ogs_embedded_python> PRIVATE CMakeInfoLib MathLib MeshLib MeshGeoToolsLib MeshToolsLib - pybind11::pybind11 $<$:PkgConfig::PETSC> + pybind11::module ) if(OGS_BUILD_CLI OR OGS_BUILD_UTILS OR OGS_BUILD_TESTING) @@ -46,7 +47,6 @@ target_compile_definitions( # see https://pybind11.readthedocs.io/en/stable/faq.html#someclass-declared-with-greater-visibility-than-the-type-of-its-field-someclass-member-wattributes # ~~~ if(NOT OGS_BUILD_WHEEL AND OGS_BUILD_CLI) - target_link_libraries(ApplicationsLib PRIVATE ogs_embedded_python) set_target_properties( ApplicationsLib PROPERTIES CXX_VISIBILITY_PRESET hidden ) diff --git a/Applications/Utils/ModelPreparation/PartitionMesh/CMakeLists.txt b/Applications/Utils/ModelPreparation/PartitionMesh/CMakeLists.txt index 67a4ebe663c..1d70a87a482 100644 --- a/Applications/Utils/ModelPreparation/PartitionMesh/CMakeLists.txt +++ b/Applications/Utils/ModelPreparation/PartitionMesh/CMakeLists.txt @@ -5,7 +5,6 @@ if(OGS_USE_MPI) target_link_libraries( binaryToPVTU GitInfoLib - ProcessLib MeshLib MeshToolsLib tclap diff --git a/ProcessLib/BoundaryConditionAndSourceTerm/Python/CMakeLists.txt b/ProcessLib/BoundaryConditionAndSourceTerm/Python/CMakeLists.txt index cbbdf0142a1..2e7d9451dd6 100644 --- a/ProcessLib/BoundaryConditionAndSourceTerm/Python/CMakeLists.txt +++ b/ProcessLib/BoundaryConditionAndSourceTerm/Python/CMakeLists.txt @@ -33,25 +33,15 @@ target_compile_definitions( $<$:OGS_ENABLE_ELEMENT_PYRAMID> ) -# TODO there is an ugly cyclic dependency between ProcessLib and the Python BCs -# and STs. We need to include ProcessLib's build dir such that ProcessLib's -# export header, which is autogenerated by cmake in the build dir, can be found. -target_include_directories( - ProcessLibBoundaryConditionAndSourceTermPython - PRIVATE $ -) - target_link_libraries( ProcessLibBoundaryConditionAndSourceTermPython - PUBLIC BaseLib MathLib MeshLib NumLib - $,pybind11::module,pybind11::embed> + PUBLIC BaseLib MathLib MeshLib NumLib pybind11::module ) -if(BUILD_SHARED_LIBS AND (MSVC OR APPLE)) +if(BUILD_SHARED_LIBS AND MSVC) target_link_options( ProcessLibBoundaryConditionAndSourceTermPython PRIVATE - $<$:-undefined dynamic_lookup> - $<$:/FORCE:UNRESOLVED> + /FORCE:UNRESOLVED ) endif() diff --git a/ProcessLib/CMakeLists.txt b/ProcessLib/CMakeLists.txt index 976ea7649ab..e6a88815419 100644 --- a/ProcessLib/CMakeLists.txt +++ b/ProcessLib/CMakeLists.txt @@ -55,8 +55,8 @@ target_link_libraries( NumLib Boost::boost range-v3 - $<$:ProcessLibBoundaryConditionAndSourceTermPython> $<$:petsc> + ProcessLibBoundaryConditionAndSourceTermPython PRIVATE ParameterLib GitInfoLib $<$:InSituLib> ) diff --git a/ProcessLib/HeatTransportBHE/CMakeLists.txt b/ProcessLib/HeatTransportBHE/CMakeLists.txt index 7a8f77a9128..df8a09bb3a7 100644 --- a/ProcessLib/HeatTransportBHE/CMakeLists.txt +++ b/ProcessLib/HeatTransportBHE/CMakeLists.txt @@ -8,7 +8,7 @@ ogs_add_library(HeatTransportBHE ${SOURCES}) target_link_libraries( HeatTransportBHE PUBLIC ProcessLib PRIVATE ParameterLib - $<$:pybind11::pybind11> + $<$:pybind11::module> ) target_precompile_headers(HeatTransportBHE PRIVATE [["BaseLib/Error.h"]]