]> SALOME platform Git repositories - modules/geom.git/blob - src/IGESPlugin/CMakeLists.txt
Salome HOME
Merge relevant changes from V8_0_0_BR branch
[modules/geom.git] / src / IGESPlugin / 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_TKIGES}
68   ${KERNEL_SALOMELocalTrace}
69   ${KERNEL_OpUtil}
70   SalomeIDLGEOM
71   SalomeIDLIGESPlugin
72   GEOMEngine
73   GEOMClient
74   )
75   
76 IF(SALOME_BUILD_GUI)
77   SET(_link_gui_LIBRARIES
78     SalomeIDLIGESPlugin
79     GEOMObject
80     GEOM
81     GEOMBase
82     )
83 ENDIF()
84
85
86 # --- headers ---
87
88 SET(IGESPluginEngine_HEADERS
89   IGESPlugin_IOperations_i.hh
90   IGESPlugin_Engine.hxx
91   IGESPlugin_OperationsCreator.hxx
92   IGESPlugin_IOperations.hxx
93   IGESPlugin_IExport.hxx 
94   IGESPlugin_IImport.hxx
95   IGESPlugin_ImportDriver.hxx 
96   IGESPlugin_ExportDriver.hxx
97   IGESPlugin_IECallBack.hxx
98   )
99
100 IF(SALOME_BUILD_GUI)  
101   # header files / to be processed by moc
102   SET(_moc_HEADERS
103     IGESPlugin_GUI.h
104     IGESPlugin_ExportDlg.h
105     )
106 ENDIF()
107
108 # --- sources ---
109
110 IF(SALOME_BUILD_GUI)
111   # sources / moc wrappings
112   QT4_WRAP_CPP(_moc_SOURCES ${_moc_HEADERS})
113
114   SET(IGESPluginGUI_SOURCES
115     IGESPlugin_GUI.cxx
116     IGESPlugin_ExportDlg.cxx
117     ${_moc_SOURCES}
118     )
119 ENDIF()
120   
121 SET(IGESPluginEngine_SOURCES
122   IGESPlugin_Engine.cxx
123   IGESPlugin_OperationsCreator.cxx
124   IGESPlugin_IOperations_i.cc
125   IGESPlugin_IOperations.cxx
126   IGESPlugin_ExportDriver.cxx
127   IGESPlugin_ImportDriver.cxx
128   IGESPlugin_IECallBack.cxx
129   )
130   
131 # resource files / to be processed by lrelease
132 SET(IGESPlugin_RESOURCES
133   IGESPlugin_msg_en.ts
134   IGESPlugin_msg_fr.ts
135   IGESPlugin_msg_ja.ts
136   )
137
138 # --- rules ---
139
140 ADD_LIBRARY(IGESPluginEngine ${IGESPluginEngine_SOURCES})
141 TARGET_LINK_LIBRARIES(IGESPluginEngine ${_link_engine_LIBRARIES})
142 INSTALL(TARGETS IGESPluginEngine EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
143
144 IF(SALOME_BUILD_GUI)
145   ADD_LIBRARY(IGESPluginGUI ${IGESPluginGUI_SOURCES})
146   TARGET_LINK_LIBRARIES(IGESPluginGUI ${_link_gui_LIBRARIES})
147   INSTALL(TARGETS IGESPluginGUI EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
148   
149   QT4_INSTALL_TS_RESOURCES("${IGESPlugin_RESOURCES}" "${SALOME_GEOM_INSTALL_RES_DATA}")
150 ENDIF()
151
152
153 INSTALL(FILES ${IGESPluginEngine_HEADERS} DESTINATION ${SALOME_INSTALL_HEADERS})