X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSUIT%2FCMakeLists.txt;h=95015a57c70e7b1657312321c908670cac4a6984;hb=f2376a3d416ad43c5ad000a92deb0801f71ff4c4;hp=d4f0afe88ab1ea71f9bf765081357a12bfec09cf;hpb=bb8609caf7881d966fbb88dec0a7822736da93f5;p=modules%2Fgui.git diff --git a/src/SUIT/CMakeLists.txt b/src/SUIT/CMakeLists.txt index d4f0afe88..95015a57c 100644 --- a/src/SUIT/CMakeLists.txt +++ b/src/SUIT/CMakeLists.txt @@ -1,9 +1,9 @@ -# Copyright (C) 2012-2013 CEA/DEN, EDF R&D, OPEN CASCADE +# Copyright (C) 2012-2024 CEA, EDF, OPEN CASCADE # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either -# version 2.1 of the License. +# version 2.1 of the License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -17,55 +17,104 @@ # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # -INCLUDE(${CMAKE_SOURCE_DIR}/adm_local/cmake_files/UseQT4EXT.cmake) +INCLUDE(UseQtExt) +# --- options --- + +# additional include directories INCLUDE_DIRECTORIES( ${QT_INCLUDES} - ${CMAKE_CURRENT_SOURCE_DIR} - ${CMAKE_CURRENT_SOURCE_DIR}/../Qtx - ${CMAKE_CURRENT_SOURCE_DIR}/../ObjBrowser + ${PROJECT_SOURCE_DIR}/src/Qtx + ${PROJECT_SOURCE_DIR}/src/ObjBrowser ) -SET(COMMON_LIBS - qtx - ObjBrowser - ${QT_LIBRARIES} - ${PLATFORM_LIBS} -) -IF(ENABLE_TESTRECORDER) - ADD_DEFINITIONS("-DENABLE_TESTRECORDER ${TESTRECORDER_DEFINITIONS}") - SET(COMMON_LIBS ${COMMON_LIBS} ${TESTRECORDER_LIBS}) -ENDIF(ENABLE_TESTRECORDER) - -SET(GUI_HEADERS - SUIT_Accel.h - SUIT_ActionOperation.h - SUIT_Application.h - SUIT_DataBrowser.h - SUIT_DataObject.h - SUIT_Desktop.h +# additional preprocessor / compiler flags +ADD_DEFINITIONS(${QT_DEFINITIONS}) + +# libraries to link to +SET(_link_LIBRARIES ${PLATFORM_LIBS} ${QT_LIBRARIES} qtx ObjBrowser) + +# --- headers --- + +# header files / to be processed by moc +SET(_moc_HEADERS + SUIT_Accel.h + SUIT_ActionOperation.h + SUIT_Application.h + SUIT_AutoRotate.h + SUIT_DataBrowser.h + SUIT_DataObject.h + SUIT_Desktop.h + SUIT_FileDlg.h + SUIT_FindActionDialog.h SUIT_LicenseDlg.h - SUIT_FileDlg.h - SUIT_Operation.h - SUIT_PopupClient.h - SUIT_PreferenceMgr.h - SUIT_SelectionMgr.h - SUIT_Selector.h - SUIT_Session.h - SUIT_Study.h - SUIT_TreeModel.h - SUIT_ViewManager.h - SUIT_ViewModel.h - SUIT_ViewWindow.h + SUIT_MessageBox.h + SUIT_Operation.h + SUIT_PagePrefShortcutTreeItem.h + SUIT_PopupClient.h + SUIT_PreferenceMgr.h + SUIT_SelectionMgr.h + SUIT_Session.h SUIT_ShortcutMgr.h + SUIT_ShortcutTree.h + SUIT_Study.h + SUIT_TreeModel.h + SUIT_ViewManager.h + SUIT_ViewModel.h + SUIT_ViewWindow.h +) + +# header files / no moc processing +SET(_other_HEADERS + SUIT.h SUIT_CameraProperties.h + SUIT_DataObjectIterator.h + SUIT_DataObjectKey.h + SUIT_DataOwner.h + SUIT_ExceptionHandler.h + SUIT_FileValidator.h + SUIT_OverrideCursor.h + SUIT_ResourceMgr.h + SUIT_SelectionFilter.h + SUIT_Selector.h + SUIT_SmartPtr.h + SUIT_Tools.h + SUIT_TreeSync.h +) + +# header files / to install +SET(suit_HEADERS ${_moc_HEADERS} ${_other_HEADERS}) + +# --- resources --- + +# resource files / to be processed by lrelease +SET(_ts_RESOURCES + resources/SUIT_msg_en.ts + resources/SUIT_msg_fr.ts + resources/SUIT_msg_ja.ts + resources/SUIT_images.ts ) -QT4_WRAP_CPP(GUI_HEADERS_MOC ${GUI_HEADERS}) -SET(suit_SOURCES +# resource files / static +SET(_other_RESOURCES + resources/icon_visibility_on.png + resources/icon_visibility_off.png + resources/view_sync.png + resources/action_assets.json +) + +# --- sources --- + +# sources / moc wrappings +QT_WRAP_MOC(_moc_SOURCES ${_moc_HEADERS}) + +# sources / static +SET(_other_SOURCES SUIT_Accel.cxx SUIT_ActionOperation.cxx SUIT_Application.cxx + SUIT_AutoRotate.cxx + SUIT_CameraProperties.cxx SUIT_DataBrowser.cxx SUIT_DataObject.cxx SUIT_DataObjectIterator.cxx @@ -74,11 +123,13 @@ SET(suit_SOURCES SUIT_Desktop.cxx SUIT_ExceptionHandler.cxx SUIT_FileDlg.cxx - SUIT_LicenseDlg.cxx SUIT_FileValidator.cxx + SUIT_FindActionDialog.cxx + SUIT_LicenseDlg.cxx SUIT_MessageBox.cxx SUIT_Operation.cxx SUIT_OverrideCursor.cxx + SUIT_PagePrefShortcutTreeItem.cxx SUIT_PopupClient.cxx SUIT_PreferenceMgr.cxx SUIT_ResourceMgr.cxx @@ -86,29 +137,26 @@ SET(suit_SOURCES SUIT_SelectionMgr.cxx SUIT_Selector.cxx SUIT_Session.cxx + SUIT_ShortcutMgr.cxx + SUIT_ShortcutTree.cxx SUIT_Study.cxx SUIT_Tools.cxx SUIT_TreeModel.cxx SUIT_ViewManager.cxx SUIT_ViewModel.cxx SUIT_ViewWindow.cxx - SUIT_ShortcutMgr.cxx - SUIT_CameraProperties.cxx -) -SET(GUITS_SOURCES - resources/SUIT_msg_en.ts - resources/SUIT_msg_fr.ts - resources/SUIT_images.ts ) -ADD_LIBRARY(suit ${suit_SOURCES} ${GUI_HEADERS_MOC}) -TARGET_LINK_LIBRARIES(suit ${COMMON_LIBS}) -INSTALL(TARGETS suit DESTINATION ${GUI_salomelib_LIBS}) +# sources / to compile +SET(suit_SOURCES ${_other_SOURCES} ${_moc_SOURCES}) + +# --- rules --- -FILE(GLOB COMMON_HEADERS_H "${CMAKE_CURRENT_SOURCE_DIR}/*.h") -INSTALL(FILES ${COMMON_HEADERS_H} DESTINATION ${GUI_salomeinclude_HEADERS}) -QT4_INSTALL_TS_RESOURCES("${GUITS_SOURCES}" "${GUI_salomeres_DATA}") +ADD_LIBRARY(suit ${suit_SOURCES}) +TARGET_LINK_LIBRARIES(suit ${_link_LIBRARIES}) +INSTALL(TARGETS suit EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS}) -FILE(GLOB GUIPNG_DATA "${CMAKE_CURRENT_SOURCE_DIR}/resources/*.png") -INSTALL(FILES ${GUIPNG_DATA} DESTINATION ${GUI_salomeres_DATA}) +INSTALL(FILES ${suit_HEADERS} DESTINATION ${SALOME_INSTALL_HEADERS}) +QT_INSTALL_TS_RESOURCES("${_ts_RESOURCES}" "${SALOME_GUI_INSTALL_RES_DATA}") +INSTALL(FILES ${_other_RESOURCES} DESTINATION ${SALOME_GUI_INSTALL_RES_DATA})