Salome HOME
Porting ATOMIC module to the CMake build system: initial version.
[samples/atomic.git] / src / ATOMICGUI / 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 INCLUDE(UseQt4Ext)
21
22 # --- options ---
23 # additional include directories
24 INCLUDE_DIRECTORIES(
25   ${QT_INCLUDES}
26   ${CAS_INCLUDE_DIRS}
27   ${GUI_INCLUDE_DIRS}
28   ${PROJECT_BINARY_DIR}
29 )
30
31 # additional preprocessor / compiler flags
32 ADD_DEFINITIONS(
33   ${QT_DEFINITIONS}
34   ${CAS_DEFINITIONS}
35 )
36
37 # libraries to link to
38 SET(_link_LIBRARIES
39   ${QT_LIBRARIES}
40   ${GUI_LightApp}
41 )
42
43 # --- headers ---
44
45 # header files / to be processed by moc
46 SET(_moc_HEADERS
47   ATOMICGUI.h
48   ATOMICGUI_DataModel.h
49   ATOMICGUI_AddAtomDlg.h
50   ATOMICGUI_Operation.h
51   ATOMICGUI_CreateMolOp.h
52   ATOMICGUI_DeleteOp.h
53   ATOMICGUI_RenameOp.h
54   ATOMICGUI_ImportExportOp.h
55   ATOMICGUI_AddAtomOp.h
56 )
57
58 # header files / no moc processing
59 SET(_other_HEADERS
60   ATOMICGUI_Data.h
61   ATOMICGUI_DataObject.h
62   ATOMICGUI_Selection.h
63 )
64
65 # header files / to install
66 SET(ATOMICGUI_HEADERS ${_moc_HEADERS} ${_other_HEADERS})
67
68 # --- sources ---
69
70 # sources / moc wrappings
71 QT4_WRAP_CPP(_moc_SOURCES ${_moc_HEADERS})
72
73 # sources / static
74 SET(_other_SOURCES
75   ATOMICGUI.cxx
76   ATOMICGUI_Data.cxx
77   ATOMICGUI_DataObject.cxx
78   ATOMICGUI_DataModel.cxx
79   ATOMICGUI_AddAtomDlg.cxx
80   ATOMICGUI_Selection.cxx
81   ATOMICGUI_Operation.cxx
82   ATOMICGUI_AddAtomOp.cxx
83   ATOMICGUI_CreateMolOp.cxx
84   ATOMICGUI_RenameOp.cxx
85   ATOMICGUI_DeleteOp.cxx
86   ATOMICGUI_ImportExportOp.cxx
87 )
88
89 # sources / to compile
90 SET(ATOMICGUI_SOURCES ${_other_SOURCES} ${_moc_SOURCES})
91
92 # --- resources ---
93
94 # resource files / to be processed by lrelease
95 SET(_ts_RESOURCES
96   resources/ATOMIC_images.ts
97   resources/ATOMIC_msg_en.ts
98
99
100 # --- rules ---
101
102 ADD_LIBRARY(ATOMIC ${ATOMICGUI_SOURCES})
103 TARGET_LINK_LIBRARIES(ATOMIC ${_link_LIBRARIES} )
104 INSTALL(TARGETS ATOMIC EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
105
106 INSTALL(FILES ${ATOMICGUI_HEADERS} DESTINATION ${SALOME_INSTALL_HEADERS})
107 QT4_INSTALL_TS_RESOURCES("${_ts_RESOURCES}" "${SALOME_ATOMIC_INSTALL_RES_DATA}")