Salome HOME
Deleted check after build for transformations.
[modules/shaper.git] / src / ModuleBase / CMakeLists.txt
index 7ff157483b100c09364b88cac572cd5837919885..1257a139937e9bc116c916187a542d2ec48850ca 100644 (file)
@@ -1,7 +1,15 @@
 ## Copyright (C) 2014-20xx CEA/DEN, EDF R&D
 
 INCLUDE(Common)
-SET(CMAKE_AUTOMOC ON)
+INCLUDE(UseQtExt)
+
+# --- options ---
+
+# additional include directories
+INCLUDE_DIRECTORIES(${QT_INCLUDES})
+
+# additional preprocessor / compiler flags
+ADD_DEFINITIONS(${QT_DEFINITIONS})
 
 SET(PROJECT_HEADERS
   ModuleBase.h
@@ -10,7 +18,6 @@ SET(PROJECT_HEADERS
   ModuleBase_DoubleSpinBox.h
   ModuleBase_Events.h
   ModuleBase_Filter.h
-  ModuleBase_FilterFactory.h
   ModuleBase_FilterValidated.h
   ModuleBase_IErrorMgr.h
   ModuleBase_IModule.h
@@ -22,6 +29,7 @@ SET(PROJECT_HEADERS
   ModuleBase_IViewer.h
   ModuleBase_IWidgetCreator.h
   ModuleBase_IWorkshop.h
+  ModuleBase_LabelValue.h
   ModuleBase_ModelWidget.h
   ModuleBase_Operation.h
   ModuleBase_OperationAction.h
@@ -53,6 +61,7 @@ SET(PROJECT_HEADERS
   ModuleBase_WidgetFileSelector.h
   ModuleBase_WidgetIntValue.h
   ModuleBase_WidgetLabel.h
+  ModuleBase_WidgetLabelValue.h
   ModuleBase_WidgetLineEdit.h
   ModuleBase_WidgetMultiSelector.h
   ModuleBase_WidgetOptionalBox.h
@@ -68,11 +77,54 @@ SET(PROJECT_HEADERS
   ModuleBase_ModelDialogWidget.h
 )
 
+SET(PROJECT_MOC_HEADERS
+  ModuleBase_Dialog.h
+  ModuleBase_DoubleSpinBox.h
+  ModuleBase_IErrorMgr.h
+  ModuleBase_IModule.h
+  ModuleBase_IntSpinBox.h
+  ModuleBase_IPropertyPanel.h
+  ModuleBase_IViewer.h
+  ModuleBase_IWorkshop.h
+  ModuleBase_LabelValue.h
+  ModuleBase_ModelDialogWidget.h
+  ModuleBase_ModelWidget.h
+  ModuleBase_Operation.h
+  ModuleBase_OperationAction.h
+  ModuleBase_OperationFeature.h
+  ModuleBase_PagedContainer.h
+  ModuleBase_PageGroupBox.h
+  ModuleBase_PageWidget.h
+  ModuleBase_ParamIntSpinBox.h
+  ModuleBase_ParamSpinBox.h
+  ModuleBase_Preferences.h
+  ModuleBase_ToolBox.h
+  ModuleBase_WidgetAction.h
+  ModuleBase_WidgetBoolValue.h
+  ModuleBase_WidgetChoice.h
+  ModuleBase_WidgetConcealedObjects.h
+  ModuleBase_WidgetDoubleValue.h
+  ModuleBase_WidgetEditor.h
+  ModuleBase_WidgetExprEditor.h
+  ModuleBase_WidgetFeatureSelector.h
+  ModuleBase_WidgetFileSelector.h
+  ModuleBase_WidgetIntValue.h
+  ModuleBase_WidgetLabel.h
+  ModuleBase_WidgetLabelValue.h
+  ModuleBase_WidgetLineEdit.h
+  ModuleBase_WidgetMultiSelector.h
+  ModuleBase_WidgetOptionalBox.h
+  ModuleBase_WidgetSelector.h
+  ModuleBase_WidgetShapeSelector.h
+  ModuleBase_WidgetSwitch.h
+  ModuleBase_WidgetToolbox.h
+  ModuleBase_WidgetValidated.h
+)
+
 SET(PROJECT_SOURCES
   ModuleBase_ActionInfo.cpp
   ModuleBase_DoubleSpinBox.cpp
   ModuleBase_Filter.cpp
-  ModuleBase_FilterFactory.cpp
   ModuleBase_FilterValidated.cpp
   ModuleBase_IErrorMgr.cpp
   ModuleBase_IModule.cpp
@@ -84,6 +136,7 @@ SET(PROJECT_SOURCES
   ModuleBase_IViewer.cpp
   ModuleBase_IWidgetCreator.cpp
   ModuleBase_IWorkshop.cpp
+  ModuleBase_LabelValue.cpp
   ModuleBase_ModelWidget.cpp
   ModuleBase_Operation.cpp
   ModuleBase_OperationAction.cpp
@@ -114,6 +167,7 @@ SET(PROJECT_SOURCES
   ModuleBase_WidgetFileSelector.cpp
   ModuleBase_WidgetIntValue.cpp
   ModuleBase_WidgetLabel.cpp
+  ModuleBase_WidgetLabelValue.cpp
   ModuleBase_WidgetLineEdit.cpp
   ModuleBase_WidgetMultiSelector.cpp
   ModuleBase_WidgetOptionalBox.cpp
@@ -146,11 +200,9 @@ SET(PROJECT_LIBRARIES
        ${ViewerData}
 )
 
-SET(PROJECT_AUTOMOC
-    ${CMAKE_CURRENT_BINARY_DIR}/ModuleBase_automoc.cpp
-)
+# sources / moc wrappings
+QT_WRAP_MOC(PROJECT_AUTOMOC ${PROJECT_MOC_HEADERS})
 
-#QT5_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})
@@ -168,8 +220,12 @@ INCLUDE_DIRECTORIES(
     ${SUIT_INCLUDE}
 )
 
+IF(${HAVE_SALOME})
+  INCLUDE_DIRECTORIES(${SALOME_KERNEL_INCLUDE})
+ENDIF(${HAVE_SALOME})
+
 ADD_DEFINITIONS(-DMODULEBASE_EXPORTS ${CAS_DEFINITIONS})
-ADD_LIBRARY(ModuleBase SHARED ${PROJECT_SOURCES} ${PROJECT_HEADERS})
+ADD_LIBRARY(ModuleBase SHARED ${PROJECT_SOURCES} ${PROJECT_HEADERS} ${PROJECT_AUTOMOC})
 TARGET_LINK_LIBRARIES(ModuleBase GeomAPI ${PROJECT_LIBRARIES})
 
 INSTALL(TARGETS ModuleBase DESTINATION ${SHAPER_INSTALL_BIN})