Salome HOME
791859eedd8d904a1846a1f271742ca1c1e91647
[modules/shaper.git] / src / FeaturesAPI / 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   FeaturesAPI.h
25   FeaturesAPI_Boolean.h
26   FeaturesAPI_Extrusion.h
27   FeaturesAPI_ExtrusionBoolean.h
28   FeaturesAPI_Intersection.h
29   FeaturesAPI_MultiRotation.h
30   FeaturesAPI_MultiTranslation.h
31   FeaturesAPI_Partition.h
32   FeaturesAPI_Pipe.h
33   FeaturesAPI_Placement.h
34   FeaturesAPI_Recover.h
35   FeaturesAPI_RemoveSubShapes.h
36   FeaturesAPI_Revolution.h
37   FeaturesAPI_RevolutionBoolean.h
38   FeaturesAPI_Rotation.h
39   FeaturesAPI_Scale.h
40   FeaturesAPI_Symmetry.h
41   FeaturesAPI_Translation.h
42   FeaturesAPI_Union.h
43 )
44
45 SET(PROJECT_SOURCES
46   FeaturesAPI_Boolean.cpp
47   FeaturesAPI_Extrusion.cpp
48   FeaturesAPI_ExtrusionBoolean.cpp
49   FeaturesAPI_Intersection.cpp
50   FeaturesAPI_MultiRotation.cpp
51   FeaturesAPI_MultiTranslation.cpp
52   FeaturesAPI_Partition.cpp
53   FeaturesAPI_Pipe.cpp
54   FeaturesAPI_Placement.cpp
55   FeaturesAPI_Recover.cpp
56   FeaturesAPI_RemoveSubShapes.cpp
57   FeaturesAPI_Revolution.cpp
58   FeaturesAPI_RevolutionBoolean.cpp
59   FeaturesAPI_Rotation.cpp
60   FeaturesAPI_Scale.cpp
61   FeaturesAPI_Symmetry.cpp
62   FeaturesAPI_Translation.cpp
63   FeaturesAPI_Union.cpp
64 )
65
66 SET(PROJECT_LIBRARIES
67   ModelAPI
68   ModelHighAPI
69 )
70
71 INCLUDE_DIRECTORIES(
72   ${PROJECT_SOURCE_DIR}/src/Events
73   ${PROJECT_SOURCE_DIR}/src/ModelAPI
74   ${PROJECT_SOURCE_DIR}/src/ModelHighAPI
75 )
76
77 # Plugin headers dependency
78 INCLUDE_DIRECTORIES(
79   ${PROJECT_SOURCE_DIR}/src/GeomAPI
80   ${PROJECT_SOURCE_DIR}/src/GeomAlgoAPI
81   ${PROJECT_SOURCE_DIR}/src/GeomDataAPI
82   ${PROJECT_SOURCE_DIR}/src/FeaturesPlugin
83 )
84
85 ADD_DEFINITIONS(-DFEATURESAPI_EXPORTS)
86 ADD_LIBRARY(FeaturesAPI SHARED ${PROJECT_SOURCES} ${PROJECT_HEADERS})
87 TARGET_LINK_LIBRARIES(FeaturesAPI ${PROJECT_LIBRARIES})
88
89 # SWIG wrapper
90
91 INCLUDE(PythonAPI)
92
93 SET_SOURCE_FILES_PROPERTIES(FeaturesAPI.i PROPERTIES CPLUSPLUS ON)
94 SET_SOURCE_FILES_PROPERTIES(FeaturesAPI.i PROPERTIES SWIG_DEFINITIONS "-shadow")
95
96 SET(SWIG_LINK_LIBRARIES
97   FeaturesAPI
98   ModelHighAPI
99   ModelAPI
100   ${PYTHON_LIBRARIES}
101 )
102
103 SET(SWIG_MODULE_FeaturesAPI_EXTRA_DEPS ${SWIG_MODULE_FeaturesAPI_EXTRA_DEPS}
104   ${PROJECT_SOURCE_DIR}/src/ModelHighAPI/ModelHighAPI.i
105   doxyhelp.i
106   ${PROJECT_HEADERS}
107 )
108
109 SWIG_ADD_MODULE(FeaturesAPI python FeaturesAPI.i ${PROJECT_HEADERS})
110 SWIG_LINK_LIBRARIES(FeaturesAPI ${SWIG_LINK_LIBRARIES})
111
112 IF(WIN32)
113   SET_TARGET_PROPERTIES(_FeaturesAPI PROPERTIES DEBUG_OUTPUT_NAME _FeaturesAPI_d)
114 ENDIF(WIN32)
115
116 INSTALL(TARGETS _FeaturesAPI DESTINATION ${SHAPER_INSTALL_SWIG})
117 INSTALL(TARGETS FeaturesAPI DESTINATION ${SHAPER_INSTALL_BIN})
118 INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/FeaturesAPI.py DESTINATION ${SHAPER_INSTALL_SWIG})