Salome HOME
Update copyrights 2014.
[modules/yacs.git] / src / salomegui / CMakeLists.txt
1 # Copyright (C) 2012-2014  CEA/DEN, EDF R&D
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 INCLUDE(${QT_USE_FILE})
22
23 # --- options ---
24
25 IF(SALOME_YACS_USE_KERNEL)
26   SET(SALOME_INCL_PATH ${KERNEL_INCLUDE_DIRS})
27 ENDIF(SALOME_YACS_USE_KERNEL)
28
29 # additional include directories
30 INCLUDE_DIRECTORIES(
31   ${OMNIORB_INCLUDE_DIR}
32   ${LIBXML2_INCLUDE_DIR}
33   ${SALOME_INCL_PATH}
34   ${GUI_INCLUDE_DIRS}
35   ${PROJECT_SOURCE_DIR}/src/bases
36   ${PROJECT_SOURCE_DIR}/src/engine
37   ${PROJECT_SOURCE_DIR}/src/runtime
38   ${PROJECT_SOURCE_DIR}/src/yacsloader
39   ${PROJECT_SOURCE_DIR}/src/hmi
40   ${PROJECT_SOURCE_DIR}/src/salomewrap
41   ${PROJECT_SOURCE_DIR}/src/genericgui
42   ${PROJECT_BINARY_DIR}/src/genericgui
43   ${PROJECT_BINARY_DIR}/idl
44   )
45
46 # additional preprocessor / compiler flags
47 ADD_DEFINITIONS(
48   ${PYTHON_DEFINITIONS}
49   ${OMNIORB_DEFINITIONS}
50   ${BOOST_DEFINITIONS}
51   ${QT_DEFINITIONS}
52   ${QSCINTILLA_DEFINITIONS}
53   ${GRAPHVIZ_DEFINITIONS}
54   )
55 IF(WIN32)
56   ADD_DEFINITIONS(-DNOGDI)
57 ENDIF(WIN32)
58
59 # libraries to link to
60 SET(_link_LIBRARIES
61   GenericGui
62   ${QT_LIBRARIES}
63   ${QSCINTILLA_LIBRARIES}
64   ${GUI_Event}
65   ${GUI_SalomeApp}
66   ${GUI_SalomeSession}
67   )
68
69 # --- resources ---
70
71 # resource files / to be processed by lrelease
72 SET(YACS_RESOURCES
73   resources/YACS_icons.ts
74   resources/YACS_msg_en.ts
75   resources/YACS_msg_fr.ts
76   resources/YACS_msg_ja.ts
77 )
78
79 SET(_res_files
80   resources/YACSSchemaCatalog.xml
81   resources/ModuleYacs.png
82   resources/ExecYACS.png
83   )
84
85 # --- headers ---
86
87 SET(YACS_HEADERS
88   YACSExport.hxx
89   Yacsgui.hxx
90   )
91
92 # header files / to be processed by moc
93 SET(_moc_HEADERS
94   Yacsgui.hxx
95   )
96
97 # header files / uic wrappings
98 QT4_WRAP_UI(_uic_HEADERS ${_uic_files})
99
100 # --- sources ---
101
102 # sources / moc wrappings
103 QT4_WRAP_CPP(_moc_SOURCES ${_moc_HEADERS})
104
105 SET(YACS_SOURCES
106   Yacsgui.cxx
107   Yacsgui_DataModel.hxx
108   Yacsgui_Resource.cxx
109   Yacsgui_Resource.hxx
110   Yacsgui_DataModel.cxx
111   ${_moc_SOURCES}
112   )
113
114 # --- rules ---
115
116 ADD_LIBRARY(YACS ${YACS_SOURCES})
117 TARGET_LINK_LIBRARIES(YACS ${_link_LIBRARIES})
118 INSTALL(TARGETS YACS EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
119
120 INSTALL(FILES ${YACS_HEADERS} DESTINATION ${SALOME_INSTALL_HEADERS})
121 QT4_INSTALL_TS_RESOURCES("${YACS_RESOURCES}" "${SALOME_YACS_INSTALL_RES_DATA}") 
122
123 INSTALL(FILES ${_res_files} DESTINATION ${SALOME_YACS_INSTALL_RES_DATA})
124 SALOME_CONFIGURE_FILE(resources/YACSCatalog.xml.in 
125                       resources/YACSCatalog.xml 
126                       INSTALL ${SALOME_YACS_INSTALL_RES_DATA})
127 SALOME_CONFIGURE_FILE(resources/SalomeApp.xml.in 
128                       resources/SalomeApp.xml 
129                       INSTALL ${SALOME_YACS_INSTALL_RES_DATA})