]> SALOME platform Git repositories - modules/shaper.git/blob - src/ModelHighAPI/CMakeLists.txt
Salome HOME
Issue #2358: Preserve state of folders on move in/out objects to a folder
[modules/shaper.git] / src / ModelHighAPI / CMakeLists.txt
1 ## Copyright (C) 2014-2017  CEA/DEN, EDF R&D
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
18 ## email : webmaster.salome@opencascade.com<mailto:webmaster.salome@opencascade.com>
19 ##
20
21 INCLUDE(Common)
22
23 SET(PROJECT_HEADERS
24   ModelHighAPI.h
25   ModelHighAPI_Double.h
26   ModelHighAPI_Dumper.h
27   ModelHighAPI_Integer.h
28   ModelHighAPI_Interface.h
29   ModelHighAPI_Macro.h
30   ModelHighAPI_RefAttr.h
31   ModelHighAPI_Reference.h
32   ModelHighAPI_Selection.h
33   ModelHighAPI_Services.h
34   ModelHighAPI_Tools.h
35   ModelHighAPI_FeatureStore.h
36   ModelHighAPI_Folder.h
37 )
38
39 SET(PROJECT_SOURCES
40   ModelHighAPI_Double.cpp
41   ModelHighAPI_Dumper.cpp
42   ModelHighAPI_Integer.cpp
43   ModelHighAPI_Interface.cpp
44   ModelHighAPI_RefAttr.cpp
45   ModelHighAPI_Reference.cpp
46   ModelHighAPI_Selection.cpp
47   ModelHighAPI_Services.cpp
48   ModelHighAPI_Tools.cpp
49   ModelHighAPI_FeatureStore.cpp
50   ModelHighAPI_Folder.cpp
51 )
52
53 SET(PROJECT_LIBRARIES
54   Config
55   Events
56   GeomAPI
57   GeomDataAPI
58   GeomAlgoAPI
59   ModelAPI
60 )
61
62 ADD_DEFINITIONS(-DMODELHIGHAPI_EXPORTS -DWNT)
63 ADD_LIBRARY(ModelHighAPI SHARED ${PROJECT_SOURCES} ${PROJECT_HEADERS})
64 #TODO(spo): is it necessary?
65 SET_TARGET_PROPERTIES(ModelHighAPI PROPERTIES LINKER_LANGUAGE CXX)
66 TARGET_LINK_LIBRARIES(ModelHighAPI ${PROJECT_LIBRARIES})
67
68 # SWIG wrapper
69
70 INCLUDE(PythonAPI)
71
72 SET_SOURCE_FILES_PROPERTIES(ModelHighAPI.i PROPERTIES CPLUSPLUS ON)
73 SET_SOURCE_FILES_PROPERTIES(ModelHighAPI.i PROPERTIES SWIG_DEFINITIONS "-shadow")
74
75 SET(SWIG_LINK_LIBRARIES
76   ModelHighAPI
77   ${PYTHON_LIBRARIES}
78 )
79
80 INCLUDE_DIRECTORIES(
81   ${PROJECT_SOURCE_DIR}/src/Config
82   ${PROJECT_SOURCE_DIR}/src/Events
83   ${PROJECT_SOURCE_DIR}/src/GeomAPI
84   ${PROJECT_SOURCE_DIR}/src/GeomAlgoAPI
85   ${PROJECT_SOURCE_DIR}/src/GeomDataAPI
86   ${PROJECT_SOURCE_DIR}/src/ModelAPI
87   ${PROJECT_SOURCE_DIR}/src/PartSetPlugin
88   ${CAS_INCLUDE_DIRS}
89 )
90
91 set(SWIG_MODULE_ModelHighAPI_EXTRA_DEPS
92   doxyhelp.i
93   ${PROJECT_HEADERS}
94 )
95
96 SWIG_ADD_MODULE(ModelHighAPI python ModelHighAPI.i ${PROJECT_HEADERS})
97 SWIG_LINK_LIBRARIES(ModelHighAPI ${SWIG_LINK_LIBRARIES})
98
99 IF(WIN32)
100   SET_TARGET_PROPERTIES(_ModelHighAPI PROPERTIES DEBUG_OUTPUT_NAME _ModelHighAPI_d)
101 ENDIF(WIN32)
102
103 INSTALL(TARGETS _ModelHighAPI DESTINATION ${SHAPER_INSTALL_SWIG})
104 INSTALL(TARGETS ModelHighAPI DESTINATION ${SHAPER_INSTALL_BIN})
105 INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/ModelHighAPI.py DESTINATION ${SHAPER_INSTALL_SWIG})
106
107 # Tests
108
109 INCLUDE(UnitTest)
110
111 ADD_UNIT_TESTS(
112   TestDouble.py
113   TestInteger.py
114   TestRefAttr.py
115   TestReference.py
116   TestDeflectionDump.py
117 )