X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FPlot2d%2FCMakeLists.txt;h=e3139103ecf4ae3bc53ccfdab47872f4eaefa261;hb=d0b0c10e5649e0338079df4a53cf95044792d989;hp=713a2713f5fcbbb6bd89c1f9f9c63d1082420947;hpb=373ceb017989dce241907729a6391ce0af8b9dcb;p=modules%2Fgui.git diff --git a/src/Plot2d/CMakeLists.txt b/src/Plot2d/CMakeLists.txt old mode 100755 new mode 100644 index 713a2713f..e3139103e --- a/src/Plot2d/CMakeLists.txt +++ b/src/Plot2d/CMakeLists.txt @@ -1,9 +1,9 @@ -# Copyright (C) 2012 CEA/DEN, EDF R&D, OPEN CASCADE +# Copyright (C) 2012-2022 CEA/DEN, EDF R&D, 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,110 +17,133 @@ # 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( - ${QWT_INCLUDE_DIR} ${QT_INCLUDES} - ${BOOST_INCLUDE_DIRS} + ${QWT_INCLUDE_DIR} ${PYTHON_INCLUDE_DIRS} - ${KERNEL_ROOT_DIR}/include/salome - ${CMAKE_CURRENT_SOURCE_DIR}/../Qtx - ${CMAKE_CURRENT_SOURCE_DIR}/../SUIT + ${PROJECT_SOURCE_DIR}/src/Qtx + ${PROJECT_SOURCE_DIR}/src/SUIT ) +# additional preprocessor / compiler flags ADD_DEFINITIONS(${QT_DEFINITIONS} ${QWT_DEFINITIONS} ${PYTHON_DEFINITIONS}) -SET(COMMON_LIBS ${QWT_LIBRARY} ${QT_LIBRARIES} ${PYTHON_LIBRARIES} suit) +# libraries to link to +SET(_link_LIBRARIES ${QT_LIBRARIES} ${QWT_LIBRARY} ${PYTHON_LIBRARIES} qtx suit) -SET(GUI_HEADERS +# --- headers --- + +# header files / to be processed by moc +SET(_moc_HEADERS + Plot2d_Algorithm.h Plot2d_FitDataDlg.h + Plot2d_NormalizeAlgorithm.h + Plot2d_SetupCurveDlg.h + Plot2d_SetupCurveScaleDlg.h Plot2d_SetupViewDlg.h + Plot2d_ToolTip.h Plot2d_ViewFrame.h Plot2d_ViewManager.h Plot2d_ViewModel.h Plot2d_ViewWindow.h - Plot2d_SetupCurveDlg.h - Plot2d_Algorithm.h - Plot2d_NormalizeAlgorithm.h - Plot2d_SetupCurveScaleDlg.h - Plot2d_ToolTip.h + Plot2d_AnalyticalCurveDlg.h + ) + +# header files / no moc processing +SET(_other_HEADERS + Plot2d.h + Plot2d_Curve.h + Plot2d_Histogram.h + Plot2d_Object.h + Plot2d_PlotItems.h + Plot2d_Prs.h + Plot2d_AnalyticalCurve.h + Plot2d_AnalyticalParser.h + ) + +# header files / to install +SET(Plot2d_HEADERS ${_moc_HEADERS} ${_other_HEADERS}) + +# --- resources --- + +# resource files / to be processed by lrelease +SET(_ts_RESOURCES + resources/Plot2d_images.ts + resources/Plot2d_msg_en.ts + resources/Plot2d_msg_fr.ts + resources/Plot2d_msg_ja.ts ) -SET(Plot2d_SOURCES +# resource files / static +SET(_other_RESOURCES + resources/plot2d_analytical_curve.png + resources/plot2d_camera_dump.png + resources/plot2d_clone.png + resources/plot2d_fitall.png + resources/plot2d_fitarea.png + resources/plot2d_glpan.png + resources/plot2d_legend.png + resources/plot2d_linear.png + resources/plot2d_linear_y.png + resources/plot2d_lines.png + resources/plot2d_lmax_normalization.png + resources/plot2d_lmin_normalization.png + resources/plot2d_log.png + resources/plot2d_log_y.png + resources/plot2d_pan.png + resources/plot2d_points.png + resources/plot2d_print.png + resources/plot2d_rmax_normalization.png + resources/plot2d_rmin_normalization.png + resources/plot2d_settings.png + resources/plot2d_splines.png + resources/plot2d_zoom.png +) + +# --- sources --- + +# sources / moc wrappings +QT_WRAP_MOC(_moc_SOURCES ${_moc_HEADERS}) + +# sources / static +SET(_other_SOURCES Plot2d.cxx - Plot2d_PlotItems.cxx - Plot2d_Object.cxx + Plot2d_Algorithm.cxx Plot2d_Curve.cxx - Plot2d_Histogram.cxx Plot2d_FitDataDlg.cxx + Plot2d_Histogram.cxx + Plot2d_NormalizeAlgorithm.cxx + Plot2d_Object.cxx + Plot2d_PlotItems.cxx Plot2d_Prs.cxx + Plot2d_SetupCurveDlg.cxx + Plot2d_SetupCurveScaleDlg.cxx Plot2d_SetupViewDlg.cxx + Plot2d_ToolTip.cxx Plot2d_ViewFrame.cxx Plot2d_ViewManager.cxx Plot2d_ViewModel.cxx Plot2d_ViewWindow.cxx - Plot2d_Algorithm.cxx - Plot2d_NormalizeAlgorithm.cxx - Plot2d_SetupCurveDlg.cxx - Plot2d_SetupCurveScaleDlg.cxx - Plot2d_ToolTip.cxx -) - -SET(GUITS_SOURCES - resources/Plot2d_images.ts - resources/Plot2d_msg_en.ts - resources/Plot2d_msg_fr.ts -) - -# header files -SET(COMMON_HEADERS_H - Plot2d.h - Plot2d_PlotItems.h - Plot2d_Object.h - Plot2d_Curve.h - Plot2d_Histogram.h - Plot2d_FitDataDlg.h - Plot2d_Prs.h - Plot2d_SetupViewDlg.h - Plot2d_ViewFrame.h - Plot2d_ViewManager.h - Plot2d_ViewModel.h - Plot2d_ViewWindow.h - Plot2d_Algorithm.h - Plot2d_NormalizeAlgorithm.h - Plot2d_SetupCurveDlg.h - Plot2d_ToolTip.h - Plot2d_SetupCurveScaleDlg.h -) - -IF(SALOME_USE_PYCONSOLE) - SET(COMMON_HEADERS_H - ${COMMON_HEADERS_H} - Plot2d_AnalyticalCurve.h - Plot2d_AnalyticalCurveDlg.h - Plot2d_AnalyticalParser.h - ) - SET(Plot2d_SOURCES - ${Plot2d_SOURCES} - Plot2d_AnalyticalCurve.cxx - Plot2d_AnalyticalCurveDlg.cxx - Plot2d_AnalyticalParser.cxx + Plot2d_AnalyticalCurve.cxx + Plot2d_AnalyticalCurveDlg.cxx + Plot2d_AnalyticalParser.cxx ) - SET(GUI_HEADERS - ${GUI_HEADERS} - Plot2d_AnalyticalCurveDlg.h - ) -ENDIF(SALOME_USE_PYCONSOLE) -QT4_WRAP_CPP(GUI_HEADERS_MOC ${GUI_HEADERS}) +# sources / to compile +SET(Plot2d_SOURCES ${_other_SOURCES} ${_moc_SOURCES}) + +# --- rules --- -ADD_LIBRARY(Plot2d ${Plot2d_SOURCES} ${GUI_HEADERS_MOC}) -TARGET_LINK_LIBRARIES(Plot2d ${COMMON_LIBS}) -INSTALL(TARGETS Plot2d DESTINATION ${GUI_salomelib_LIBS}) +ADD_LIBRARY(Plot2d ${Plot2d_SOURCES}) +TARGET_LINK_LIBRARIES(Plot2d ${_link_LIBRARIES}) +INSTALL(TARGETS Plot2d EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS}) -INSTALL(FILES ${COMMON_HEADERS_H} DESTINATION ${GUI_salomeinclude_HEADERS}) -QT4_INSTALL_TS_RESOURCES("${GUITS_SOURCES}" "${GUI_salomeres_DATA}") +INSTALL(FILES ${Plot2d_HEADERS} DESTINATION ${SALOME_INSTALL_HEADERS}) +QT_INSTALL_TS_RESOURCES("${_ts_RESOURCES}" "${SALOME_GUI_INSTALL_RES_DATA}") -FILE(GLOB GUIPNG_DATA "${CMAKE_CURRENT_SOURCE_DIR}/resources/*.png") -INSTALL(FILES ${GUIPNG_DATA} DESTINATION ${GUI_salomeres_DATA}) +INSTALL(FILES ${_other_RESOURCES} DESTINATION ${SALOME_GUI_INSTALL_RES_DATA})