Salome HOME
CMake:
[samples/sierpinsky.git] / src / SierpinskyGUI / 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   ${VTK_INCLUDES}
28   ${KERNEL_INCLUDE_DIRS}
29   ${SMESH_INCLUDE_DIRS}
30   ${RANDOMIZER_INCLUDE_DIRS}
31   ${GUI_INCLUDE_DIRS}
32   ${OMNIORB_INCLUDE_DIR}
33   ${Boost_INCLUDE_DIRS}
34   ${CMAKE_CURRENT_SOURCE_DIR}
35   ${PROJECT_BINARY_DIR}
36   ${PROJECT_BINARY_DIR}/idl
37   ${PROJECT_SOURCE_DIR}/src/Sierpinsky
38 )
39
40 # additional preprocessor / compiler flags
41 ADD_DEFINITIONS(
42   ${BOOST_DEFINITIONS}
43   ${OMNIORB_DEFINITIONS}
44   ${CAS_DEFINITIONS}
45   ${KERNEL_DEFINITIONS}
46 )
47
48 # libraries to link to
49 SET(_link_LIBRARIES
50   ${QT_LIBS}
51   ${KERNEL_SalomeLifeCycleCORBA}
52   ${GUI_SalomeApp}
53   ${RANDOMIZER_SalomeIDLRANDOMIZER}
54   SIERPINSKYEngine
55 )
56
57 # --- headers ---
58
59 # header files / to be processed by moc
60 SET(SIERPINSKY_HEADERS
61   SierpinskyGUI_RunDlg.h
62   SierpinskyGUI.h
63 )
64
65 # --- sources ---
66
67 # sources / moc wrappings
68 QT4_WRAP_CPP(_moc_SOURCES ${SIERPINSKY_HEADERS})
69
70 # sources / static
71 SET(_other_SOURCES
72   SierpinskyGUI.cxx
73   SierpinskyGUI_RunDlg.cxx
74 )
75
76 # sources / to compile
77 SET(SIERPINSKY_SOURCES ${_other_SOURCES} ${_moc_SOURCES})
78
79 # --- resources ---
80
81 # resource files / to be processed by lrelease
82 SET(_ts_RESOURCES
83   SIERPINSKY_icons.ts
84   SIERPINSKY_msg_en.ts
85   SIERPINSKY_msg_fr.ts
86
87
88 # --- rules ---
89
90 ADD_LIBRARY(SIERPINSKY ${SIERPINSKY_SOURCES})
91 TARGET_LINK_LIBRARIES(SIERPINSKY ${_link_LIBRARIES} )
92 INSTALL(TARGETS SIERPINSKY EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
93
94 INSTALL(FILES ${SIERPINSKY_HEADERS} DESTINATION ${SALOME_INSTALL_HEADERS})
95 QT4_INSTALL_TS_RESOURCES("${_ts_RESOURCES}" "${SALOME_SIERPINSKY_INSTALL_RES_DATA}")