]> SALOME platform Git repositories - modules/geom.git/blob - src/STEPPlugin/CMakeLists.txt
Salome HOME
Merge branch 'V8_0_BR'
[modules/geom.git] / src / STEPPlugin / CMakeLists.txt
1 # Copyright (C) 2014-2015  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   ${CAS_INCLUDE_DIRS}
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   ${CAS_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   ${CAS_TKSTEP}
67   ${CAS_TKSTEPBase}
68   ${KERNEL_SALOMELocalTrace}
69   ${KERNEL_OpUtil}
70   SalomeIDLGEOM
71   SalomeIDLSTEPPlugin
72   GEOMEngine
73   GEOMClient
74   )
75   
76 IF(SALOME_BUILD_GUI)
77   SET(_link_gui_LIBRARIES
78     SalomeIDLSTEPPlugin
79     GEOMObject
80     GEOM
81     GEOMBase
82     )
83 ENDIF()
84
85
86 # --- headers ---
87
88 SET(STEPPluginEngine_HEADERS
89   STEPPlugin_IOperations_i.hh
90   STEPPlugin_Engine.hxx
91   STEPPlugin_OperationsCreator.hxx
92   STEPPlugin_IOperations.hxx
93   STEPPlugin_IExport.hxx 
94   STEPPlugin_IImport.hxx
95   STEPPlugin_ImportDriver.hxx 
96   STEPPlugin_ExportDlg.h
97   STEPPlugin_ExportDriver.hxx
98   STEPPlugin_IECallBack.hxx
99   )
100
101 IF(SALOME_BUILD_GUI)  
102   # header files / to be processed by moc
103   SET(_moc_HEADERS
104     STEPPlugin_GUI.h
105     STEPPlugin_ExportDlg.h
106     )
107 ENDIF()
108
109 # --- sources ---
110
111 IF(SALOME_BUILD_GUI)
112   # sources / moc wrappings
113   QT_WRAP_MOC(_moc_SOURCES ${_moc_HEADERS})
114
115   SET(STEPPluginGUI_SOURCES
116     STEPPlugin_GUI.cxx
117     STEPPlugin_ExportDlg.cxx
118     ${_moc_SOURCES}
119     )
120 ENDIF()
121   
122 SET(STEPPluginEngine_SOURCES
123   STEPPlugin_Engine.cxx
124   STEPPlugin_OperationsCreator.cxx
125   STEPPlugin_IOperations_i.cc
126   STEPPlugin_IOperations.cxx
127   STEPPlugin_ExportDriver.cxx
128   STEPPlugin_ImportDriver.cxx
129   STEPPlugin_IECallBack.cxx
130   )
131   
132 # resource files / to be processed by lrelease
133 SET(STEPPlugin_RESOURCES
134   STEPPlugin_msg_en.ts
135   STEPPlugin_msg_fr.ts
136   STEPPlugin_msg_ja.ts
137   )
138
139 # --- rules ---
140
141 ADD_LIBRARY(STEPPluginEngine ${STEPPluginEngine_SOURCES})
142 TARGET_LINK_LIBRARIES(STEPPluginEngine ${_link_engine_LIBRARIES})
143 INSTALL(TARGETS STEPPluginEngine EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
144
145 IF(SALOME_BUILD_GUI)
146   ADD_LIBRARY(STEPPluginGUI ${STEPPluginGUI_SOURCES})
147   TARGET_LINK_LIBRARIES(STEPPluginGUI ${_link_gui_LIBRARIES})
148   INSTALL(TARGETS STEPPluginGUI EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
149
150   QT_INSTALL_TS_RESOURCES("${STEPPlugin_RESOURCES}" "${SALOME_GEOM_INSTALL_RES_DATA}")
151 ENDIF()
152
153
154 INSTALL(FILES ${STEPPluginEngine_HEADERS} DESTINATION ${SALOME_INSTALL_HEADERS})