Salome HOME
Bug #202 - Fatal error during polyline creation
[modules/hydro.git] / src / HYDROCurveCreator / CMakeLists.txt
1 # Copyright (C) 2012-2013  CEA/DEN, EDF R&D, OPEN CASCADE
2 #
3 # This library is free software; you can redistribute it and/or
4 # modify it under the terms of the GNU Lesser General Public
5 # License as published by the Free Software Foundation; either
6 # version 2.1 of the License.
7 #
8 # This library is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
11 # Lesser General Public License for more details.
12 #
13 # You should have received a copy of the GNU Lesser General Public
14 # License along with this library; if not, write to the Free Software
15 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
16 #
17 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
18 #
19
20 IF(SALOME_BUILD_GUI)
21   INCLUDE(${QT_USE_FILE})
22 ENDIF(SALOME_BUILD_GUI)
23
24 # --- options ---
25
26 # additional include directories
27 INCLUDE_DIRECTORIES(
28   ${QT_INCLUDE_DIRS}
29   ${PTHREAD_INCLUDE_DIR}
30   ${CAS_INCLUDE_DIRS}
31   ${KERNEL_INCLUDE_DIRS}
32   ${GUI_INCLUDE_DIRS}
33   ${GEOM_INCLUDE_DIRS}
34 )
35
36 # additional preprocessor / compiler flags
37 ADD_DEFINITIONS(
38   -DCURVECREATOR_EXPORTS
39   ${CAS_DEFINITIONS}
40   ${QT_DEFINITIONS}
41 )
42
43 # libraries to link to
44 SET(_link_LIBRARIES
45   ${GEOM_GEOMUtils}
46 )
47 IF(SALOME_BUILD_GUI)
48   LIST(APPEND _link_LIBRARIES
49     ${GUI_qtx}
50     ${GUI_suit}
51     ${GUI_OCCViewer}
52   )
53 ENDIF(SALOME_BUILD_GUI)
54
55 # --- headers ---
56
57 IF(SALOME_BUILD_GUI)
58   # header files / to be processed by moc
59   SET(_moc_HEADERS
60     CurveCreator_NewSectionDlg.h
61     CurveCreator_TableView.h
62     CurveCreator_TreeView.h
63 #    CurveCreator_UndoOptsDlg.h
64     CurveCreator_Widget.h
65     OCCViewer_Utilities.h
66   )
67 ENDIF(SALOME_BUILD_GUI)
68
69 # header files / no processing
70 SET(_other_HEADERS
71   CurveCreator.hxx
72   CurveCreator_Displayer.h
73   CurveCreator_Curve.hxx
74   CurveCreator_Diff.hxx
75   CurveCreator_ICurve.hxx
76   CurveCreator_Macro.hxx
77   CurveCreator_Operation.hxx
78   CurveCreator_Section.hxx
79   CurveCreator_Utils.h
80   CurveCreator_UtilsICurve.hxx
81   CurveCreator_PosPoint.hxx
82   CurveCreator_Profile.hxx
83 )
84
85 # header files / to install
86 SET(HYDROCurveCreator_HEADERS ${_moc_HEADERS} ${_other_HEADERS})
87
88 # --- sources ---
89
90 IF(SALOME_BUILD_GUI)
91   # sources / moc wrappings
92   QT4_WRAP_CPP(_moc_SOURCES ${_moc_HEADERS})
93 ENDIF(SALOME_BUILD_GUI)
94
95 # sources / static
96 SET(_other_SOURCES
97   CurveCreator_Displayer.cxx
98   CurveCreator_Curve.cxx
99   CurveCreator_Diff.cxx
100   CurveCreator_Operation.cxx
101   CurveCreator_Utils.cxx
102   CurveCreator_UtilsICurve.cxx
103   CurveCreator_Profile.cxx
104 )
105 IF(SALOME_BUILD_GUI)
106   LIST(APPEND _other_SOURCES
107     CurveCreator_NewSectionDlg.cxx
108     CurveCreator_TableView.cxx
109     CurveCreator_TreeView.cxx
110 #    CurveCreator_UndoOptsDlg.cxx
111     CurveCreator_Widget.cxx
112     OCCViewer_Utilities.cxx
113   )
114 ENDIF(SALOME_BUILD_GUI)
115
116 # sources / to compile
117 SET(HYDROCurveCreator_SOURCES ${_other_SOURCES} ${_moc_SOURCES})
118
119 # --- rules ---
120
121 ADD_LIBRARY(HYDROCurveCreator ${HYDROCurveCreator_SOURCES} ${HYDROCurveCreator_HEADERS})
122 TARGET_LINK_LIBRARIES(HYDROCurveCreator ${_link_LIBRARIES} ${CAS_TKGeomAlgo})
123 INSTALL(TARGETS HYDROCurveCreator EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
124
125 INSTALL(FILES ${HYDROCurveCreator_HEADERS} DESTINATION ${SALOME_INSTALL_HEADERS})
126