Salome HOME
0023125: EDF 11112 GEOM: Choose the unity of length when exporting to STEP
[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(UseQt4Ext)
22   INCLUDE(${QT_USE_FILE})
23 ENDIF()
24
25 # --- options ---
26
27 # additional include directories
28 INCLUDE_DIRECTORIES(
29   ${CAS_INCLUDE_DIRS}
30   ${KERNEL_INCLUDE_DIRS}
31   ${PROJECT_BINARY_DIR}/idl
32   ${PROJECT_SOURCE_DIR}/src/GEOMAlgo
33   ${PROJECT_SOURCE_DIR}/src/GEOM
34   ${PROJECT_SOURCE_DIR}/src/GEOMImpl
35   ${PROJECT_SOURCE_DIR}/src/GEOM_I
36   ${PROJECT_SOURCE_DIR}/src/GEOMClient
37   ${PROJECT_SOURCE_DIR}/src/GEOMUtils
38   )
39   
40 IF(SALOME_BUILD_GUI)
41   INCLUDE_DIRECTORIES(
42     ${QT_INCLUDE_DIRS}
43     ${GUI_INCLUDE_DIRS}
44     ${PROJECT_SOURCE_DIR}/src/OBJECT
45     ${PROJECT_SOURCE_DIR}/src/GEOMGUI
46     ${PROJECT_SOURCE_DIR}/src/GEOMBase
47     )
48 ENDIF()
49
50 # additional preprocessor / compiler flags
51 ADD_DEFINITIONS(
52   ${CAS_DEFINITIONS}
53   ${OMNIORB_DEFINITIONS}
54   )
55     
56 IF(WIN32)
57   ADD_DEFINITIONS(-DNOGDI)
58 ENDIF(WIN32)
59
60 IF(SALOME_BUILD_GUI)
61 ADD_DEFINITIONS(
62   ${QT_DEFINITIONS}
63   )
64 ENDIF()
65
66 # libraries to link to
67 SET(_link_engine_LIBRARIES
68   ${CAS_TKSTEP}
69   ${CAS_TKSTEPBase}
70   ${KERNEL_SALOMELocalTrace}
71   ${KERNEL_OpUtil}
72   SalomeIDLGEOM
73   SalomeIDLSTEPPlugin
74   GEOMEngine
75   GEOMClient
76   )
77   
78 IF(SALOME_BUILD_GUI)
79   SET(_link_gui_LIBRARIES
80     SalomeIDLSTEPPlugin
81     GEOMObject
82     GEOM
83     GEOMBase
84     )
85 ENDIF()
86
87
88 # --- headers ---
89
90 SET(STEPPluginEngine_HEADERS
91   STEPPlugin_IOperations_i.hh
92   STEPPlugin_Engine.hxx
93   STEPPlugin_OperationsCreator.hxx
94   STEPPlugin_IOperations.hxx
95   STEPPlugin_IExport.hxx 
96   STEPPlugin_IImport.hxx
97   STEPPlugin_ImportDriver.hxx 
98   STEPPlugin_ExportDlg.h
99   STEPPlugin_ExportDriver.hxx
100   STEPPlugin_IECallBack.hxx
101   )
102
103 IF(SALOME_BUILD_GUI)  
104   # header files / to be processed by moc
105   SET(_moc_HEADERS
106     STEPPlugin_GUI.h
107     STEPPlugin_ExportDlg.h
108     )
109 ENDIF()
110
111 # --- sources ---
112
113 IF(SALOME_BUILD_GUI)
114   # sources / moc wrappings
115   QT4_WRAP_CPP(_moc_SOURCES ${_moc_HEADERS})
116
117   SET(STEPPluginGUI_SOURCES
118     STEPPlugin_GUI.cxx
119     STEPPlugin_ExportDlg.cxx
120     ${_moc_SOURCES}
121     )
122 ENDIF()
123   
124 SET(STEPPluginEngine_SOURCES
125   STEPPlugin_Engine.cxx
126   STEPPlugin_OperationsCreator.cxx
127   STEPPlugin_IOperations_i.cc
128   STEPPlugin_IOperations.cxx
129   STEPPlugin_ExportDriver.cxx
130   STEPPlugin_ImportDriver.cxx
131   STEPPlugin_IECallBack.cxx
132   )
133   
134 # resource files / to be processed by lrelease
135 SET(STEPPlugin_RESOURCES
136   STEPPlugin_msg_en.ts
137   STEPPlugin_msg_fr.ts
138   STEPPlugin_msg_ja.ts
139   )
140
141 # --- rules ---
142
143 ADD_LIBRARY(STEPPluginEngine ${STEPPluginEngine_SOURCES})
144 TARGET_LINK_LIBRARIES(STEPPluginEngine ${_link_engine_LIBRARIES})
145 INSTALL(TARGETS STEPPluginEngine EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
146
147 IF(SALOME_BUILD_GUI)
148   ADD_LIBRARY(STEPPluginGUI ${STEPPluginGUI_SOURCES})
149   TARGET_LINK_LIBRARIES(STEPPluginGUI ${_link_gui_LIBRARIES})
150   INSTALL(TARGETS STEPPluginGUI EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
151
152   QT4_INSTALL_TS_RESOURCES("${STEPPlugin_RESOURCES}" "${SALOME_GEOM_INSTALL_RES_DATA}")
153 ENDIF()
154
155
156 INSTALL(FILES ${STEPPluginEngine_HEADERS} DESTINATION ${SALOME_INSTALL_HEADERS})