From dda97c75bf6eeae5332b860b64a49a48a40278ae Mon Sep 17 00:00:00 2001
From: Shaun Roe <shaun.roe@cern.ch>
Date: Sun, 8 Jun 2025 06:22:14 +0000
Subject: [PATCH] Correct compilation

---
 GeoModelIO/GeoModelErrorHandler/CMakeLists.txt                | 2 +-
 GeoModelIO/GeoModelIOHelpers/GeoModelIOHelpers/GMIO.h         | 2 +-
 .../GeoModelRead/examples/hellogeo/CMakeLists.txt.example     | 4 ++--
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/GeoModelIO/GeoModelErrorHandler/CMakeLists.txt b/GeoModelIO/GeoModelErrorHandler/CMakeLists.txt
index 55b7f30dc..4450071eb 100644
--- a/GeoModelIO/GeoModelErrorHandler/CMakeLists.txt
+++ b/GeoModelIO/GeoModelErrorHandler/CMakeLists.txt
@@ -14,7 +14,7 @@ source_group( "GeoModelErrorHandler" FILES ${HEADERS} )
 target_include_directories( GeoModelErrorHandler INTERFACE
    $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
    $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}> )
-target_link_libraries( GeoModelErrorHandler INTERFACE Qt5::Core )
+target_link_libraries( GeoModelErrorHandler INTERFACE Qt${QT_VERSION}::Core )
 if( "${CMAKE_BUILD_TYPE}" STREQUAL "Release" OR
    "${CMAKE_BUILD_TYPE}" STREQUAL "RelWithDebInfo" )
    target_compile_definitions( GeoModelErrorHandler INTERFACE
diff --git a/GeoModelIO/GeoModelIOHelpers/GeoModelIOHelpers/GMIO.h b/GeoModelIO/GeoModelIOHelpers/GeoModelIOHelpers/GMIO.h
index 1e45dfeae..477577a56 100644
--- a/GeoModelIO/GeoModelIOHelpers/GeoModelIOHelpers/GMIO.h
+++ b/GeoModelIO/GeoModelIOHelpers/GeoModelIOHelpers/GMIO.h
@@ -79,7 +79,7 @@ class IO {
         return db;
     }
 
-    static PVConstlink loadDB(const std::string path, unsigned loglevel = 0) {
+    static PVConstLink loadDB(const std::string path, unsigned loglevel = 0) {
         // check if DB file exists. 
         // If not, print a warning message and return a nullptr.
         std::ifstream inputfile(path.c_str());
diff --git a/GeoModelIO/GeoModelRead/examples/hellogeo/CMakeLists.txt.example b/GeoModelIO/GeoModelRead/examples/hellogeo/CMakeLists.txt.example
index 1d831d3c8..982cceb0a 100644
--- a/GeoModelIO/GeoModelRead/examples/hellogeo/CMakeLists.txt.example
+++ b/GeoModelIO/GeoModelRead/examples/hellogeo/CMakeLists.txt.example
@@ -24,7 +24,7 @@ find_package( CLHEP ) # Remove this dependency: it is brough in by TFPersistific
 
 ### External Dependencies
 # Find the Qt5 libraries, used e.g. to interface with the SQlite DB
-find_package(Qt5 COMPONENTS Core Sql Widgets REQUIRED) # TODO: remove Qt dependency, which comes from GeoModelDBManager
+find_package(Qt${QT_VERSION} COMPONENTS Core Sql Widgets REQUIRED) # TODO: remove Qt dependency, which comes from GeoModelDBManager
 # Instruct CMake to run Qt5 moc automatically when needed
 set(CMAKE_AUTOMOC ON) # TODO: do we need this here??
 
@@ -36,7 +36,7 @@ set(SRCS main.cpp )
 add_executable( hellogeo ${SRCS} )
 
 # Link all needed libraries
-target_link_libraries( hellogeo Qt5::Core Qt5::Sql GeoModelDBManager GeoModelRead GeoModelKernel GeoModelUtilities)
+target_link_libraries( hellogeo Qt${QT_VERSION}::Core Qt${QT_VERSION}::Sql GeoModelDBManager GeoModelRead GeoModelKernel GeoModelUtilities)
 
 # Set include directories
 target_include_directories( hellogeo SYSTEM PUBLIC ${GeoModelRead_INCLUDE_DIRS} ${GeoModelUtilities_INCLUDE_DIRS} )
-- 
GitLab