Message: Unable to use Qt 5 on Windows with examples enabled (geant4.10.01) Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Warning Unable to use Qt 5 on Windows with examples enabled (geant4.10.01) 

Forum: Installation and Configuration
Date: 24 Mar, 2015
From: Mojca Miklavec <Mojca Miklavec>

Hello,

I'm trying to build Geant 4.10.01 on Windows with nmake-based build using Visual Studio Express 2012.

I installed Qt 5.4.1 to a costum location and set CMAKE_PREFIX_PATH to path_to_qt/5.4/msvc2012_opengl/lib/cmake.

The configuration goes through if I don't try to build the examples, but if I turn building the examples on, it throws an error:

   Entering             C:/prog/geant4.10.01/examples
   Entering             C:/prog/geant4.10.01/examples/advanced
CMake Error at C:/Program Files (x86)/CMake/share/cmake-3.2/Modules/FindQt4.cmake:1326 (message):
  Found unsuitable Qt version "5.4.1" from
  C:/prog/Qt/5.4/msvc2012_opengl/bin/qmake.exe, this code requires Qt 4.x
Call Stack (most recent call first):
  C:/prog/geant4.10.01-build-nmake/Geant4Config.cmake:240 (find_package)
  examples/advanced/CMakeLists.txt:8 (find_package)

   Returning to         C:/prog/geant4.10.01/examples
   Returning to         C:/prog/geant4.10.01
Configuring incomplete, errors occurred!

The problem seems to be that Geant4Config.cmake in the build directory contains the following lines:

 #-----------------------------------------------------------------------
 # If we have used imported targets for any third party packages, reimport
 # them here, BEFORE we try and import the Geant4 targets which are
 # linked against them.
 # Generally, we try and use a standard find_package, but try and force it
 # to find the actual package we were built against.
 # THIS IS NOT PERFECT, AS IT CANNOT GUARANTEE A BINARY COMPATIBLE
 # PACKAGE IS FOUND.

 # Qt reimport on WIN32
 set(QT_QMAKE_EXECUTABLE C:/Programi/Qt/5.4/msvc2012_opengl/bin/qmake.exe)
 set(QT_USE_IMPORTED_TARGETS ON)
 find_package(Qt4 REQUIRED)

that have been hardcoded in Geant4BuildProjectConfig.cmake so find_package(Geant4) in examples/advanced/CMakeLists.txt fails. Is there any workaround?

Inline Depth:
 1 1
 All All
Outline Depth:
 1 1
 2 2
 All All
Add message: (add)

1 Note: Re: Unable to use Qt 5 on Windows with examples enabled (geant4.10.01)   (Mojca Miklavec - 24 Mar, 2015)
(_ None: Re: Unable to use Qt 5 on Windows with examples enabled (geant4.10.01)   (garnier - 26 Mar, 2015)
1 Feedback: Re: Unable to use Qt 5 on Windows with examples enabled (geant4.10.01)   (Mojca Miklavec - 26 Mar, 2015)
2 Question: Re: Unable to use Qt 5 on Windows with examples enabled (geant4.10.01)   (Mojca Miklavec - 27 Mar, 2015)
 Add Message Add Message
to: "Unable to use Qt 5 on Windows with examples enabled (geant4.10.01)"

 Subscribe Subscribe

This site runs SLAC HyperNews version 1.11-slac-98, derived from the original HyperNews


[ Geant 4 Home | Geant 4 HyperNews | Search | Request New Forum | Feedback ]