Salome HOME
c5b850f6b41b5b397f307e001a1e6a0716090580
[modules/geom.git] / src / IGESPlugin / CMakeLists.txt
1 # Copyright (C) 2014-2020  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, 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 IF(SALOME_BUILD_GUI)
21   INCLUDE(UseQtExt)
22 ENDIF()
23
24 # --- options ---
25
26 # additional include directories
27 INCLUDE_DIRECTORIES(
28   ${OpenCASCADE_INCLUDE_DIR}
29   ${KERNEL_INCLUDE_DIRS}
30   ${PROJECT_BINARY_DIR}/idl
31   ${PROJECT_SOURCE_DIR}/src/GEOMAlgo
32   ${PROJECT_SOURCE_DIR}/src/GEOM
33   ${PROJECT_SOURCE_DIR}/src/GEOMImpl
34   ${PROJECT_SOURCE_DIR}/src/GEOM_I
35   ${PROJECT_SOURCE_DIR}/src/GEOMClient
36   ${PROJECT_SOURCE_DIR}/src/GEOMUtils
37   )
38   
39 IF(SALOME_BUILD_GUI)
40   INCLUDE_DIRECTORIES(
41     ${GUI_INCLUDE_DIRS}
42     ${PROJECT_SOURCE_DIR}/src/OBJECT
43     ${PROJECT_SOURCE_DIR}/src/GEOMGUI
44     ${PROJECT_SOURCE_DIR}/src/GEOMBase
45     )
46 ENDIF()
47
48 # additional preprocessor / compiler flags
49 ADD_DEFINITIONS(
50   ${OpenCASCADE_DEFINITIONS}
51   ${OMNIORB_DEFINITIONS}
52   )
53   
54 IF(WIN32)
55   ADD_DEFINITIONS(-DNOGDI)
56 ENDIF(WIN32)
57   
58 IF(SALOME_BUILD_GUI)
59 ADD_DEFINITIONS(
60   ${QT_DEFINITIONS}
61   )
62 ENDIF()
63
64 # libraries to link to
65 SET(_link_engine_LIBRARIES
66   ${OpenCASCADE_DataExchange_LIBRARIES}
67   ${KERNEL_SALOMELocalTrace}
68   ${KERNEL_OpUtil}
69   SalomeIDLGEOM
70   SalomeIDLIGESPlugin
71   GEOMEngine
72   GEOMClient
73   )
74   
75 IF(SALOME_BUILD_GUI)
76   SET(_link_gui_LIBRARIES
77     SalomeIDLIGESPlugin
78     GEOMObject
79     GEOM
80     GEOMBase
81     )
82 ENDIF()
83
84
85 # --- headers ---
86
87 SET(IGESPluginEngine_HEADERS
88   IGESPlugin_IOperations_i.hh
89   IGESPlugin_Engine.hxx
90   IGESPlugin_OperationsCreator.hxx
91   IGESPlugin_IOperations.hxx
92   IGESPlugin_IExport.hxx 
93   IGESPlugin_IImport.hxx
94   IGESPlugin_ImportDriver.hxx 
95   IGESPlugin_ExportDriver.hxx
96   IGESPlugin_IECallBack.hxx
97   )
98
99 IF(SALOME_BUILD_GUI)  
100   # header files / to be processed by moc
101   SET(_moc_HEADERS
102     IGESPlugin_GUI.h
103     IGESPlugin_ExportDlg.h
104     )
105 ENDIF()
106
107 # --- sources ---
108
109 IF(SALOME_BUILD_GUI)
110   # sources / moc wrappings
111   QT_WRAP_MOC(_moc_SOURCES ${_moc_HEADERS})
112
113   SET(IGESPluginGUI_SOURCES
114     IGESPlugin_GUI.cxx
115     IGESPlugin_ExportDlg.cxx
116     ${_moc_SOURCES}
117     )
118 ENDIF()
119   
120 SET(IGESPluginEngine_SOURCES
121   IGESPlugin_Engine.cxx
122   IGESPlugin_OperationsCreator.cxx
123   IGESPlugin_IOperations_i.cc
124   IGESPlugin_IOperations.cxx
125   IGESPlugin_ExportDriver.cxx
126   IGESPlugin_ImportDriver.cxx
127   IGESPlugin_IECallBack.cxx
128   )
129   
130 # resource files / to be processed by lrelease
131 SET(IGESPlugin_RESOURCES
132   IGESPlugin_msg_en.ts
133   IGESPlugin_msg_fr.ts
134   IGESPlugin_msg_ja.ts
135   )
136
137 # --- rules ---
138
139 ADD_LIBRARY(IGESPluginEngine ${IGESPluginEngine_SOURCES})
140 TARGET_LINK_LIBRARIES(IGESPluginEngine ${_link_engine_LIBRARIES})
141 INSTALL(TARGETS IGESPluginEngine EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
142
143 IF(SALOME_BUILD_GUI)
144   ADD_LIBRARY(IGESPluginGUI ${IGESPluginGUI_SOURCES})
145   TARGET_LINK_LIBRARIES(IGESPluginGUI ${_link_gui_LIBRARIES})
146   INSTALL(TARGETS IGESPluginGUI EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
147   
148   QT_INSTALL_TS_RESOURCES("${IGESPlugin_RESOURCES}" "${SALOME_GEOM_INSTALL_RES_DATA}")
149 ENDIF()
150
151
152 INSTALL(FILES ${IGESPluginEngine_HEADERS} DESTINATION ${SALOME_INSTALL_HEADERS})