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