-CMAKE_MINIMUM_REQUIRED(VERSION 2.8.11)
+## Copyright (C) 2014-20xx CEA/DEN, EDF R&D
-INCLUDE(FindCAS)
SET(CMAKE_AUTOMOC ON)
SET(PROJECT_HEADERS
- XGUI_Command.h
- XGUI_MainMenu.h
- XGUI_MainWindow.h
- XGUI_MenuGroupPanel.h
- XGUI_Tools.h
- XGUI_Workbench.h
- XGUI_Workshop.h
- XGUI_ViewWindow.h
- XGUI_ViewPort.h
- XGUI_Viewer.h
- XGUI_RubberBand.h
- XGUI_Constants.h
- XGUI_ViewBackground.h
- XGUI_WidgetFactory.h
- XGUI_DocumentDataModel.h
+ XGUI.h
+ XGUI_ActionsMgr.h
+ XGUI_ColorDialog.h
+ XGUI_ContextMenuMgr.h
+ XGUI_CustomPrs.h
XGUI_DataModel.h
+ XGUI_Displayer.h
+ XGUI_ErrorDialog.h
+ XGUI_ErrorMgr.h
+ XGUI_HistoryMenu.h
+ XGUI_ModuleConnector.h
XGUI_ObjectsBrowser.h
+ XGUI_OperationMgr.h
+ XGUI_PropertyPanel.h
+ XGUI_QtEvents.h
+ XGUI_SalomeConnector.h
+ XGUI_Selection.h
+ XGUI_SelectionMgr.h
+ XGUI_Tools.h
+ XGUI_ViewerProxy.h
+ XGUI_Workshop.h
+ XGUI_WorkshopListener.h
)
-SET(PROJECT_AUTOMOC
+SET(PROJECT_AUTOMOC
${CMAKE_CURRENT_BINARY_DIR}/XGUI_automoc.cpp
)
SET(PROJECT_SOURCES
- XGUI_Command.cpp
- XGUI_Main.cpp
- XGUI_MainMenu.cpp
- XGUI_MainWindow.cpp
- XGUI_MenuGroupPanel.cpp
- XGUI_Tools.cpp
- XGUI_Workbench.cpp
- XGUI_Workshop.cpp
- XGUI_ViewWindow.cpp
- XGUI_ViewPort.cpp
- XGUI_Viewer.cpp
- XGUI_RubberBand.cpp
- XGUI_ViewBackground.cpp
- XGUI_WidgetFactory.cpp
- XGUI_DocumentDataModel.cpp
+ XGUI_ActionsMgr.cpp
+ XGUI_ColorDialog.cpp
+ XGUI_ContextMenuMgr.cpp
+ XGUI_CustomPrs.cpp
XGUI_DataModel.cpp
+ XGUI_Displayer.cpp
+ XGUI_ErrorDialog.cpp
+ XGUI_ErrorMgr.cpp
+ XGUI_HistoryMenu.cpp
+ XGUI_ModuleConnector.cpp
XGUI_ObjectsBrowser.cpp
+ XGUI_OperationMgr.cpp
+ XGUI_PropertyPanel.cpp
+ XGUI_QtEvents.cpp
+ XGUI_SalomeConnector.cpp
+ XGUI_Selection.cpp
+ XGUI_SelectionMgr.cpp
+ XGUI_Tools.cpp
+ XGUI_ViewerProxy.cpp
+ XGUI_Workshop.cpp
+ XGUI_WorkshopListener.cpp
)
-SET(PROJECT_RESOURCES
+SET(PROJECT_RESOURCES
XGUI_pictures.qrc
)
-#SET(TEXT_RESOURCES
-# XGUI_msg_en.ts
-#)
+SET(PREFERENCES_XML
+ SHAPER.xml
+)
+
+SET(TEXT_RESOURCES
+ XGUI_msg_fr.ts
+)
SET(PROJECT_LIBRARIES
- opengl32
- Event
+ Events
Config
+ ModelAPI
+ ModuleBase
${QT_LIBRARIES}
- ${QT_QTMAIN_LIBRARY}
${CAS_VIEWER}
${CAS_KERNEL}
- PyConsole
- PyInterp
- PyEvent
- ModelAPI
- ModuleBase
+ ${CAS_SHAPE}
+ ${PYTHON_LIBRARIES}
+ ${PyConsole}
+ ${PyInterp}
+ ${suit}
+ ${qtx}
)
+IF(NOT ${HAVE_SALOME})
+ SET(PROJECT_LIBRARIES ${PROJECT_LIBRARIES} AppElements)
+ENDIF(NOT ${HAVE_SALOME})
+
+
+IF(WIN32)
+ SET(PROJECT_LIBRARIES ${PROJECT_LIBRARIES} opengl32)
+ELSE()
+ SET(PROJECT_LIBRARIES ${PROJECT_LIBRARIES} GL)
+ENDIF()
+
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})
-SOURCE_GROUP ("Generated Files" FILES ${PROJECT_AUTOMOC} ${PROJECT_COMPILED_RESOURCES})
-SOURCE_GROUP ("Resource Files" FILES ${TEXT_RESOURCES} ${PROJECT_RESOURCES})
+QT4_CREATE_TRANSLATION(QM_RESOURCES
+ ${PROJECT_SOURCES}
+ ${TEXT_RESOURCES}
+ OPTIONS -extensions cpp -no-recursive
+ )
+
+
+SOURCE_GROUP ("Generated Files" FILES ${PROJECT_AUTOMOC} ${PROJECT_COMPILED_RESOURCES} ${QM_RESOURCES})
+#SOURCE_GROUP ("Generated Files" FILES ${PROJECT_AUTOMOC} ${PROJECT_COMPILED_RESOURCES})
+SOURCE_GROUP ("Resource Files" FILES ${TEXT_RESOURCES} ${PROJECT_RESOURCES} ${PREFERENCES_XML})
+
+ADD_DEFINITIONS( -DXGUI_EXPORTS ${CAS_DEFINITIONS} )
+
+SET(PROJECT_INCLUDES
+ ${PROJECT_SOURCE_DIR}/src/Events
+ ${PROJECT_SOURCE_DIR}/src/Config
+ ${PROJECT_SOURCE_DIR}/src/ModelAPI
+ ${PROJECT_SOURCE_DIR}/src/GeomAPI
+ ${PROJECT_SOURCE_DIR}/src/ModuleBase
+ ${PROJECT_SOURCE_DIR}/src/GeomAlgoAPI
+ ${CAS_INCLUDE_DIRS}
+ ${SUIT_INCLUDE})
-ADD_DEFINITIONS(${CAS_DEFINITIONS} )
+IF(NOT ${HAVE_SALOME})
+ SET(PROJECT_INCLUDES ${PROJECT_INCLUDES} ${APPELEMENTS_INCLUDE_DIR})
+ENDIF(NOT ${HAVE_SALOME})
-INCLUDE_DIRECTORIES (${PROJECT_SOURCE_DIR}/src/Event
- ${PROJECT_SOURCE_DIR}/src/Config
- ${PROJECT_SOURCE_DIR}/src/PyInterp
- ${PROJECT_SOURCE_DIR}/src/PyConsole
- ${PROJECT_SOURCE_DIR}/src/ModelAPI
- ${PROJECT_SOURCE_DIR}/src/ModuleBase
- ${CAS_INCLUDE_DIRS})
+INCLUDE_DIRECTORIES(${PROJECT_INCLUDES})
LINK_DIRECTORIES($ENV{PYTHON_LIB_DIR})
-ADD_EXECUTABLE(XGUI WIN32
- ${PROJECT_SOURCES}
- ${PROJECT_HEADERS}
- ${PROJECT_COMPILED_RESOURCES}
+ADD_LIBRARY(XGUI SHARED
+ ${PROJECT_SOURCES}
+ ${PROJECT_HEADERS}
+ ${PROJECT_COMPILED_RESOURCES}
+ ${TEXT_RESOURCES}
+ ${QM_RESOURCES}
+ ${PREFERENCES_XML}
)
ADD_DEPENDENCIES(XGUI ModelAPI)
# The Qt5Widgets_LIBRARIES variable also includes QtGui and QtCore
TARGET_LINK_LIBRARIES(XGUI ${PROJECT_LIBRARIES})
-INSTALL(TARGETS XGUI DESTINATION bin)
-#INSTALL(FILES ${QM_RESOURCES} DESTINATION bin)
+INSTALL(TARGETS XGUI DESTINATION ${SHAPER_INSTALL_BIN})
+INSTALL(FILES ${QM_RESOURCES} DESTINATION ${SHAPER_INSTALL_QM_RESOURCES})
+INSTALL(FILES ${PREFERENCES_XML} DESTINATION ${SHAPER_INSTALL_RESOURCES})