1 # Copyright (C) 2014-2019 CEA/DEN, EDF R&D
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.
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.
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
17 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
20 FIND_PACKAGE(SWIG REQUIRED)
22 INCLUDE(${SWIG_USE_FILE})
23 INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR})
43 GeomAPI_ShapeExplorer.h
44 GeomAPI_ShapeIterator.h
49 GeomAPI_IPresentable.h
51 GeomAPI_DataMapOfShapeMapOfShapes.h
52 GeomAPI_DataMapOfShapeShape.h
72 GeomAPI_WireExplorer.h
73 GeomAPI_ShapeHierarchy.h
92 GeomAPI_ShapeExplorer.cpp
93 GeomAPI_ShapeIterator.cpp
96 GeomAPI_PlanarEdges.cpp
99 GeomAPI_DataMapOfShapeMapOfShapes.cpp
100 GeomAPI_DataMapOfShapeShape.cpp
102 GeomAPI_ICustomPrs.cpp
106 GeomAPI_IPresentable.cpp
112 GeomAPI_Ellipse2d.cpp
121 GeomAPI_WireExplorer.cpp
122 GeomAPI_ShapeHierarchy.cpp
125 SET(PROJECT_LIBRARIES
126 ${OpenCASCADE_FoundationClasses_LIBRARIES}
127 ${OpenCASCADE_ModelingAlgorithms_LIBRARIES}
128 ${OpenCASCADE_Visualization_LIBRARIES}
131 ADD_DEFINITIONS(-DGEOMAPI_EXPORTS ${OpenCASCADE_DEFINITIONS})
132 ADD_LIBRARY(GeomAPI SHARED ${PROJECT_SOURCES} ${PROJECT_HEADERS})
134 SET(CMAKE_SWIG_FLAGS -threads -w325,321,362,383,512)
136 SET_SOURCE_FILES_PROPERTIES(GeomAPI.i PROPERTIES CPLUSPLUS ON)
137 SET_SOURCE_FILES_PROPERTIES(GeomAPI.i PROPERTIES SWIG_DEFINITIONS "-shadow")
140 ${OpenCASCADE_INCLUDE_DIR}
143 TARGET_LINK_LIBRARIES(GeomAPI ${PROJECT_LIBRARIES})
146 ${CMAKE_CURRENT_BINARY_DIR}/GeomAPI.py
149 SET(SWIG_LINK_LIBRARIES
154 IF(${CMAKE_VERSION} VERSION_GREATER "3.8.0")
155 SWIG_ADD_LIBRARY(GeomAPI LANGUAGE python SOURCES GeomAPI.i ${PROJECT_HEADERS})
157 SWIG_ADD_MODULE(GeomAPI python GeomAPI.i ${PROJECT_HEADERS})
159 SWIG_LINK_LIBRARIES(GeomAPI ${SWIG_LINK_LIBRARIES})
162 SET_TARGET_PROPERTIES(_GeomAPI PROPERTIES DEBUG_OUTPUT_NAME _GeomAPI_d)
165 INSTALL(TARGETS _GeomAPI DESTINATION ${SHAPER_INSTALL_SWIG})
166 INSTALL(TARGETS GeomAPI DESTINATION ${SHAPER_INSTALL_BIN})
167 INSTALL(FILES ${SWIG_SCRIPTS} DESTINATION ${SHAPER_INSTALL_SWIG})