Salome HOME
Merge branch 'V9_3_BR'
[modules/shaper.git] / src / GeomAlgoAPI / CMakeLists.txt
index 81c0d1f0f422b740224e1c9b8013d78a52bdcc11..baeacfbaa9aabb1d1df959c52eedd0a303a55cbf 100644 (file)
@@ -1,22 +1,21 @@
-## Copyright (C) 2014-2017  CEA/DEN, EDF R&D
-##
-## 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<mailto:webmaster.salome@opencascade.com>
-##
+# Copyright (C) 2014-2019  CEA/DEN, EDF R&D
+#
+# 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
+#
 
 FIND_PACKAGE(SWIG REQUIRED)
 
@@ -77,6 +76,8 @@ SET(PROJECT_HEADERS
     GeomAlgoAPI_Fillet.h
     GeomAlgoAPI_SortListOfShapes.h
     GeomAlgoAPI_Filling.h
+    GeomAlgoAPI_CurveBuilder.h
+    GeomAlgoAPI_NExplode.h
 )
 
 SET(PROJECT_SOURCES
@@ -132,6 +133,8 @@ SET(PROJECT_SOURCES
     GeomAlgoAPI_Fillet.cpp
     GeomAlgoAPI_SortListOfShapes.cpp
     GeomAlgoAPI_Filling.cpp
+    GeomAlgoAPI_CurveBuilder.cpp
+    GeomAlgoAPI_NExplode.cpp
 )
 
 SET(PROJECT_LIBRARIES
@@ -139,29 +142,15 @@ SET(PROJECT_LIBRARIES
     GeomAlgoImpl
     ModelAPI
     XAOShaper
-    ${CAS_OCAF}
-    ${CAS_SHAPE}
-    ${CAS_TKBO}
-    ${CAS_TKBool}
-    ${CAS_TKBRep}
-    ${CAS_TKCAF}
-    ${CAS_TKCAF}
-    ${CAS_TKFillet}
-    ${CAS_TKLCAF}
-    ${CAS_TKPrim}
-    ${CAS_TKSTEP}
-    ${CAS_TKSTEPBase}
-    ${CAS_TKIGES}
-    ${CAS_TKTopAlgo}
-    ${CAS_TKXSBase}
-    ${CAS_TKOffset}
-    ${CAS_TKShHealing}
+    ${OpenCASCADE_DataExchange_LIBRARIES}
+    ${OpenCASCADE_ModelingAlgorithms_LIBRARIES}
+    ${OpenCASCADE_ApplicationFramework_LIBRARIES}
 )
 
-ADD_DEFINITIONS(-DGEOMALGOAPI_EXPORTS ${CAS_DEFINITIONS})
+ADD_DEFINITIONS(-DGEOMALGOAPI_EXPORTS ${OpenCASCADE_DEFINITIONS})
 ADD_LIBRARY(GeomAlgoAPI SHARED ${PROJECT_SOURCES} ${PROJECT_HEADERS})
 
-SET(CMAKE_SWIG_FLAGS "-Wall")
+SET(CMAKE_SWIG_FLAGS -w325,321,362,383,302)
 
 SET_SOURCE_FILES_PROPERTIES(GeomAlgoAPI.i PROPERTIES CPLUSPLUS ON)
 SET_SOURCE_FILES_PROPERTIES(GeomAlgoAPI.i PROPERTIES SWIG_DEFINITIONS "-shadow")
@@ -171,7 +160,7 @@ INCLUDE_DIRECTORIES(
   ../GeomAlgoImpl
   ../ModelAPI
   ../XAO
-  ${CAS_INCLUDE_DIRS}
+  ${OpenCASCADE_INCLUDE_DIR}
 )
 
 TARGET_LINK_LIBRARIES(GeomAlgoAPI ${PROJECT_LIBRARIES})
@@ -187,7 +176,11 @@ SET(SWIG_LINK_LIBRARIES
   ${PYTHON_LIBRARIES}
 )
 
-SWIG_ADD_MODULE(GeomAlgoAPI python GeomAlgoAPI.i ${PROJECT_HEADERS})
+IF(${CMAKE_VERSION} VERSION_GREATER "3.8.0")
+  SWIG_ADD_LIBRARY(GeomAlgoAPI LANGUAGE python SOURCES GeomAlgoAPI.i ${PROJECT_HEADERS})
+ELSE()
+  SWIG_ADD_MODULE(GeomAlgoAPI python GeomAlgoAPI.i ${PROJECT_HEADERS})
+ENDIF()
 SWIG_LINK_LIBRARIES(GeomAlgoAPI ${SWIG_LINK_LIBRARIES})
 
 IF(WIN32)