X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FBuildAPI%2FCMakeLists.txt;h=879ab1fa7b2db1ea64aea168984fea1bc310d411;hb=06e7f5859095193fc7f498bd89a7d28009794f53;hp=695b8e03a3c8577674c8513fa2e8c88f0964ccd0;hpb=932771bcbb63cafeb1e5e85cf6e1e55771cbd721;p=modules%2Fshaper.git diff --git a/src/BuildAPI/CMakeLists.txt b/src/BuildAPI/CMakeLists.txt index 695b8e03a..879ab1fa7 100644 --- a/src/BuildAPI/CMakeLists.txt +++ b/src/BuildAPI/CMakeLists.txt @@ -1,22 +1,53 @@ -## Copyright (C) 2014-20xx CEA/DEN, EDF R&D +# Copyright (C) 2014-2023 CEA, EDF +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +# INCLUDE(Common) SET(PROJECT_HEADERS BuildAPI.h + BuildAPI_Compound.h + BuildAPI_CompSolid.h BuildAPI_Edge.h BuildAPI_Face.h + BuildAPI_Filling.h BuildAPI_Shell.h + BuildAPI_Solid.h + BuildAPI_SubShapes.h BuildAPI_Vertex.h BuildAPI_Wire.h + BuildAPI_Polyline.h + BuildAPI_Interpolation.h ) SET(PROJECT_SOURCES + BuildAPI_Compound.cpp + BuildAPI_CompSolid.cpp BuildAPI_Edge.cpp BuildAPI_Face.cpp + BuildAPI_Filling.cpp BuildAPI_Shell.cpp + BuildAPI_Solid.cpp + BuildAPI_SubShapes.cpp BuildAPI_Vertex.cpp BuildAPI_Wire.cpp + BuildAPI_Polyline.cpp + BuildAPI_Interpolation.cpp ) SET(PROJECT_LIBRARIES @@ -38,8 +69,8 @@ INCLUDE_DIRECTORIES( ${PROJECT_SOURCE_DIR}/src/BuildPlugin ) -#TODO(spo): is ${CAS_DEFINITIONS} necessary? -ADD_DEFINITIONS(-DBUILDAPI_EXPORTS ${CAS_DEFINITIONS}) +#TODO(spo): is ${OpenCASCADE_DEFINITIONS} necessary? +ADD_DEFINITIONS(-DBUILDAPI_EXPORTS ${OpenCASCADE_DEFINITIONS}) ADD_LIBRARY(BuildAPI SHARED ${PROJECT_SOURCES} ${PROJECT_HEADERS}) TARGET_LINK_LIBRARIES(BuildAPI ${PROJECT_LIBRARIES}) @@ -57,6 +88,7 @@ SET(SWIG_LINK_LIBRARIES ModelAPI ${PYTHON_LIBRARIES} ) +SET(CMAKE_SWIG_FLAGS -threads -w325,321,302,362,322,383,403) SET(SWIG_MODULE_BuildAPI_EXTRA_DEPS ${SWIG_MODULE_BuildAPI_EXTRA_DEPS} ${PROJECT_SOURCE_DIR}/src/ModelHighAPI/ModelHighAPI.i @@ -64,7 +96,11 @@ SET(SWIG_MODULE_BuildAPI_EXTRA_DEPS ${SWIG_MODULE_BuildAPI_EXTRA_DEPS} ${PROJECT_HEADERS} ) -SWIG_ADD_MODULE(BuildAPI python BuildAPI.i ${PROJECT_HEADERS}) +IF(${CMAKE_VERSION} VERSION_GREATER "3.8.0") + SWIG_ADD_LIBRARY(BuildAPI LANGUAGE python SOURCES BuildAPI.i ${PROJECT_HEADERS}) +ELSE() + SWIG_ADD_MODULE(BuildAPI python BuildAPI.i ${PROJECT_HEADERS}) +ENDIF() SWIG_LINK_LIBRARIES(BuildAPI ${SWIG_LINK_LIBRARIES}) IF(WIN32)