Salome HOME
f4396833b42768d96971be056af1d89f0bc1d2fa
[samples/atomic.git] / src / ATOMICGUI / CMakeLists.txt
1 # Copyright (C) 2013-2020  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 INCLUDE(UseQtExt)
21
22 # --- options ---
23 # additional include directories
24 INCLUDE_DIRECTORIES(
25   ${QT_INCLUDES}
26   ${OpenCASCADE_INCLUDE_DIR}
27   ${GUI_INCLUDE_DIRS}
28   ${PROJECT_BINARY_DIR}
29 )
30
31 # additional preprocessor / compiler flags
32 ADD_DEFINITIONS(
33   ${QT_DEFINITIONS}
34   ${OpenCASCADE_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   ATOMICGUI_ATOMICGUI.hxx
64 )
65
66 # header files / to install
67 SET(ATOMICGUI_HEADERS ${_moc_HEADERS} ${_other_HEADERS})
68
69 # --- sources ---
70
71 # sources / moc wrappings
72 QT_WRAP_MOC(_moc_SOURCES ${_moc_HEADERS})
73
74 # sources / static
75 SET(_other_SOURCES
76   ATOMICGUI.cxx
77   ATOMICGUI_Data.cxx
78   ATOMICGUI_DataObject.cxx
79   ATOMICGUI_DataModel.cxx
80   ATOMICGUI_AddAtomDlg.cxx
81   ATOMICGUI_Selection.cxx
82   ATOMICGUI_Operation.cxx
83   ATOMICGUI_AddAtomOp.cxx
84   ATOMICGUI_CreateMolOp.cxx
85   ATOMICGUI_RenameOp.cxx
86   ATOMICGUI_DeleteOp.cxx
87   ATOMICGUI_ImportExportOp.cxx  
88 )
89
90 # sources / to compile
91 SET(ATOMICGUI_SOURCES ${_other_SOURCES} ${_moc_SOURCES})
92
93 # --- resources ---
94
95 # resource files / to be processed by lrelease
96 SET(_ts_RESOURCES
97   resources/ATOMIC_images.ts
98   resources/ATOMIC_msg_en.ts
99   resources/ATOMIC_msg_ja.ts
100
101
102 # --- rules ---
103
104 ADD_LIBRARY(ATOMIC ${ATOMICGUI_SOURCES})
105 TARGET_LINK_LIBRARIES(ATOMIC ${_link_LIBRARIES} )
106 INSTALL(TARGETS ATOMIC EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
107
108 INSTALL(FILES ${ATOMICGUI_HEADERS} DESTINATION ${SALOME_INSTALL_HEADERS})
109 QT_INSTALL_TS_RESOURCES("${_ts_RESOURCES}" "${SALOME_ATOMIC_INSTALL_RES_DATA}")