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