]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Switching back to qt 4.8.4. Do not forget to fetch the qt product from \\slotex
authorsbh <sergey.belash@opencascade.com>
Wed, 9 Apr 2014 13:48:43 +0000 (17:48 +0400)
committersbh <sergey.belash@opencascade.com>
Wed, 9 Apr 2014 13:48:43 +0000 (17:48 +0400)
CMakeCommon/FindQt.cmake [new file with mode: 0644]
CMakeCommon/FindQt5.cmake [deleted file]
CMakeLists.txt
env.bat
src/ModuleBase/CMakeLists.txt
src/PartSet/CMakeLists.txt
src/PyConsole/CMakeLists.txt
src/PyEvent/CMakeLists.txt
src/PyInterp/CMakeLists.txt
src/XGUI/CMakeLists.txt
src/XGUI/XGUI_ViewPort.cpp

diff --git a/CMakeCommon/FindQt.cmake b/CMakeCommon/FindQt.cmake
new file mode 100644 (file)
index 0000000..7c6d8c6
--- /dev/null
@@ -0,0 +1,29 @@
+CMAKE_MINIMUM_REQUIRED(VERSION 2.8.11)
+
+IF(WIN32)
+    SET(Q_WS_WIN ON)
+    SET(QT_USE_QTMAIN ON)
+ELSE()
+    SET(Q_WS_X11 ON)
+ENDIF()
+
+# Widgets finds its own dependencies (QtGui and QtCore).
+FIND_PACKAGE(Qt4 REQUIRED)
+
+IF(Qt4_FOUND)
+    SET(QT_VERSION_STRING "${QT_VERSION_MAJOR}.${QT_VERSION_MINOR}.${QT_VERSION_PATCH}")
+       MESSAGE(STATUS "Found Qt version: "  ${QT_VERSION_STRING})
+ENDIF()
+
+INCLUDE(${QT_USE_FILE})
+
+# The Qt5Widgets_INCLUDES also includes the include directories for
+# dependencies QtCore and QtGui
+INCLUDE_DIRECTORIES(${QT_INCLUDES})
+
+# We need add -DQT_WIDGETS_LIB when using QtWidgets in Qt 5.
+ADD_DEFINITIONS(${QT_DEFINITIONS})
+
+# Executables fail to build with Qt 5 in the default configuration
+# without -fPIE. We add that here.
+#SET(CMAKE_CXX_FLAGS "${Qt5Widgets_EXECUTABLE_COMPILE_FLAGS}")
\ No newline at end of file
diff --git a/CMakeCommon/FindQt5.cmake b/CMakeCommon/FindQt5.cmake
deleted file mode 100644 (file)
index bed3180..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-CMAKE_MINIMUM_REQUIRED(VERSION 2.8.11)
-#Append Qt5's install prefix into CMAKE_MODULE_PATH
-SET(CMAKE_MODULE_PATH "$ENV{QTDIR}" ${CMAKE_MODULE_PATH})
-
-# Widgets finds its own dependencies (QtGui and QtCore).
-FIND_PACKAGE(Qt5Widgets REQUIRED)
-FIND_PACKAGE(Qt5LinguistTools REQUIRED)
-
-IF(Qt5Widgets_FOUND)
-       MESSAGE(STATUS "Found Qt version:" ${Qt5Widgets_VERSION_STRING})
-ENDIF()
-
-# The Qt5Widgets_INCLUDES also includes the include directories for
-# dependencies QtCore and QtGui
-INCLUDE_DIRECTORIES(${Qt5Widgets_INCLUDES})
-
-# We need add -DQT_WIDGETS_LIB when using QtWidgets in Qt 5.
-ADD_DEFINITIONS(${Qt5Widgets_DEFINITIONS})
-
-# Executables fail to build with Qt 5 in the default configuration
-# without -fPIE. We add that here.
-SET(CMAKE_CXX_FLAGS "${Qt5Widgets_EXECUTABLE_COMPILE_FLAGS}")
index 29ee4ab93208cac3be39df2f7ad0bffd776b1a80..5639cfb13f32f8caafa0218bc577a5eb96d3976c 100644 (file)
@@ -5,7 +5,7 @@ PROJECT (NewGEOM)
 SET(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/CMakeCommon" ${CMAKE_MODULE_PATH})
 
 INCLUDE(Common)
-INCLUDE(FindQt5)
+INCLUDE(FindQt)
 INCLUDE(FindPython)
 
 ADD_SUBDIRECTORY (src/Config)
diff --git a/env.bat b/env.bat
index 2ac0c4d6a685e1a6d69953c5456419257ab16cce..9affd542288c7b78953d11635ade00d14c46e8a1 100644 (file)
--- a/env.bat
+++ b/env.bat
@@ -81,10 +81,12 @@ set PATH=%CMAKEDIR%\bin;%PATH%
 
 @REM -------------------------
 @REM QT
-if "%QTDIR%" == "" (
-  @SET QTDIR=%PDIR%\Qt-5.2.0\5.2.0\msvc2010
-)
+@SET QTDIR=%PDIR%\qt-4.8.4
+@ECHO -- Creating qt.conf... 
+@ECHO [Paths] > %QTDIR%/bin/qt.conf
+@ECHO Prefix = %QTDIR:\=/% >> %QTDIR%/bin/qt.conf
 @SET PATH=%QTDIR%\bin;%PATH%
+
 @REM -------------------------
 
 @REM -------------------------
index 00adfbb5a4e1fb740c0beb78ff19f7b81c561c64..240c0da621f4d1d3a48a763abfa84fa08de6069a 100644 (file)
@@ -14,7 +14,7 @@ SET(PROJECT_SOURCES
 
 SET(PROJECT_LIBRARIES
     ModelAPI
-    ${Qt5Widgets_LIBRARIES}
+    ${QT_LIBRARIES}
 )
 
 SET(PROJECT_AUTOMOC 
index 0fc2e748b4e5e968e7f182b9a15ad1f0989f7826..337a75ad695739d6d14f2a1cd32494f9caa2d0c9 100644 (file)
@@ -23,15 +23,15 @@ SET(TEXT_RESOURCES
 SET(PROJECT_LIBRARIES
     ModuleBase
     Config
-    ${Qt5Widgets_LIBRARIES}
+    ${QT_LIBRARIES}
 )
 
 SET(PROJECT_AUTOMOC 
     ${CMAKE_CURRENT_BINARY_DIR}/PartSet_automoc.cpp
 )
 
-QT5_ADD_RESOURCES(PROJECT_COMPILED_RESOURCES ${PROJECT_RESOURCES})
-QT5_ADD_TRANSLATION(QM_RESOURCES ${TEXT_RESOURCES})
+QT4_ADD_RESOURCES(PROJECT_COMPILED_RESOURCES ${PROJECT_RESOURCES})
+QT4_ADD_TRANSLATION(QM_RESOURCES ${TEXT_RESOURCES})
 
 SOURCE_GROUP ("Generated Files" FILES ${PROJECT_AUTOMOC} ${PROJECT_COMPILED_RESOURCES} ${QM_RESOURCES})
 SOURCE_GROUP ("Resource Files" FILES ${TEXT_RESOURCES} ${PROJECT_RESOURCES})
index 5d8b5820e667762f39fad31c60badf251bd92cb6..b623b64cfea6fb467aab85ed75c8e94af6f3a039 100644 (file)
@@ -36,10 +36,10 @@ SET(PROJECT_SOURCES
 
 SET(PROJECT_LIBRARIES
        PyInterp
-       ${Qt5Widgets_LIBRARIES}
+       ${QT_LIBRARIES}
 )
 
-QT5_ADD_TRANSLATION(QM_RESOURCES ${TEXT_RESOURCES})
+QT4_ADD_TRANSLATION(QM_RESOURCES ${TEXT_RESOURCES})
 
 SOURCE_GROUP ("Generated Files" FILES ${PROJECT_AUTOMOC} ${QM_RESOURCES})
 
index 393b7977498ad1e8626afde68a4921f418c6fe1c..833c4616f6fba272fab8cc4098291b663128e8f4 100644 (file)
@@ -19,6 +19,6 @@ ADD_LIBRARY(PyEvent STATIC
        ${PROJECT_HEADERS} 
 )
 
-TARGET_LINK_LIBRARIES(PyEvent ${Qt5Widgets_LIBRARIES})
+TARGET_LINK_LIBRARIES(PyEvent ${QT_LIBRARIES})
 
 #INSTALL(TARGETS PyEvent DESTINATION bin)
index 09585ebb8c6520fb53d1f4babbd94e534db0ae68..d7f7a53d6c02ef6447d832582a118431db4a5aed 100644 (file)
@@ -25,7 +25,7 @@ SET(PROJECT_SOURCES
 
 SET(PROJECT_LIBRARIES
        PyEvent
-       ${Qt5Core_LIBRARIES}
+       ${QT_LIBRARIES}
 )
 
 SOURCE_GROUP ("Generated Files" FILES ${PROJECT_AUTOMOC})
index c91ec14515326358a55805e8e60e7918ad1c0deb..078e6aa4f5ac1f0e4bfddfeb7d33242a464eb0a3 100644 (file)
@@ -60,7 +60,8 @@ SET(PROJECT_LIBRARIES
        opengl32
     Event
     Config
-       ${Qt5Widgets_LIBRARIES}
+       ${QT_LIBRARIES}
+       ${QT_QTMAIN_LIBRARY}
        ${CAS_VIEWER}
        ${CAS_KERNEL}
        PyConsole
@@ -70,7 +71,7 @@ SET(PROJECT_LIBRARIES
        ModuleBase
 )
 
-QT5_ADD_RESOURCES(PROJECT_COMPILED_RESOURCES ${PROJECT_RESOURCES})
+QT4_ADD_RESOURCES(PROJECT_COMPILED_RESOURCES ${PROJECT_RESOURCES})
 #QT5_ADD_TRANSLATION(QM_RESOURCES ${TEXT_RESOURCES})
 
 #SOURCE_GROUP ("Generated Files" FILES ${PROJECT_AUTOMOC} ${PROJECT_COMPILED_RESOURCES} ${QM_RESOURCES})
@@ -93,7 +94,6 @@ ADD_EXECUTABLE(XGUI WIN32
        ${PROJECT_SOURCES} 
        ${PROJECT_HEADERS} 
        ${PROJECT_COMPILED_RESOURCES} 
-       ${TEXT_RESOURCES} 
 )
 
 ADD_DEPENDENCIES(XGUI ModelAPI)
index 5a8b5cb7c58d1b1b6eee6610bedc66711edcca1c..4398cabaa5d6c97c5f69ca0aacced541c6e19678 100644 (file)
@@ -14,7 +14,6 @@
 #include "XGUI_Viewer.h"
 #include "XGUI_Constants.h"
 
-#include <QGuiApplication>
 #include <QPaintEvent>
 #include <QPainter>
 #include <QFileInfo>