X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FHYDROCurveCreator%2FCMakeLists.txt;h=e225ade5d26b8ea9eebaea1e31ff54c358c06851;hb=1f844eb06506171b54541cc0caf1a0c237fe0dbf;hp=5b29efdf76e0ce6ec45a73b2064384ebbdc39b37;hpb=e55d1238c471b9e94b25443d804e75c8cd14ea5d;p=modules%2Fhydro.git diff --git a/src/HYDROCurveCreator/CMakeLists.txt b/src/HYDROCurveCreator/CMakeLists.txt index 5b29efdf..e225ade5 100644 --- a/src/HYDROCurveCreator/CMakeLists.txt +++ b/src/HYDROCurveCreator/CMakeLists.txt @@ -1,17 +1,36 @@ - -include(../../CMake/Common.cmake) -include(../../CMake/UseQT4EXT.cmake) +# Copyright (C) 2012-2013 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. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +# + +IF(SALOME_BUILD_GUI) + INCLUDE(${QT_USE_FILE}) +ENDIF(SALOME_BUILD_GUI) # --- options --- # additional include directories INCLUDE_DIRECTORIES( - ${QT_INCLUDES} + ${QT_INCLUDE_DIRS} ${PTHREAD_INCLUDE_DIR} ${CAS_INCLUDE_DIRS} ${KERNEL_INCLUDE_DIRS} - ${GEOM_ROOT_DIR}/include/salome - ${GUI_ROOT_DIR}/include/salome + ${GUI_INCLUDE_DIRS} + ${GEOM_INCLUDE_DIRS} ) # additional preprocessor / compiler flags @@ -23,67 +42,76 @@ ADD_DEFINITIONS( # libraries to link to SET(_link_LIBRARIES - ${QT_LIBRARIES} - ${qtx} - ${suit} - ${OCCViewer} ${GEOM_GEOMUtils} - ${CAS_TKV3d} ${CAS_TKBRep} ${CAS_TKService} ) +IF(SALOME_BUILD_GUI) + LIST(APPEND _link_LIBRARIES + ${GUI_qtx} + ${GUI_suit} + ${GUI_OCCViewer} + ) +ENDIF(SALOME_BUILD_GUI) # --- headers --- -# header files / to be processed by moc -SET(_moc_HEADERS +IF(SALOME_BUILD_GUI) + # header files / to be processed by moc + SET(_moc_HEADERS CurveCreator_NewSectionDlg.h CurveCreator_TreeView.h # CurveCreator_UndoOptsDlg.h CurveCreator_Widget.h -) + ) +ENDIF(SALOME_BUILD_GUI) # header files / no processing SET(_other_HEADERS CurveCreator.hxx + CurveCreator_Displayer.h CurveCreator_Curve.hxx CurveCreator_Diff.hxx CurveCreator_ICurve.hxx - CurveCreator_Listener.hxx CurveCreator_Macro.hxx CurveCreator_Operation.hxx CurveCreator_Section.hxx + CurveCreator_Utils.h ) # header files / to install -SET(CurveCreator_HEADERS ${_moc_HEADERS} ${_other_HEADERS}) +SET(HYDROCurveCreator_HEADERS ${_moc_HEADERS} ${_other_HEADERS}) # --- sources --- -# sources / moc wrappings -QT4_WRAP_CPP(_moc_SOURCES ${_moc_HEADERS}) +IF(SALOME_BUILD_GUI) + # sources / moc wrappings + QT4_WRAP_CPP(_moc_SOURCES ${_moc_HEADERS}) +ENDIF(SALOME_BUILD_GUI) # sources / static SET(_other_SOURCES + CurveCreator_Displayer.cxx CurveCreator_Curve.cxx CurveCreator_Diff.cxx CurveCreator_Operation.cxx + CurveCreator_Utils.cxx ) - -LIST(APPEND _other_SOURCES +IF(SALOME_BUILD_GUI) + LIST(APPEND _other_SOURCES CurveCreator_NewSectionDlg.cxx CurveCreator_TreeView.cxx # CurveCreator_UndoOptsDlg.cxx CurveCreator_Widget.cxx ) +ENDIF(SALOME_BUILD_GUI) # sources / to compile -SET(CurveCreator_SOURCES ${_other_SOURCES} ${_moc_SOURCES}) +SET(HYDROCurveCreator_SOURCES ${_other_SOURCES} ${_moc_SOURCES}) # --- rules --- -ADD_LIBRARY(HYDROCurveCreator SHARED ${CurveCreator_SOURCES} ${CurveCreator_HEADERS}) -TARGET_LINK_LIBRARIES(HYDROCurveCreator ${_link_LIBRARIES}) +ADD_LIBRARY(HYDROCurveCreator ${HYDROCurveCreator_SOURCES} ${HYDROCurveCreator_HEADERS}) +TARGET_LINK_LIBRARIES(HYDROCurveCreator ${_link_LIBRARIES} ${CAS_TKGeomAlgo}) +INSTALL(TARGETS HYDROCurveCreator EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS}) -set(PROJECT_HEADERS ${CurveCreator_SOURCES}) -set(PROJECT_LIBRARIES HYDROCurveCreator) +INSTALL(FILES ${HYDROCurveCreator_HEADERS} DESTINATION ${SALOME_INSTALL_HEADERS}) -include(../../CMake/CommonInstall.cmake)