Commit cd31526a authored by Manuel Grizonnet's avatar Manuel Grizonnet

ENH: start to move CMake configuration from Qt4 to Qt5

parent 9bc715b6
......@@ -29,7 +29,7 @@ set( OTBQtAdapters_HEADERS_MOC
add_to_qt4_i18n_sources( ${OTBQtAdapters_SRCS} )
add_to_qt4_i18n_headers( "../include" ${OTBQtAdapters_SRCS} )
qt4_wrap_cpp( OTBQtAdapters_SRC_MOC ${OTBQtAdapters_HEADERS_MOC} )
qt5_wrap_cpp( OTBQtAdapters_SRC_MOC ${OTBQtAdapters_HEADERS_MOC} )
add_library( OTBQtAdapters ${OTBQtAdapters_SRC} ${OTBQtAdapters_SRC_MOC})
......
......@@ -18,7 +18,13 @@
# limitations under the License.
#
find_package( Qt4 REQUIRED QtCore QtGui QtOpenGL) # QtXml )
#find_package( Qt4 REQUIRED QtCore QtGui QtOpenGL) # QtXml )
find_package(Qt5Core)
find_package(Qt5Widgets)
#FIXME move to i18n directory?
find_package(Qt5LinguistTools)
mark_as_advanced( QT_QMAKE_EXECUTABLE )
#set( QT_USE_QTXML 1 )
include( ${QT_USE_FILE} )
#include( ${QT_USE_FILE} )
......@@ -61,9 +61,9 @@ if (WIN32)
endif()
#############################################################################
qt4_wrap_cpp( OTBMapla_SRC_MOC ${OTBMapla_HEADERS_MOC} )
qt4_wrap_ui( OTBMapla_FORMS_HEADERS ${OTBMapla_FORMS} )
qt4_add_resources( OTBMapla_RESOURCES_RCC ${OTBMapla_RESOURCES} OPTIONS "-no-compress")
qt5_wrap_cpp( OTBMapla_SRC_MOC ${OTBMapla_HEADERS_MOC} )
qt5_wrap_ui( OTBMapla_FORMS_HEADERS ${OTBMapla_FORMS} )
qt5_add_resources( OTBMapla_RESOURCES_RCC ${OTBMapla_RESOURCES} OPTIONS "-no-compress")
#############################################################################
add_to_qt4_i18n_sources( ${OTBMapla_SRCS} )
......
......@@ -44,9 +44,9 @@ set( OTBMonteverdi_RESOURCES
)
#############################################################################
qt4_wrap_cpp( OTBMonteverdi_SRC_MOC ${OTBMonteverdi_HEADERS_MOC} )
qt4_wrap_ui( OTBMonteverdi_FORMS_HEADERS ${OTBMonteverdi_FORMS} )
qt4_add_resources( OTBMonteverdi_RESOURCES_RCC ${OTBMonteverdi_RESOURCES} OPTIONS "-no-compress")
qt5_wrap_cpp( OTBMonteverdi_SRC_MOC ${OTBMonteverdi_HEADERS_MOC} )
qt5_wrap_ui( OTBMonteverdi_FORMS_HEADERS ${OTBMonteverdi_FORMS} )
qt5_add_resources( OTBMonteverdi_RESOURCES_RCC ${OTBMonteverdi_RESOURCES} OPTIONS "-no-compress")
#############################################################################
add_to_qt4_i18n_sources( ${OTBMonteverdi_SRCS} )
......
......@@ -94,7 +94,7 @@ add_to_qt4_i18n_sources( ${OTBMonteverdiCore_SRCS} )
add_to_qt4_i18n_headers( "../include" ${OTBMonteverdiCore_SRCS} )
#############################################################################
qt4_wrap_cpp( OTBMonteverdiCore_SRC_MOC ${OTBMonteverdiCore_HEADERS_MOC} )
qt5_wrap_cpp( OTBMonteverdiCore_SRC_MOC ${OTBMonteverdiCore_HEADERS_MOC} )
add_library( OTBMonteverdiCore ${OTBMonteverdiCore_SRCS} ${OTBMonteverdiCore_SRC_MOC})
......
......@@ -174,9 +174,9 @@ if( OTBQtWidget_ENABLED )
endif()
#############################################################################
qt4_wrap_cpp( OTBMonteverdiGUI_SRC_MOC ${OTBMonteverdiGUI_HEADERS_MOC} )
qt4_wrap_ui( OTBMonteverdiGUI_FORMS_HEADERS ${OTBMonteverdiGUI_FORMS} )
qt4_add_resources( OTBMonteverdiGUI_RESOURCES_RCC ${OTBMonteverdiGUI_RESOURCES} )
qt5_wrap_cpp( OTBMonteverdiGUI_SRC_MOC ${OTBMonteverdiGUI_HEADERS_MOC} )
qt5_wrap_ui( OTBMonteverdiGUI_FORMS_HEADERS ${OTBMonteverdiGUI_FORMS} )
qt5_add_resources( OTBMonteverdiGUI_RESOURCES_RCC ${OTBMonteverdiGUI_RESOURCES} )
#############################################################################
add_to_qt4_i18n_sources( ${OTBMonteverdiGUI_SRCS} )
......
......@@ -103,8 +103,8 @@ set( OTBQtWidget_FORMS
otbWrapperQtWidgetListEditWidget.ui
)
qt4_wrap_cpp( OTBQtWidget_MOC_SRC ${OTBQtWidget_MOC_HDR} )
qt4_wrap_ui( OTBQtWidget_FORMS_HEADERS ${OTBQtWidget_FORMS} )
qt5_wrap_cpp( OTBQtWidget_MOC_SRC ${OTBQtWidget_MOC_HDR} )
qt5_wrap_ui( OTBQtWidget_FORMS_HEADERS ${OTBQtWidget_FORMS} )
add_library( OTBQtWidget
${OTBQtWidget_SRC}
......
......@@ -67,7 +67,7 @@ if( OTBQt4_ENABLED )
endforeach()
endif()
qt4_add_translation(OTB_QM_TRANSLATIONS
qt5_add_translation(OTB_QM_TRANSLATIONS
${OTB_TS_TRANSLATIONS}
)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment