Salome HOME
Copyrights update 2015.
[modules/geom.git] / src / CurveCreator / CMakeLists.txt
1 # Copyright (C) 2012-2015  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, or (at your option) any later version.
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   ${PROJECT_SOURCE_DIR}/src/GEOMUtils
34 )
35
36 # additional preprocessor / compiler flags
37 ADD_DEFINITIONS(
38   ${CAS_DEFINITIONS}
39   ${QT_DEFINITIONS}
40 )
41
42 # libraries to link to
43 SET(_link_LIBRARIES
44   GEOMUtils
45 )
46 IF(SALOME_BUILD_GUI)
47   LIST(APPEND _link_LIBRARIES
48     ${GUI_qtx}
49     ${GUI_suit}
50     ${GUI_OCCViewer}
51   )
52 ENDIF(SALOME_BUILD_GUI)
53
54 # --- headers ---
55
56 IF(SALOME_BUILD_GUI)
57   # header files / to be processed by moc
58   SET(_moc_HEADERS
59     CurveCreator_NewSectionDlg.h
60     CurveCreator_TableView.h
61     CurveCreator_TreeView.h
62     CurveCreator_Widget.h
63   )
64 ENDIF(SALOME_BUILD_GUI)
65
66 # header files / no processing
67 SET(_other_HEADERS
68   CurveCreator.hxx
69   CurveCreator_Curve.hxx
70   CurveCreator_Diff.hxx
71   CurveCreator_Displayer.hxx
72   CurveCreator_ICurve.hxx
73   CurveCreator_Macro.hxx
74   CurveCreator_Operation.hxx
75   CurveCreator_PosPoint.hxx
76   CurveCreator_Section.hxx
77   CurveCreator_UtilsICurve.hxx
78   CurveCreator_Utils.hxx
79 )
80
81 # header files / to install
82 SET(CurveCreator_HEADERS ${_moc_HEADERS} ${_other_HEADERS})
83
84 # --- sources ---
85
86 IF(SALOME_BUILD_GUI)
87   # sources / moc wrappings
88   QT4_WRAP_CPP(_moc_SOURCES ${_moc_HEADERS})
89 ENDIF(SALOME_BUILD_GUI)
90
91 # sources / static
92 SET(_other_SOURCES
93   CurveCreator_Curve.cxx
94   CurveCreator_Diff.cxx
95   CurveCreator_Displayer.cxx
96   CurveCreator_Operation.cxx
97   CurveCreator_Utils.cxx
98   CurveCreator_UtilsICurve.cxx
99 )
100 IF(SALOME_BUILD_GUI)
101   LIST(APPEND _other_SOURCES
102     CurveCreator_NewSectionDlg.cxx
103     CurveCreator_TableView.cxx
104     CurveCreator_TreeView.cxx
105     CurveCreator_Widget.cxx
106   )
107 ENDIF(SALOME_BUILD_GUI)
108
109 # sources / to compile
110 SET(CurveCreator_SOURCES ${_other_SOURCES} ${_moc_SOURCES})
111
112 # --- rules ---
113
114 ADD_LIBRARY(CurveCreator ${CurveCreator_SOURCES})
115 TARGET_LINK_LIBRARIES(CurveCreator ${_link_LIBRARIES})
116 INSTALL(TARGETS CurveCreator EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
117
118 INSTALL(FILES ${CurveCreator_HEADERS} DESTINATION ${SALOME_INSTALL_HEADERS})
119