]> SALOME platform Git repositories - modules/shaper.git/blob - src/ModelHighAPI/CMakeLists.txt
Salome HOME
Debug for deflection dump
[modules/shaper.git] / src / ModelHighAPI / CMakeLists.txt
1 ## Copyright (C) 2014-20xx CEA/DEN, EDF R&D
2
3 INCLUDE(Common)
4
5 SET(PROJECT_HEADERS
6   ModelHighAPI.h
7   ModelHighAPI_Double.h
8   ModelHighAPI_Dumper.h
9   ModelHighAPI_Integer.h
10   ModelHighAPI_Interface.h
11   ModelHighAPI_Macro.h
12   ModelHighAPI_RefAttr.h
13   ModelHighAPI_Reference.h
14   ModelHighAPI_Selection.h
15   ModelHighAPI_Services.h
16   ModelHighAPI_Tools.h
17   ModelHighAPI_FeatureStore.h
18 )
19
20 SET(PROJECT_SOURCES
21   ModelHighAPI_Double.cpp
22   ModelHighAPI_Dumper.cpp
23   ModelHighAPI_Integer.cpp
24   ModelHighAPI_Interface.cpp
25   ModelHighAPI_RefAttr.cpp
26   ModelHighAPI_Reference.cpp
27   ModelHighAPI_Selection.cpp
28   ModelHighAPI_Services.cpp
29   ModelHighAPI_Tools.cpp
30   ModelHighAPI_FeatureStore.cpp
31 )
32
33 SET(PROJECT_LIBRARIES
34   Config
35   Events
36   GeomAPI
37   GeomDataAPI
38   GeomAlgoAPI
39   ModelAPI
40 )
41
42 ADD_DEFINITIONS(-DMODELHIGHAPI_EXPORTS -DWNT)
43 ADD_LIBRARY(ModelHighAPI SHARED ${PROJECT_SOURCES} ${PROJECT_HEADERS})
44 #TODO(spo): is it necessary?
45 SET_TARGET_PROPERTIES(ModelHighAPI PROPERTIES LINKER_LANGUAGE CXX)
46 TARGET_LINK_LIBRARIES(ModelHighAPI ${PROJECT_LIBRARIES})
47
48 # SWIG wrapper
49
50 INCLUDE(PythonAPI)
51
52 SET_SOURCE_FILES_PROPERTIES(ModelHighAPI.i PROPERTIES CPLUSPLUS ON)
53 SET_SOURCE_FILES_PROPERTIES(ModelHighAPI.i PROPERTIES SWIG_DEFINITIONS "-shadow")
54
55 SET(SWIG_LINK_LIBRARIES
56   ModelHighAPI
57   ${PYTHON_LIBRARIES}
58 )
59
60 INCLUDE_DIRECTORIES(
61   ${PROJECT_SOURCE_DIR}/src/Config
62   ${PROJECT_SOURCE_DIR}/src/Events
63   ${PROJECT_SOURCE_DIR}/src/GeomAPI
64   ${PROJECT_SOURCE_DIR}/src/GeomAlgoAPI
65   ${PROJECT_SOURCE_DIR}/src/GeomDataAPI
66   ${PROJECT_SOURCE_DIR}/src/ModelAPI
67   ${PROJECT_SOURCE_DIR}/src/PartSetPlugin
68   ${CAS_INCLUDE_DIRS}
69 )
70
71 set(SWIG_MODULE_ModelHighAPI_EXTRA_DEPS
72   doxyhelp.i
73   ${PROJECT_HEADERS}
74 )
75
76 SWIG_ADD_MODULE(ModelHighAPI python ModelHighAPI.i ${PROJECT_HEADERS})
77 SWIG_LINK_LIBRARIES(ModelHighAPI ${SWIG_LINK_LIBRARIES})
78
79 IF(WIN32)
80   SET_TARGET_PROPERTIES(_ModelHighAPI PROPERTIES DEBUG_OUTPUT_NAME _ModelHighAPI_d)
81 ENDIF(WIN32)
82
83 INSTALL(TARGETS _ModelHighAPI DESTINATION ${SHAPER_INSTALL_SWIG})
84 INSTALL(TARGETS ModelHighAPI DESTINATION ${SHAPER_INSTALL_BIN})
85 INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/ModelHighAPI.py DESTINATION ${SHAPER_INSTALL_SWIG})
86
87 # Tests
88
89 INCLUDE(UnitTest)
90
91 ADD_UNIT_TESTS(
92   TestDouble.py
93   TestInteger.py
94   TestRefAttr.py
95   TestReference.py
96   TestDeflectionDump.py
97 )