diff --git a/ProcessLib/BoundaryConditionAndSourceTerm/Python/CMakeLists.txt b/ProcessLib/BoundaryConditionAndSourceTerm/Python/CMakeLists.txt
index 00320b44c7c5f3ab6404a9059c81f671d38d4629..b26a03e1df43b3b5f5a7e1293b403d9b0cdf8daf 100644
--- a/ProcessLib/BoundaryConditionAndSourceTerm/Python/CMakeLists.txt
+++ b/ProcessLib/BoundaryConditionAndSourceTerm/Python/CMakeLists.txt
@@ -16,14 +16,15 @@ ogs_add_library(
 
 target_compile_definitions(
     ProcessLibBoundaryConditionAndSourceTermPython
-    PUBLIC OGS_USE_PYTHON
-           # Enabled elements
+    PUBLIC # Enabled elements
            OGS_MAX_ELEMENT_DIM=${OGS_MAX_ELEMENT_DIM}
            OGS_MAX_ELEMENT_ORDER=${OGS_MAX_ELEMENT_ORDER}
            $<$<BOOL:${OGS_ENABLE_ELEMENT_SIMPLEX}>:OGS_ENABLE_ELEMENT_SIMPLEX>
            $<$<BOOL:${OGS_ENABLE_ELEMENT_CUBOID}>:OGS_ENABLE_ELEMENT_CUBOID>
            $<$<BOOL:${OGS_ENABLE_ELEMENT_PRISM}>:OGS_ENABLE_ELEMENT_PRISM>
            $<$<BOOL:${OGS_ENABLE_ELEMENT_PYRAMID}>:OGS_ENABLE_ELEMENT_PYRAMID>
+    PRIVATE
+        OGS_USE_PYTHON
 )
 
 target_link_libraries(