]> SALOME platform Git repositories - modules/geom.git/blob - src/STEPPlugin/CMakeLists.txt
Salome HOME
db71d3b2454b5828df5a42b44ad73970340acc3e
[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 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     ${QT_INCLUDE_DIRS}
42     ${GUI_INCLUDE_DIRS}
43     ${PROJECT_SOURCE_DIR}/src/OBJECT
44     ${PROJECT_SOURCE_DIR}/src/GEOMGUI
45     ${PROJECT_SOURCE_DIR}/src/GEOMBase
46     )
47 ENDIF()
48
49 # additional preprocessor / compiler flags
50 ADD_DEFINITIONS(
51   ${CAS_DEFINITIONS}
52   ${OMNIORB_DEFINITIONS}
53   )
54     
55 IF(WIN32)
56   ADD_DEFINITIONS(-DNOGDI)
57 ENDIF(WIN32)
58
59 IF(SALOME_BUILD_GUI)
60 ADD_DEFINITIONS(
61   ${QT_DEFINITIONS}
62   )
63 ENDIF()
64
65 # libraries to link to
66 SET(_link_engine_LIBRARIES
67   ${CAS_TKSTEP}
68   ${CAS_TKSTEPBase}
69   ${KERNEL_SALOMELocalTrace}
70   ${KERNEL_OpUtil}
71   SalomeIDLGEOM
72   SalomeIDLSTEPPlugin
73   GEOMEngine
74   GEOMClient
75   )
76   
77 IF(SALOME_BUILD_GUI)
78   SET(_link_gui_LIBRARIES
79     SalomeIDLSTEPPlugin
80     GEOMObject
81     GEOM
82     GEOMBase
83     )
84 ENDIF()
85
86
87 # --- headers ---
88
89 SET(STEPPluginEngine_HEADERS
90   STEPPlugin_IOperations_i.hh
91   STEPPlugin_Engine.hxx
92   STEPPlugin_OperationsCreator.hxx
93   STEPPlugin_IOperations.hxx
94   STEPPlugin_IExport.hxx 
95   STEPPlugin_IImport.hxx
96   STEPPlugin_ImportDriver.hxx 
97   STEPPlugin_ExportDlg.h
98   STEPPlugin_ExportDriver.hxx
99   STEPPlugin_IECallBack.hxx
100   )
101
102 IF(SALOME_BUILD_GUI)  
103   # header files / to be processed by moc
104   SET(_moc_HEADERS
105     STEPPlugin_GUI.h
106     STEPPlugin_ExportDlg.h
107     )
108 ENDIF()
109
110 # --- sources ---
111
112 IF(SALOME_BUILD_GUI)
113   # sources / moc wrappings
114   QT4_WRAP_CPP(_moc_SOURCES ${_moc_HEADERS})
115
116   SET(STEPPluginGUI_SOURCES
117     STEPPlugin_GUI.cxx
118     STEPPlugin_ExportDlg.cxx
119     ${_moc_SOURCES}
120     )
121 ENDIF()
122   
123 SET(STEPPluginEngine_SOURCES
124   STEPPlugin_Engine.cxx
125   STEPPlugin_OperationsCreator.cxx
126   STEPPlugin_IOperations_i.cc
127   STEPPlugin_IOperations.cxx
128   STEPPlugin_ExportDriver.cxx
129   STEPPlugin_ImportDriver.cxx
130   STEPPlugin_IECallBack.cxx
131   )
132   
133 # resource files / to be processed by lrelease
134 SET(STEPPlugin_RESOURCES
135   STEPPlugin_msg_en.ts
136   STEPPlugin_msg_fr.ts
137   STEPPlugin_msg_ja.ts
138   )
139
140 # --- rules ---
141
142 ADD_LIBRARY(STEPPluginEngine ${STEPPluginEngine_SOURCES})
143 TARGET_LINK_LIBRARIES(STEPPluginEngine ${_link_engine_LIBRARIES})
144 INSTALL(TARGETS STEPPluginEngine EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
145
146 IF(SALOME_BUILD_GUI)
147   ADD_LIBRARY(STEPPluginGUI ${STEPPluginGUI_SOURCES})
148   TARGET_LINK_LIBRARIES(STEPPluginGUI ${_link_gui_LIBRARIES})
149   INSTALL(TARGETS STEPPluginGUI EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
150
151   QT4_INSTALL_TS_RESOURCES("${STEPPlugin_RESOURCES}" "${SALOME_GEOM_INSTALL_RES_DATA}")
152 ENDIF()
153
154
155 INSTALL(FILES ${STEPPluginEngine_HEADERS} DESTINATION ${SALOME_INSTALL_HEADERS})