Salome HOME
Merge from V6_main (04/10/2012)
[modules/kernel.git] / src / SALOMEDSImpl / CMakeLists.txt
1 # Copyright (C) 2012  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.
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 INCLUDE_DIRECTORIES(
21   ${OMNIORB_INCLUDE_DIRS}
22   ${PTHREAD_INCLUDE_DIRS}
23   ${HDF5_INCLUDE_DIRS}
24   ${BOOST_INCLUDE_DIRS}
25   ${CMAKE_BINARY_DIR}/salome_adm
26   ${CMAKE_CURRENT_SOURCE_DIR}/../Basics
27   ${CMAKE_CURRENT_SOURCE_DIR}/../SALOMELocalTrace
28   ${CMAKE_CURRENT_SOURCE_DIR}/../HDFPersist
29   ${CMAKE_CURRENT_SOURCE_DIR}/../DF
30   ${CMAKE_CURRENT_SOURCE_DIR}/../GenericObj
31   ${CMAKE_BINARY_DIR}/idl
32   ${CMAKE_BINARY_DIR}
33 )
34
35 # This local variable defines the list of FLAGS common to all target in this package.
36 SET(COMMON_FLAGS "${HDF5_DEFINITIONS} ${OMNIORB_DEFINITIONS} ${BOOST_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
37
38 # This local variable defines the list of dependant libraries common to all target in this package.  
39 SET(COMMON_LIBS
40   SALOMEBasics
41   SalomeHDFPersist
42   DF
43   SalomeGenericObj
44   SalomeIDLKernel
45   ${HDF5_LIBS}
46 )
47
48 SET(SalomeDSImpl_SOURCES
49   SALOMEDSImpl_Tool.cxx
50   SALOMEDSImpl_Callback.cxx
51   SALOMEDSImpl_StudyHandle.cxx
52   SALOMEDSImpl_GenericAttribute.cxx
53   SALOMEDSImpl_SObject.cxx
54   SALOMEDSImpl_SComponent.cxx
55   SALOMEDSImpl_ChildIterator.cxx
56   SALOMEDSImpl_AttributeIOR.cxx
57   SALOMEDSImpl_AttributeExternalFileDef.cxx
58   SALOMEDSImpl_AttributeFileType.cxx
59   SALOMEDSImpl_AttributePersistentRef.cxx
60   SALOMEDSImpl_AttributeSequenceOfReal.cxx
61   SALOMEDSImpl_AttributeSequenceOfInteger.cxx
62   SALOMEDSImpl_AttributeDrawable.cxx
63   SALOMEDSImpl_AttributeSelectable.cxx
64   SALOMEDSImpl_AttributeExpandable.cxx
65   SALOMEDSImpl_AttributeOpened.cxx
66   SALOMEDSImpl_AttributeFlags.cxx
67   SALOMEDSImpl_AttributeGraphic.cxx
68   SALOMEDSImpl_AttributeTextColor.cxx
69   SALOMEDSImpl_AttributeTextHighlightColor.cxx
70   SALOMEDSImpl_AttributePixMap.cxx
71   SALOMEDSImpl_AttributeLocalID.cxx
72   SALOMEDSImpl_AttributeTarget.cxx
73   SALOMEDSImpl_AttributeTableOfInteger.cxx
74   SALOMEDSImpl_AttributeTableOfReal.cxx
75   SALOMEDSImpl_AttributeTableOfString.cxx
76   SALOMEDSImpl_AttributeStudyProperties.cxx
77   SALOMEDSImpl_AttributePythonObject.cxx
78   SALOMEDSImpl_AttributeReal.cxx
79   SALOMEDSImpl_AttributeInteger.cxx
80   SALOMEDSImpl_AttributeUserID.cxx
81   SALOMEDSImpl_AttributeTreeNode.cxx
82   SALOMEDSImpl_AttributeName.cxx
83   SALOMEDSImpl_AttributeComment.cxx
84   SALOMEDSImpl_AttributeReference.cxx
85   SALOMEDSImpl_AttributeParameter.cxx
86   SALOMEDSImpl_AttributeString.cxx
87   SALOMEDSImpl_ChildNodeIterator.cxx
88   SALOMEDSImpl_UseCaseBuilder.cxx
89   SALOMEDSImpl_UseCaseIterator.cxx
90   SALOMEDSImpl_SComponentIterator.cxx
91   SALOMEDSImpl_StudyBuilder.cxx
92   SALOMEDSImpl_Study.cxx
93   SALOMEDSImpl_StudyManager.cxx
94   SALOMEDSImpl_IParameters.cxx
95   SALOMEDSImpl_TMPFile.cxx
96   SALOMEDSImpl_GenericVariable.cxx
97   SALOMEDSImpl_ScalarVariable.cxx
98   SALOMEDSImpl_AttributeComment.hxx
99   SALOMEDSImpl_AttributeDrawable.hxx
100   SALOMEDSImpl_AttributeExpandable.hxx
101   SALOMEDSImpl_AttributeExternalFileDef.hxx
102   SALOMEDSImpl_AttributeFileType.hxx
103   SALOMEDSImpl_AttributeFlags.hxx
104   SALOMEDSImpl_AttributeGraphic.hxx
105   SALOMEDSImpl_AttributeInteger.hxx
106   SALOMEDSImpl_AttributeIOR.hxx
107   SALOMEDSImpl_AttributeLocalID.hxx
108   SALOMEDSImpl_AttributeName.hxx
109   SALOMEDSImpl_AttributeOpened.hxx
110   SALOMEDSImpl_AttributePersistentRef.hxx
111   SALOMEDSImpl_AttributePixMap.hxx
112   SALOMEDSImpl_AttributePythonObject.hxx
113   SALOMEDSImpl_AttributeReal.hxx
114   SALOMEDSImpl_AttributeReference.hxx
115   SALOMEDSImpl_AttributeSelectable.hxx
116   SALOMEDSImpl_AttributeSequenceOfInteger.hxx
117   SALOMEDSImpl_AttributeSequenceOfReal.hxx
118   SALOMEDSImpl_Attributes.hxx
119   SALOMEDSImpl_AttributeStudyProperties.hxx
120   SALOMEDSImpl_AttributeTable.hxx
121   SALOMEDSImpl_AttributeTableOfInteger.hxx
122   SALOMEDSImpl_AttributeTableOfReal.hxx
123   SALOMEDSImpl_AttributeTableOfString.hxx
124   SALOMEDSImpl_AttributeTarget.hxx
125   SALOMEDSImpl_AttributeTextColor.hxx
126   SALOMEDSImpl_AttributeTextHighlightColor.hxx
127   SALOMEDSImpl_AttributeTreeNode.hxx
128   SALOMEDSImpl_AttributeUserID.hxx
129   SALOMEDSImpl_AttributeParameter.hxx
130   SALOMEDSImpl_AttributeString.hxx
131   SALOMEDSImpl_Callback.hxx
132   SALOMEDSImpl_ChildIterator.hxx
133   SALOMEDSImpl_ChildNodeIterator.hxx
134   SALOMEDSImpl_Defines.hxx
135   SALOMEDSImpl_Driver.hxx
136   SALOMEDSImpl_GenericAttribute.hxx
137   SALOMEDSImpl_SComponent.hxx
138   SALOMEDSImpl_SComponentIterator.hxx
139   SALOMEDSImpl_SObject.hxx
140   SALOMEDSImpl_StudyBuilder.hxx
141   SALOMEDSImpl_StudyHandle.hxx
142   SALOMEDSImpl_Study.hxx
143   SALOMEDSImpl_StudyManager.hxx
144   SALOMEDSImpl_Tool.hxx
145   SALOMEDSImpl_UseCaseBuilder.hxx
146   SALOMEDSImpl_UseCaseIterator.hxx
147   SALOMEDSImpl_GenericVariable.hxx
148   SALOMEDSImpl_ScalarVariable.hxx
149
150
151 ADD_LIBRARY(SalomeDSImpl SHARED ${SalomeDSImpl_SOURCES})
152 SET_TARGET_PROPERTIES(SalomeDSImpl PROPERTIES COMPILE_FLAGS "${COMMON_FLAGS}")
153 TARGET_LINK_LIBRARIES(SalomeDSImpl SALOMELocalTrace ${COMMON_LIBS} ${OMNIORB_LIBS} ${PLATFORM_LIBS})
154 INSTALL(TARGETS SalomeDSImpl DESTINATION ${KERNEL_salomelib_LIBS})
155
156 ADD_EXECUTABLE(testDS testDS.cxx)
157 SET_TARGET_PROPERTIES(testDS PROPERTIES COMPILE_FLAGS "${COMMON_FLAGS}")
158 TARGET_LINK_LIBRARIES(testDS SalomeDSImpl ${COMMON_LIBS} ${OMNIORB_LIBS} ${PLATFORM_LIBS})
159 INSTALL(TARGETS testDS DESTINATION ${KERNEL_salomebin_BINS})
160
161 FILE(GLOB COMMON_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx")
162 SET(NOINST_HEADERS_HXX
163   SALOMEDSImpl_Tool.hxx
164   SALOMEDSImpl_StudyHandle.hxx
165 )
166 FOREACH(HEADER ${NOINST_HEADERS_HXX})
167   LIST(REMOVE_ITEM COMMON_HEADERS_HXX ${CMAKE_CURRENT_SOURCE_DIR}/${HEADER})
168 ENDFOREACH(HEADER ${NOINST_HEADERS_HXX})
169 INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${KERNEL_salomeinclude_HEADERS})