diff --git a/CMakeLists.txt b/CMakeLists.txt index c5e1130921996b6eae49b4e01b1304fa4edda13a..3b1f4d3bcca0e984a0196869d8802a026200676c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -535,7 +535,7 @@ endforeach() # message("OTB_MODULES_ENABLED = ${modules_list_for_summary}") # unset(modules_list_for_summary) -list(REMOVE_ITEM option_list "OTB_USE_6S" "OTB_USE_SIFTFAST" "OTB_USE_QT4") +list(REMOVE_ITEM option_list "OTB_USE_6S" "OTB_USE_SIFTFAST" "OTB_USE_QT") foreach(item ${option_list}) if(NOT ${item}) list(REMOVE_ITEM option_list "${item}" ) @@ -554,7 +554,7 @@ list(APPEND option_list TINYXML) #Q: Why these two guys here? we already have option_list #A: Because cmake case sensitivity with variables. -if(OTB_USE_QT4) +if(OTB_USE_QT) list(APPEND option_list QT) endif() #sort again! diff --git a/Modules/Adapters/QtAdapters/otb-module.cmake b/Modules/Adapters/QtAdapters/otb-module.cmake index a5457dc8292e1cd6a94fba922a8a1cf4f2d5eb7d..028a6703cc4d586729a01a4485a6eda05c8a24c4 100644 --- a/Modules/Adapters/QtAdapters/otb-module.cmake +++ b/Modules/Adapters/QtAdapters/otb-module.cmake @@ -22,6 +22,6 @@ set( DOCUMENTATION "Adapters for the Qt Library.") otb_module( OTBQtAdapters ENABLE_SHARED - DEPENDS OTBQt5 + DEPENDS OTBQt DESCRIPTION "${DOCUMENTATION}" ) diff --git a/Modules/Adapters/QtAdapters/src/CMakeLists.txt b/Modules/Adapters/QtAdapters/src/CMakeLists.txt index 764d6f76e6c3663e2838b09ce161afa68a1688ef..ae4d62b84ba4a4cb45d77fa40f18bc4a812fa207 100644 --- a/Modules/Adapters/QtAdapters/src/CMakeLists.txt +++ b/Modules/Adapters/QtAdapters/src/CMakeLists.txt @@ -34,7 +34,7 @@ qt5_wrap_cpp( OTBQtAdapters_SRC_MOC ${OTBQtAdapters_HEADERS_MOC} ) add_library( OTBQtAdapters ${OTBQtAdapters_SRC} ${OTBQtAdapters_SRC_MOC}) target_link_libraries( OTBQtAdapters - ${OTBQt5_LIBRARIES} + ${OTBQt_LIBRARIES} ) otb_module_target( OTBQtAdapters ) diff --git a/Modules/ThirdParty/Qt5/CMakeLists.txt b/Modules/ThirdParty/Qt/CMakeLists.txt similarity index 85% rename from Modules/ThirdParty/Qt5/CMakeLists.txt rename to Modules/ThirdParty/Qt/CMakeLists.txt index c05d314bb0b192f491e25b26d8f74b9c2c448119..d45a3d67d375801dac0dfce6ef5b08c72c2b6816 100644 --- a/Modules/ThirdParty/Qt5/CMakeLists.txt +++ b/Modules/ThirdParty/Qt/CMakeLists.txt @@ -18,9 +18,9 @@ # limitations under the License. # -project( OTBQt5 ) +project( OTBQt ) -set( OTBQt5_LIBRARIES ${Qt5Widgets_LIBRARIES} ${Qt5Core_LIBRARIES} ${Qt5Gui_LIBRARIES} ${Qt5OpenGL_LIBRARIES}) +set( OTBQt_LIBRARIES ${Qt5Widgets_LIBRARIES} ${Qt5Core_LIBRARIES} ${Qt5Gui_LIBRARIES} ${Qt5OpenGL_LIBRARIES}) set( QT_VERSION "${QTVERSION}" CACHE INTERNAL "" FORCE ) diff --git a/Modules/ThirdParty/Qt5/otb-module-init.cmake b/Modules/ThirdParty/Qt/otb-module-init.cmake similarity index 100% rename from Modules/ThirdParty/Qt5/otb-module-init.cmake rename to Modules/ThirdParty/Qt/otb-module-init.cmake diff --git a/Modules/ThirdParty/Qt5/otb-module.cmake b/Modules/ThirdParty/Qt/otb-module.cmake similarity index 98% rename from Modules/ThirdParty/Qt5/otb-module.cmake rename to Modules/ThirdParty/Qt/otb-module.cmake index 7e7c00a61bc346664656da8e7872b95ca15ae99b..d3962f0acb48afd06a00c3628b14d24d607a060c 100644 --- a/Modules/ThirdParty/Qt5/otb-module.cmake +++ b/Modules/ThirdParty/Qt/otb-module.cmake @@ -20,7 +20,7 @@ set(DOCUMENTATION "This module imports Qt5 to the build system") -otb_module(OTBQt5 +otb_module(OTBQt DEPENDS TEST_DEPENDS diff --git a/Modules/ThirdParty/Qwt/otb-module.cmake b/Modules/ThirdParty/Qwt/otb-module.cmake index 609eb927ed90345229fa1e58d44caa8aadebc4f1..646b2a4fe0020ee92982fefbcf8bf2b4f46b6217 100644 --- a/Modules/ThirdParty/Qwt/otb-module.cmake +++ b/Modules/ThirdParty/Qwt/otb-module.cmake @@ -22,7 +22,7 @@ set(DOCUMENTATION "This module imports Qwt to the build system") otb_module(OTBQwt DEPENDS - OTBQt5 + OTBQt TEST_DEPENDS diff --git a/Modules/Visualization/Mapla/include/mvdMaplaMainWindow.h b/Modules/Visualization/Mapla/include/mvdMaplaMainWindow.h index 5e332de0eb89dffd8a7c43f3ccbe041911f1b611..b2d3e39ad727475beae6b143641a1c0c0e4644a7 100644 --- a/Modules/Visualization/Mapla/include/mvdMaplaMainWindow.h +++ b/Modules/Visualization/Mapla/include/mvdMaplaMainWindow.h @@ -190,7 +190,7 @@ private: */ Ui::MaplaMainWindow* m_UI; -#ifdef OTB_USE_QT5 +#ifdef OTB_USE_QT /** * \brief OTB-applications tool-box controller. */ diff --git a/Modules/Visualization/Mapla/otb-module.cmake b/Modules/Visualization/Mapla/otb-module.cmake index 49fd77fb722b5be6c7702a25430c24aa9d6b4714..dd844644a43a03f015556d8554011ef2e4ed621e 100644 --- a/Modules/Visualization/Mapla/otb-module.cmake +++ b/Modules/Visualization/Mapla/otb-module.cmake @@ -27,7 +27,7 @@ otb_module( OTBMapla DEPENDS OTBMonteverdiCore OTBMonteverdiGUI - OTBQt5 + OTBQt OPTIONAL_DEPENDS diff --git a/Modules/Visualization/Mapla/src/CMakeLists.txt b/Modules/Visualization/Mapla/src/CMakeLists.txt index d2c5b70393f03c2206160db105ec1008dec34dba..d7e34cdeaf06b2ecdc23427920b895785dbbc985 100644 --- a/Modules/Visualization/Mapla/src/CMakeLists.txt +++ b/Modules/Visualization/Mapla/src/CMakeLists.txt @@ -79,7 +79,7 @@ add_library( OTBMapla target_link_libraries( OTBMapla ${OTBMonteverdiCore_LIBRARIES} ${OTBMonteverdiGUI_LIBRARIES} - ${OTBQt5_LIBRARIES} + ${OTBQt_LIBRARIES} ) otb_module_target( OTBMapla ) diff --git a/Modules/Visualization/Mapla/src/mvdMaplaApplication.cxx b/Modules/Visualization/Mapla/src/mvdMaplaApplication.cxx index ae959b8aa45e519c7e1023aba35a943b9e499a9a..bb3d1d3f61c3849de39cc7c8c3a8e4830b40cba8 100644 --- a/Modules/Visualization/Mapla/src/mvdMaplaApplication.cxx +++ b/Modules/Visualization/Mapla/src/mvdMaplaApplication.cxx @@ -39,7 +39,7 @@ // Monteverdi includes (sorted by alphabetic order) // -#ifdef OTB_USE_QT5 +#ifdef OTB_USE_QT #include "mvdOTBApplicationsModel.h" #endif diff --git a/Modules/Visualization/Mapla/src/mvdMaplaMainWindow.cxx b/Modules/Visualization/Mapla/src/mvdMaplaMainWindow.cxx index b4bbca05d84c31750f5792840367bcc6f58f084a..dc4d2dd5d66e95235f37c987f3ad3ebfe5c5e796 100644 --- a/Modules/Visualization/Mapla/src/mvdMaplaMainWindow.cxx +++ b/Modules/Visualization/Mapla/src/mvdMaplaMainWindow.cxx @@ -42,7 +42,7 @@ // // Monteverdi includes (sorted by alphabetic order) -#ifdef OTB_USE_QT5 +#ifdef OTB_USE_QT # include "mvdApplicationLauncher.h" # include "mvdApplicationsToolBoxController.h" # include "mvdOTBApplicationsModel.h" @@ -86,7 +86,7 @@ MaplaMainWindow ::MaplaMainWindow( QWidget * p, Qt::WindowFlags flags ) : I18nMainWindow( p, flags ), m_UI( new mvd::Ui::MaplaMainWindow() ) -#ifdef OTB_USE_QT5 +#ifdef OTB_USE_QT , m_ApplicationsToolBoxController( NULL ) #endif @@ -110,7 +110,7 @@ MaplaMainWindow setObjectName( "Mapla" ); setWindowTitle( PROJECT_NAME " Application Launcher" ); -#ifdef OTB_USE_QT5 +#ifdef OTB_USE_QT assert( m_ApplicationsToolBoxController==NULL ); @@ -124,16 +124,16 @@ MaplaMainWindow setCentralWidget( m_ApplicationsToolBoxController->GetWidget() ); -#else // OTB_USE_QT5 +#else // OTB_USE_QT setCentralWidget( new QLabel( - tr( "Enable OTB_USE_QT5 preprocessor definition at compile time!" ), + tr( "Enable OTB_USE_QT preprocessor definition at compile time!" ), this ) ); -#endif // OTB_USE_QT5 +#endif // OTB_USE_QT if( !RestoreLayout( Monteverdi_UI_VERSION ) ) { @@ -148,7 +148,7 @@ MaplaMainWindow { // // OTB application support. -#ifdef OTB_USE_QT5 +#ifdef OTB_USE_QT QObject::connect( m_ApplicationsToolBoxController->GetWidget(), @@ -217,7 +217,7 @@ MaplaMainWindow ::OnApplicationToLaunchSelected( const QString & appName, const QString & ) { -#ifdef OTB_USE_QT5 +#ifdef OTB_USE_QT assert( MaplaApplication::ConstInstance()!=NULL ); assert( MaplaApplication::ConstInstance()->GetModel()!=NULL ); @@ -241,7 +241,7 @@ MaplaMainWindow appWindow->show(); -#endif // OTB_USE_QT5 +#endif // OTB_USE_QT } /*****************************************************************************/ diff --git a/Modules/Visualization/Monteverdi/include/mvdMainWindow.h b/Modules/Visualization/Monteverdi/include/mvdMainWindow.h index 198bbd3798dc477eeb8795bfb733951a112abf98..f198fe51814897acd5239e590eb99652b4c5703f 100644 --- a/Modules/Visualization/Monteverdi/include/mvdMainWindow.h +++ b/Modules/Visualization/Monteverdi/include/mvdMainWindow.h @@ -221,9 +221,9 @@ protected slots: /** */ -#if defined( OTB_USE_QT5 ) && USE_OTB_APPS +#if defined( OTB_USE_QT ) && USE_OTB_APPS void OnApplicationToLaunchSelected( const QString & appName, const QString & docName ); -#endif // defined( OTB_USE_QT5 ) && USE_OTB_APPS +#endif // defined( OTB_USE_QT ) && USE_OTB_APPS /** */ @@ -396,7 +396,7 @@ private: QDockWidget* m_HistogramDock; -#ifdef OTB_USE_QT5 +#ifdef OTB_USE_QT /** * \brief OTB-applications browser dock-widget. */ diff --git a/Modules/Visualization/Monteverdi/otb-module.cmake b/Modules/Visualization/Monteverdi/otb-module.cmake index 3f04b0b1733557b22f595e366c10d47980a63612..82815d92df78ae54d0bc10e1ee6bfb6628a09625 100644 --- a/Modules/Visualization/Monteverdi/otb-module.cmake +++ b/Modules/Visualization/Monteverdi/otb-module.cmake @@ -27,7 +27,7 @@ otb_module( OTBMonteverdi DEPENDS OTBMonteverdiCore OTBMonteverdiGUI - OTBQt5 + OTBQt OTBQtAdapters OPTIONAL_DEPENDS diff --git a/Modules/Visualization/Monteverdi/src/CMakeLists.txt b/Modules/Visualization/Monteverdi/src/CMakeLists.txt index f984bf6b5a38f8ce06ef885f9805531fb968fc43..8d215eb074c13602cc26808d1ee19402d137d2c8 100644 --- a/Modules/Visualization/Monteverdi/src/CMakeLists.txt +++ b/Modules/Visualization/Monteverdi/src/CMakeLists.txt @@ -62,7 +62,7 @@ add_library( OTBMonteverdi target_link_libraries( OTBMonteverdi ${OTBMonteverdiCore_LIBRARIES} ${OTBMonteverdiGUI_LIBRARIES} - ${OTBQt5_LIBRARIES} + ${OTBQt_LIBRARIES} ${OTBQtAdapters_LIBRARIES} ) otb_module_target( OTBMonteverdi ) diff --git a/Modules/Visualization/Monteverdi/src/mvdApplication.cxx b/Modules/Visualization/Monteverdi/src/mvdApplication.cxx index 0fe1f61abc73563de03c62f18be0b1c66c55251e..dafaba30ac5c973c8d55e57879f15f3bf5688aaf 100644 --- a/Modules/Visualization/Monteverdi/src/mvdApplication.cxx +++ b/Modules/Visualization/Monteverdi/src/mvdApplication.cxx @@ -40,7 +40,7 @@ #include "mvdStackedLayerModel.h" // -#ifdef OTB_USE_QT5 +#ifdef OTB_USE_QT # include "mvdOTBApplicationsModel.h" #endif @@ -121,7 +121,7 @@ void Application ::OpenApplicationsBrowser() { -#ifdef OTB_USE_QT5 +#ifdef OTB_USE_QT m_OTBApplicationsModel = new OTBApplicationsModel( this ); m_OTBApplicationsModel->BuildModel(); diff --git a/Modules/Visualization/Monteverdi/src/mvdMainWindow.cxx b/Modules/Visualization/Monteverdi/src/mvdMainWindow.cxx index fe126444c0e621edb70b47f500f2681e5dc9898f..4dae3efc405984be89e1cf06fd144a520a01237a 100644 --- a/Modules/Visualization/Monteverdi/src/mvdMainWindow.cxx +++ b/Modules/Visualization/Monteverdi/src/mvdMainWindow.cxx @@ -43,7 +43,7 @@ // // Monteverdi includes (sorted by alphabetic order) -#if defined( OTB_USE_QT5 ) && USE_OTB_APPS +#if defined( OTB_USE_QT ) && USE_OTB_APPS # include "mvdApplicationLauncher.h" # include "mvdApplicationsToolBoxController.h" # include "mvdOTBApplicationsModel.h" @@ -131,7 +131,7 @@ MainWindow m_PixelDescriptionDock(NULL), #endif // USE_PIXEL_DESCRIPTION m_HistogramDock( NULL ), -#if defined( OTB_USE_QT5 ) && USE_OTB_APPS +#if defined( OTB_USE_QT ) && USE_OTB_APPS m_OtbApplicationsBrowserDock(NULL), #endif m_ImageView( NULL ), @@ -2209,7 +2209,7 @@ MainWindow } /*****************************************************************************/ -#if defined( OTB_USE_QT5 ) && USE_OTB_APPS +#if defined( OTB_USE_QT ) && USE_OTB_APPS void MainWindow @@ -2294,7 +2294,7 @@ MainWindow ); } -#endif // defined( OTB_USE_QT5 ) && USE_OTB_APPS +#endif // defined( OTB_USE_QT ) && USE_OTB_APPS /*****************************************************************************/ #if USE_TABBED_VIEW @@ -2324,7 +2324,7 @@ MainWindow QWidget* appWidget = m_CentralTabWidget->widget( index ); assert( appWidget!=NULL ); -#if defined( OTB_USE_QT5 ) && USE_OTB_APPS +#if defined( OTB_USE_QT ) && USE_OTB_APPS assert( appWidget==qobject_cast< Wrapper::QtWidgetView* >( appWidget ) ); Wrapper::QtWidgetView* appWidgetView = diff --git a/Modules/Visualization/MonteverdiCore/otb-module.cmake b/Modules/Visualization/MonteverdiCore/otb-module.cmake index 28ce8e90352a9691a5f8631cde9040317d71b712..43873bffb01dbfa43becfcd44131e3c541730612 100644 --- a/Modules/Visualization/MonteverdiCore/otb-module.cmake +++ b/Modules/Visualization/MonteverdiCore/otb-module.cmake @@ -36,7 +36,7 @@ otb_module( OTBMonteverdiCore OTBObjectList OTBOSSIMAdapters OTBProjection - OTBQt5 + OTBQt OTBStatistics OTBTransform diff --git a/Modules/Visualization/MonteverdiCore/src/CMakeLists.txt b/Modules/Visualization/MonteverdiCore/src/CMakeLists.txt index ac130316f3641b6964fc004fe7a89e36aa974dcc..ae5ee7cb45701998ae7c94e8078489ba00db1e36 100644 --- a/Modules/Visualization/MonteverdiCore/src/CMakeLists.txt +++ b/Modules/Visualization/MonteverdiCore/src/CMakeLists.txt @@ -111,7 +111,7 @@ target_link_libraries( OTBMonteverdiCore ${OTBObjectList_LIBRARIES} ${OTBOSSIMAdapters_LIBRARIES} ${OTBProjection_LIBRARIES} - ${OTBQt5_LIBRARIES} + ${OTBQt_LIBRARIES} ${OTBStatistics_LIBRARIES} ${OTBTransform_LIBRARIES} ) diff --git a/Modules/Visualization/MonteverdiGui/otb-module.cmake b/Modules/Visualization/MonteverdiGui/otb-module.cmake index 9a4a31ac38c25b69a1ba67a63c2254089505d439..ce62702963ff5e02ecabada50bb34744f58dbc34 100644 --- a/Modules/Visualization/MonteverdiGui/otb-module.cmake +++ b/Modules/Visualization/MonteverdiGui/otb-module.cmake @@ -29,7 +29,7 @@ otb_module( OTBMonteverdiGUI OTBIce OTBIOGDAL OTBMonteverdiCore - OTBQt5 + OTBQt OTBQwt OPTIONAL_DEPENDS diff --git a/Modules/Wrappers/QtWidget/otb-module.cmake b/Modules/Wrappers/QtWidget/otb-module.cmake index 13ab8f7912a14697607155c982b0e08bded64a51..d09a29d36fcd4f05543863ca3354e52956d310ab 100644 --- a/Modules/Wrappers/QtWidget/otb-module.cmake +++ b/Modules/Wrappers/QtWidget/otb-module.cmake @@ -25,7 +25,7 @@ ENABLE_SHARED DEPENDS OTBApplicationEngine OTBITK - OTBQt5 + OTBQt OTBQtAdapters TEST_DEPENDS diff --git a/Modules/Wrappers/QtWidget/src/CMakeLists.txt b/Modules/Wrappers/QtWidget/src/CMakeLists.txt index fc307de28254e9cab568212a408d2172e2cf557a..2cd828f166707829c69732add8174a56f2c93754 100644 --- a/Modules/Wrappers/QtWidget/src/CMakeLists.txt +++ b/Modules/Wrappers/QtWidget/src/CMakeLists.txt @@ -114,7 +114,7 @@ add_library( OTBQtWidget target_link_libraries( OTBQtWidget ${OTBApplicationEngine_LIBRARIES} - ${OTBQt5_LIBRARIES} + ${OTBQt_LIBRARIES} ${OTBQtAdapters_LIBRARIES} ) @@ -124,7 +124,7 @@ add_executable(otbApplicationLauncherQt otbApplicationLauncherQt.cxx) target_link_libraries(otbApplicationLauncherQt ${OTBQtWidget_LIBRARIES} ${OTBApplicationEngine_LIBRARIES} - ${OTBQt5_LIBRARIES} + ${OTBQt_LIBRARIES} ) otb_module_target(otbApplicationLauncherQt) set_linker_stack_size_flag(otbApplicationLauncherQt 10000000) diff --git a/SuperBuild/CMake/External_otb.cmake b/SuperBuild/CMake/External_otb.cmake index e6a2ae8a996faed6379c5a1bd74e5e86f11a58e5..bbc0ad6350aa8f8a6200a7a4c0572c9fece94d21 100644 --- a/SuperBuild/CMake/External_otb.cmake +++ b/SuperBuild/CMake/External_otb.cmake @@ -91,7 +91,7 @@ if(OTB_WRAP_PYTHON3) ADD_SUPERBUILD_CMAKE_VAR(OTB PYTHON3_EXECUTABLE) endif() -if(OTB_USE_QT5) +if(OTB_USE_QT) ADDTO_DEPENDENCIES_IF_NOT_SYSTEM(OTB QT5) endif() @@ -197,7 +197,7 @@ ExternalProject_Add(OTB -DOTB_USE_MUPARSERX:BOOL=${OTB_USE_MUPARSERX} -DOTB_USE_OPENCV:BOOL=${OTB_USE_OPENCV} -DOTB_USE_SHARK:BOOL=${OTB_USE_SHARK} - -DOTB_USE_QT5:BOOL=${OTB_USE_QT5} + -DOTB_USE_QT:BOOL=${OTB_USE_QT} -DOTB_USE_SIFTFAST:BOOL=${OTB_USE_SIFTFAST} -DOTB_USE_OPENGL:BOOL=${OTB_USE_OPENGL} -DOTB_USE_GLEW:BOOL=${OTB_USE_GLEW} diff --git a/SuperBuild/CMakeLists.txt b/SuperBuild/CMakeLists.txt index 9847f241dbe1fb660e72eaf5f8eb07ca70110caa..72b4b7c780c53be044db3f48d2f072cab08a476a 100644 --- a/SuperBuild/CMakeLists.txt +++ b/SuperBuild/CMakeLists.txt @@ -285,7 +285,7 @@ option(USE_SYSTEM_OPENCV "Use a system build of OpenCV" OFF) option(USE_SYSTEM_LIBSVM "Use a system build of libsvm" OFF) option(USE_SYSTEM_PCRE "Use a system build of PCRE" ON) option(USE_SYSTEM_SWIG "Use a system build of swig" ON) -option(USE_SYSTEM_QT5 "Use a system build of QT5" OFF) +option(USE_SYSTEM_QT "Use a system build of QT5" OFF) option(USE_SYSTEM_QWT "Use a system build of Qwt" OFF) option(USE_SYSTEM_GLEW "Use a system build of GLEW" OFF) option(USE_SYSTEM_GLFW "Use a system build of glfw" OFF) @@ -311,7 +311,7 @@ option(OTB_USE_MAPNIK "Enable module Mapnik in OTB" OFF) option(OTB_USE_MUPARSER "Enable module muparser in OTB" ON) option(OTB_USE_MUPARSERX "Enable module muparserX in OTB" ON) option(OTB_USE_OPENCV "Enable module OpenCV in OTB" ON) -option(OTB_USE_QT5 "Enable module QT5 in OTB" ON) +option(OTB_USE_QT "Enable module QT5 in OTB" ON) option(OTB_USE_SIFTFAST "Enable module Siftfast in OTB" ON) option(OTB_USE_OPENGL "Enable module OpenGL in OTB" ON) option(OTB_USE_GLEW "Enable module GLEW in OTB" ON)