From 4584cf6e8c314ded42d6f6df2435e13eeebc700d Mon Sep 17 00:00:00 2001 From: imn Date: Fri, 13 Nov 2015 12:00:17 +0300 Subject: [PATCH] Additional fix for previous commit --- CMakeLists.txt | 7 ++++++- tools/dlgfactory/CMakeLists.txt | 21 +++++++++++++++------ 2 files changed, 21 insertions(+), 7 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index db5f050ef..843bdd168 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -414,7 +414,12 @@ SET(QWT_ROOT_DIR "${QWT_ROOT_DIR}") SET(CONF_INCLUDE_DIRS "${PROJECT_SOURCE_DIR}/include" "${PROJECT_BINARY_DIR}/include") # Build variables that will be expanded when configuring SalomeConfig.cmake: -SALOME_CONFIGURE_PREPARE(CAS OpenGL PyQt5 Qt5 Qwt SIP VTK) +SALOME_CONFIGURE_PREPARE(CAS OpenGL Qwt SIP VTK) +IF(NOT SALOME_BUILD_WITH_QT5) + SALOME_CONFIGURE_PREPARE(PyQt4 Qt4) +ELSE() + SALOME_CONFIGURE_PREPARE(PyQt5 Qt5) +ENDIF() CONFIGURE_PACKAGE_CONFIG_FILE(${PROJECT_NAME}Config.cmake.in ${PROJECT_BINARY_DIR}/${PROJECT_NAME}Config.cmake diff --git a/tools/dlgfactory/CMakeLists.txt b/tools/dlgfactory/CMakeLists.txt index be4da2b34..83e6bd93d 100755 --- a/tools/dlgfactory/CMakeLists.txt +++ b/tools/dlgfactory/CMakeLists.txt @@ -66,16 +66,25 @@ ADD_CUSTOM_COMMAND( OUTPUT GDialogTest.cxx GDialogTest.h GDialogTest.ui COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/dlgfactory.py -s -n GDialogTest -t gdialog ) -QT5_WRAP_UI(qtester_FORMS_HEADERS ${qtester_FORMS} ) -QT5_WRAP_CPP(qtester_HEADERS_MOC ${qtester_HEADERS}) +IF (NOT SALOME_BUILD_WITH_QT5) + QT4_WRAP_UI(qtester_FORMS_HEADERS ${qtester_FORMS} ) + QT4_WRAP_CPP(qtester_HEADERS_MOC ${qtester_HEADERS}) + QT4_WRAP_UI(gtester_FORMS_HEADERS ${gtester_FORMS} ) + QT4_WRAP_CPP(gtester_HEADERS_MOC ${gtester_HEADERS}) -QT5_WRAP_UI(gtester_FORMS_HEADERS ${gtester_FORMS} ) -QT5_WRAP_CPP(gtester_HEADERS_MOC ${gtester_HEADERS}) + QT4_WRAP_UI(GenericDialog_FORMS_HEADERS ${GenericDialog_FORMS} ) + QT4_WRAP_CPP(GenericDialog_HEADERS_MOC ${GenericDialog_HEADERS}) +ELSE() + QT5_WRAP_UI(qtester_FORMS_HEADERS ${qtester_FORMS} ) + QT5_WRAP_CPP(qtester_HEADERS_MOC ${qtester_HEADERS}) -QT5_WRAP_UI(GenericDialog_FORMS_HEADERS ${GenericDialog_FORMS} ) -QT5_WRAP_CPP(GenericDialog_HEADERS_MOC ${GenericDialog_HEADERS}) + QT5_WRAP_UI(gtester_FORMS_HEADERS ${gtester_FORMS} ) + QT5_WRAP_CPP(gtester_HEADERS_MOC ${gtester_HEADERS}) + QT5_WRAP_UI(GenericDialog_FORMS_HEADERS ${GenericDialog_FORMS} ) + QT5_WRAP_CPP(GenericDialog_HEADERS_MOC ${GenericDialog_HEADERS}) +ENDIF() ADD_EXECUTABLE(qtester ${qtester_SOURCES} ${qtester_HEADERS_MOC} ${qtester_FORMS_HEADERS} -- 2.39.2