1 # Copyright (C) 2014-2020 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
35 BuildAPI_Interpolation.h
40 BuildAPI_CompSolid.cpp
46 BuildAPI_SubShapes.cpp
50 BuildAPI_Interpolation.cpp
59 ${PROJECT_SOURCE_DIR}/src/Events
60 ${PROJECT_SOURCE_DIR}/src/ModelAPI
61 ${PROJECT_SOURCE_DIR}/src/ModelHighAPI
64 # Plugin headers dependency
66 ${PROJECT_SOURCE_DIR}/src/GeomAPI
67 ${PROJECT_SOURCE_DIR}/src/GeomAlgoAPI
68 ${PROJECT_SOURCE_DIR}/src/GeomDataAPI
69 ${PROJECT_SOURCE_DIR}/src/BuildPlugin
72 #TODO(spo): is ${OpenCASCADE_DEFINITIONS} necessary?
73 ADD_DEFINITIONS(-DBUILDAPI_EXPORTS ${OpenCASCADE_DEFINITIONS})
74 ADD_LIBRARY(BuildAPI SHARED ${PROJECT_SOURCES} ${PROJECT_HEADERS})
75 TARGET_LINK_LIBRARIES(BuildAPI ${PROJECT_LIBRARIES})
81 SET_SOURCE_FILES_PROPERTIES(BuildAPI.i PROPERTIES CPLUSPLUS ON)
82 SET_SOURCE_FILES_PROPERTIES(BuildAPI.i PROPERTIES SWIG_DEFINITIONS "-shadow")
84 #TODO(spo): is ModelAPI necessary or it could be received by INTERFACE_ (may require modern CMake)?
85 SET(SWIG_LINK_LIBRARIES
91 SET(CMAKE_SWIG_FLAGS -threads -w325,321,302,362,322,383,403)
93 SET(SWIG_MODULE_BuildAPI_EXTRA_DEPS ${SWIG_MODULE_BuildAPI_EXTRA_DEPS}
94 ${PROJECT_SOURCE_DIR}/src/ModelHighAPI/ModelHighAPI.i
99 IF(${CMAKE_VERSION} VERSION_GREATER "3.8.0")
100 SWIG_ADD_LIBRARY(BuildAPI LANGUAGE python SOURCES BuildAPI.i ${PROJECT_HEADERS})
102 SWIG_ADD_MODULE(BuildAPI python BuildAPI.i ${PROJECT_HEADERS})
104 SWIG_LINK_LIBRARIES(BuildAPI ${SWIG_LINK_LIBRARIES})
107 SET_TARGET_PROPERTIES(_BuildAPI PROPERTIES DEBUG_OUTPUT_NAME _BuildAPI_d)
110 INSTALL(TARGETS _BuildAPI DESTINATION ${SHAPER_INSTALL_SWIG})
111 INSTALL(TARGETS BuildAPI DESTINATION ${SHAPER_INSTALL_BIN})
112 INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/BuildAPI.py DESTINATION ${SHAPER_INSTALL_SWIG})
120 # ADD_SUBDIRECTORY (Test)