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