diff --git a/FullSimLight/CMakeLists.txt b/FullSimLight/CMakeLists.txt
index bf9736748e1fb4082ac4fbcc739f1c31d1ef2464..a037d9a4455201d4c42bfc9d37207cba2449961f 100644
--- a/FullSimLight/CMakeLists.txt
+++ b/FullSimLight/CMakeLists.txt
@@ -17,9 +17,11 @@ if(CMAKE_SOURCE_DIR STREQUAL PROJECT_SOURCE_DIR)
     include( configure_cpp_options )
     set( CMAKE_FIND_FRAMEWORK "LAST" CACHE STRING
          "Framework finding behaviour on macOS" )
-    # Set up how the project handle some of its dependenices. Either by picking them
-    # up from the environment, or building them itself.
-    include( SetupJSON )
+    if( NOT TARGET JSONExt )
+        # Set up how the project handle some of its dependenices. Either by picking them
+        # up from the environment, or building them itself.
+        include( SetupJSON )
+    endif()
     # Find the base GeoModel packages, which must be installed on the target system already
     find_package( GeoModelCore REQUIRED 4.0.0 ) #TODO: the version should be se in the root folder
     find_package( GeoModelIO REQUIRED 4.0.0 ) #TODO: the version should be se in the root folder
diff --git a/GeoModelG4/CMakeLists.txt b/GeoModelG4/CMakeLists.txt
index 5e893592460fccb32f34c698fbb9fa1ffff0d7f3..c52ec63b4e8842a1d66e9274ccf6c58968553900 100644
--- a/GeoModelG4/CMakeLists.txt
+++ b/GeoModelG4/CMakeLists.txt
@@ -2,8 +2,8 @@
 cmake_minimum_required( VERSION 3.1 )
 project( "GeoModelG4" VERSION 1.1.0 LANGUAGES CXX )
 
-message("CMAKE_SOURCE_DIR: ${CMAKE_SOURCE_DIR}")
-message("PROJECT_SOURCE_DIR: ${PROJECT_SOURCE_DIR}")
+#message("CMAKE_SOURCE_DIR: ${CMAKE_SOURCE_DIR}") # debug msg
+#message("PROJECT_SOURCE_DIR: ${PROJECT_SOURCE_DIR}") # debug msg
 if( (CMAKE_SOURCE_DIR STREQUAL PROJECT_SOURCE_DIR) OR GEOMODEL_BUILD_GEOMODELG4 )
     # I am top-level project.
     # Make the root module directory visible to CMake.
@@ -16,9 +16,11 @@ if( (CMAKE_SOURCE_DIR STREQUAL PROJECT_SOURCE_DIR) OR GEOMODEL_BUILD_GEOMODELG4
     include( configure_cpp_options )
     set( CMAKE_FIND_FRAMEWORK "LAST" CACHE STRING
          "Framework finding behaviour on macOS" )
-    # Set up how the project handle some of its dependenices. Either by picking them
-    # up from the environment, or building them itself.^[[?12;4$y
-    include( SetupJSON )
+    if( NOT TARGET JSONExt )
+        # Set up how the project handle some of its dependenices. Either by picking them
+        # up from the environment, or building them itself.
+        include( SetupJSON )
+    endif()
     # Find the base GeoModel packages, which must be installed on the target system already
     find_package( GeoModelCore REQUIRED 4.0.0 ) #TODO: the version should be se in the root folder
     # Set a flag to steer the  of the subpackages
diff --git a/GeoModelVisualization/CMakeLists.txt b/GeoModelVisualization/CMakeLists.txt
index 52f5200f76f19a17f9e0d16c8b578737ef896c51..92888e94dcd323174c90fbd801fd5c8da58be830 100644
--- a/GeoModelVisualization/CMakeLists.txt
+++ b/GeoModelVisualization/CMakeLists.txt
@@ -19,9 +19,11 @@ if(CMAKE_SOURCE_DIR STREQUAL PROJECT_SOURCE_DIR)
     include( configure_cpp_options )
     set( CMAKE_FIND_FRAMEWORK "LAST" CACHE STRING
          "Framework finding behaviour on macOS" )
-    # Set up how the project handle some of its dependenices. Either by picking them
-    # up from the environment, or building them itself.
-    include( SetupJSON )
+    if( NOT TARGET JSONExt )
+        # Set up how the project handle some of its dependenices. Either by picking them
+        # up from the environment, or building them itself.
+        include( SetupJSON )
+    endif()
     # Find the base GeoModel packages, which must be installed on the target system already
     find_package( GeoModelCore REQUIRED 4.0.0 ) #TODO: the version should be se in the root folder
     find_package( GeoModelIO REQUIRED 4.0.0 ) #TODO: the version should be se in the root folder