Salome HOME
Update copyrights 2014.
[samples/light.git] / src / LIGHTGUI / CMakeLists.txt
1 # Copyright (C) 2013-2014  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(UseQt4Ext)
21
22 # --- options ---
23 # additional include directories
24 INCLUDE_DIRECTORIES(
25   ${QT_INCLUDES}
26   ${VTK_INCLUDE_DIRS}
27   ${CAS_INCLUDE_DIRS}
28   ${PYTHON_INCLUDE_DIRS}
29   ${KERNEL_INCLUDE_DIRS}
30   ${GUI_INCLUDE_DIRS}
31   ${PROJECT_BINARY_DIR}
32 )
33
34 # additional preprocessor / compiler flags
35 ADD_DEFINITIONS(
36   ${QT_DEFINITIONS}
37   ${CAS_DEFINITIONS}
38   ${PYTHON_DEFINITIONS}
39 )
40
41 # libraries to link to
42 SET(_link_LIBRARIES
43   ${GUI_LightApp}
44 )
45
46 # --- headers ---
47
48 # header files / to be processed by moc
49 SET(_moc_HEADERS
50   LIGHTGUI.h
51   LIGHTGUI_DataModel.h
52 )
53
54 # header files / no moc processing
55 SET(_other_HEADERS
56   LIGHTGUI_Selection.h
57   LIGHTGUI_DataObject.h
58   LIGHTGUI_TextPrs.hxx
59   LIGHTGUI_Exports.hxx 
60 )
61
62 # header files / to install
63 SET(LIGHT_HEADERS ${_moc_HEADERS} ${_other_HEADERS})
64
65 # --- sources ---
66
67 # sources / moc wrappings
68 QT4_WRAP_CPP(_moc_SOURCES ${_moc_HEADERS})
69
70 # sources / static
71 SET(_other_SOURCES
72   LIGHTGUI.cxx
73   LIGHTGUI_Selection.cxx
74   LIGHTGUI_DataObject.cxx
75   LIGHTGUI_DataModel.cxx
76   LIGHTGUI_TextPrs.cxx
77 )
78
79 # sources / to compile
80 SET(LIGHT_SOURCES ${_other_SOURCES} ${_moc_SOURCES})
81
82 # --- resources ---
83
84 # resource files / to be processed by lrelease
85 SET(_ts_RESOURCES
86   resources/LIGHT_images.ts
87   resources/LIGHT_msg_en.ts
88   resources/LIGHT_msg_fr.ts
89   resources/LIGHT_msg_ja.ts
90
91
92 # --- rules ---
93
94 ADD_LIBRARY(LIGHT ${LIGHT_SOURCES})
95 TARGET_LINK_LIBRARIES(LIGHT ${_link_LIBRARIES} )
96 INSTALL(TARGETS LIGHT EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
97
98 INSTALL(FILES ${LIGHT_HEADERS} DESTINATION ${SALOME_INSTALL_HEADERS})
99 QT4_INSTALL_TS_RESOURCES("${_ts_RESOURCES}" "${SALOME_LIGHT_INSTALL_RES_DATA}")