Salome HOME
Migration to OpenCASCADE CMake configuration
[samples/sierpinsky.git] / src / SierpinskyGUI / CMakeLists.txt
1 # Copyright (C) 2012-2016  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   ${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   ${OpenCASCADE_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(_moc_HEADERS
61   SierpinskyGUI_RunDlg.h
62   SierpinskyGUI.h
63 )
64
65 SET(_other_HEADERS
66   SierpinskyGUI.hxx
67 )
68
69 SET (SIERPINSKY_HEADERS ${_moc_HEADERS} ${_other_HEADERS})
70
71 # --- sources ---
72
73 # sources / moc wrappings
74 QT_WRAP_MOC(_moc_SOURCES ${_moc_HEADERS})
75
76 # sources / static
77 SET(_other_SOURCES
78   SierpinskyGUI.cxx
79   SierpinskyGUI_RunDlg.cxx
80 )
81
82 # sources / to compile
83 SET(SIERPINSKY_SOURCES ${_other_SOURCES} ${_moc_SOURCES})
84
85 # --- resources ---
86
87 # resource files / to be processed by lrelease
88 SET(_ts_RESOURCES
89   SIERPINSKY_icons.ts
90   SIERPINSKY_msg_en.ts
91   SIERPINSKY_msg_fr.ts
92
93
94 # --- rules ---
95
96 ADD_LIBRARY(SIERPINSKY ${SIERPINSKY_SOURCES})
97 TARGET_LINK_LIBRARIES(SIERPINSKY ${_link_LIBRARIES} )
98 INSTALL(TARGETS SIERPINSKY EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
99
100 INSTALL(FILES ${SIERPINSKY_HEADERS} DESTINATION ${SALOME_INSTALL_HEADERS})
101 QT_INSTALL_TS_RESOURCES("${_ts_RESOURCES}" "${SALOME_SIERPINSKY_INSTALL_RES_DATA}")