X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FPlot2d%2FCMakeLists.txt;h=b70709226b4b6f043716236f2d095a0cb5cdd09d;hb=efe3cdefadc31ad9cdaa9fd7fc368e2931cebdf1;hp=669455b41e78ca51ad66053c74be848908f14c85;hpb=8c5294030a4c11ca0a18be48fc0165466861adad;p=modules%2Fgui.git diff --git a/src/Plot2d/CMakeLists.txt b/src/Plot2d/CMakeLists.txt index 669455b41..b70709226 100755 --- 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-2016 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_DIRS} - ${QT_INCLUDE_DIRS} - ${BOOST_INCLUDE_DIRS} + ${QT_INCLUDES} + ${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 ) -SET(COMMON_FLAGS "${QT_DEFINITIONS} ${QWT_DEFINITIONS} ${PYTHON_DEFINITIONS} ${PLATFORM_DEFINITIONS}") -SET(COMMON_LIBS ${QWT_LIBS} ${QT_MT_LIBS} ${PYTHON_LIBS} suit) +# additional preprocessor / compiler flags +ADD_DEFINITIONS(${QT_DEFINITIONS} ${QWT_DEFINITIONS} ${PYTHON_DEFINITIONS}) + +# libraries to link to +SET(_link_LIBRARIES ${QT_LIBRARIES} ${QWT_LIBRARY} ${PYTHON_LIBRARIES} qtx suit) + +# --- headers --- -SET(GUI_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 +) + +# 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 ) -SET(Plot2d_SOURCES +# --- 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(ENABLE_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(ENABLE_PYCONSOLE) -QT4_WRAP_CPP(GUI_HEADERS_MOC ${GUI_HEADERS}) +# sources / to compile +SET(Plot2d_SOURCES ${_other_SOURCES} ${_moc_SOURCES}) + +# --- rules --- -ADD_LIBRARY(Plot2d SHARED ${Plot2d_SOURCES} ${GUI_HEADERS_MOC}) -SET_TARGET_PROPERTIES(Plot2d PROPERTIES COMPILE_FLAGS "${COMMON_FLAGS}") -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})