]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Take care about CMake version < 3.8.0.
authormzn <mzn@opencascade.com>
Mon, 20 Aug 2018 11:42:24 +0000 (14:42 +0300)
committermzn <mzn@opencascade.com>
Mon, 20 Aug 2018 11:42:24 +0000 (14:42 +0300)
19 files changed:
src/BuildAPI/CMakeLists.txt
src/CollectionAPI/CMakeLists.txt
src/Config/CMakeLists.txt
src/ConnectorAPI/CMakeLists.txt
src/ConstructionAPI/CMakeLists.txt
src/Events/CMakeLists.txt
src/ExchangeAPI/CMakeLists.txt
src/FeaturesAPI/CMakeLists.txt
src/GDMLAPI/CMakeLists.txt
src/GeomAPI/CMakeLists.txt
src/GeomAlgoAPI/CMakeLists.txt
src/GeomDataAPI/CMakeLists.txt
src/ModelAPI/CMakeLists.txt
src/ModelGeomAlgo/CMakeLists.txt
src/ModelHighAPI/CMakeLists.txt
src/ParametersAPI/CMakeLists.txt
src/PartSetAPI/CMakeLists.txt
src/PrimitivesAPI/CMakeLists.txt
src/SketchAPI/CMakeLists.txt

index a88ab8eb6aef60d33b35375bffe59728f97f81a6..4f1c32c708ea3247398e2dc594a0a1354532432d 100644 (file)
@@ -96,7 +96,11 @@ SET(SWIG_MODULE_BuildAPI_EXTRA_DEPS ${SWIG_MODULE_BuildAPI_EXTRA_DEPS}
   ${PROJECT_HEADERS}
 )
 
-SWIG_ADD_LIBRARY(BuildAPI LANGUAGE python SOURCES 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)
index 88990237fbfe15472f21bb21b7d3a23286a66fd0..62543034bc44965ca640f9bd44978aad7b136b83 100644 (file)
@@ -74,7 +74,11 @@ SET(SWIG_MODULE_CollectionAPI_EXTRA_DEPS ${SWIG_MODULE_CollectionAPI_EXTRA_DEPS}
   ${PROJECT_HEADERS}
 )
 
-SWIG_ADD_LIBRARY(CollectionAPI LANGUAGE python SOURCES CollectionAPI.i ${PROJECT_HEADERS})
+IF(${CMAKE_VERSION} VERSION_GREATER "3.8.0")
+  SWIG_ADD_LIBRARY(CollectionAPI LANGUAGE python SOURCES CollectionAPI.i ${PROJECT_HEADERS})
+ELSE()
+  SWIG_ADD_MODULE(CollectionAPI python CollectionAPI.i ${PROJECT_HEADERS})
+ENDIF()
 SWIG_LINK_LIBRARIES(CollectionAPI ${SWIG_LINK_LIBRARIES})
 
 IF(WIN32)
index 068609e63b77160927e62c8ed0281f6fc5b02803..05bafb324a93a8baff93cdcc2706b9aa02ba3209 100644 (file)
@@ -76,7 +76,11 @@ SET(SWIG_LINK_LIBRARIES
   Config
   ${PYTHON_LIBRARIES}
 )
-SWIG_ADD_LIBRARY(ConfigAPI LANGUAGE python SOURCES ConfigAPI.i ${PROJECT_HEADERS})
+IF(${CMAKE_VERSION} VERSION_GREATER "3.8.0")
+  SWIG_ADD_LIBRARY(ConfigAPI LANGUAGE python SOURCES ConfigAPI.i ${PROJECT_HEADERS})
+ELSE()
+  SWIG_ADD_MODULE(ConfigAPI python ConfigAPI.i ${PROJECT_HEADERS})
+ENDIF()
 SWIG_LINK_LIBRARIES(ConfigAPI ${SWIG_LINK_LIBRARIES})
 IF(WIN32)
   SET_TARGET_PROPERTIES(_ConfigAPI PROPERTIES DEBUG_OUTPUT_NAME _ConfigAPI_d)
index 291700cef497b5e10a81f192134c8ee2a9eb4543..19d6e2bcaeda36e25247151721ba2e60247fc5b6 100644 (file)
@@ -75,7 +75,11 @@ SET(SWIG_MODULE_ConnectorAPI_EXTRA_DEPS ${SWIG_MODULE_ConnectorAPI_EXTRA_DEPS}
   ${PROJECT_HEADERS}
 )
 
-SWIG_ADD_LIBRARY(ConnectorAPI LANGUAGE python SOURCES ConnectorAPI.i ${PROJECT_HEADERS})
+IF(${CMAKE_VERSION} VERSION_GREATER "3.8.0")
+  SWIG_ADD_LIBRARY(ConnectorAPI LANGUAGE python SOURCES ConnectorAPI.i ${PROJECT_HEADERS})
+ELSE()
+  SWIG_ADD_MODULE(ConnectorAPI python ConnectorAPI.i ${PROJECT_HEADERS})
+ENDIF()
 SWIG_LINK_LIBRARIES(ConnectorAPI ${SWIG_LINK_LIBRARIES})
 
 IF(WIN32)
index 985455f221f18ab3c92e3056b26fb6313f725c19..88fd35809bdb1296dd4834cd6a9f0d81177b2ca0 100644 (file)
@@ -79,7 +79,11 @@ SET(SWIG_MODULE_ConstructionAPI_EXTRA_DEPS ${SWIG_MODULE_ConstructionAPI_EXTRA_D
   ${PROJECT_HEADERS}
 )
 
-SWIG_ADD_LIBRARY(ConstructionAPI LANGUAGE python SOURCES ConstructionAPI.i ${PROJECT_HEADERS})
+IF(${CMAKE_VERSION} VERSION_GREATER "3.8.0")
+  SWIG_ADD_LIBRARY(ConstructionAPI LANGUAGE python SOURCES ConstructionAPI.i ${PROJECT_HEADERS})
+ELSE()
+  SWIG_ADD_MODULE(ConstructionAPI python ConstructionAPI.i ${PROJECT_HEADERS})
+ENDIF()
 SWIG_LINK_LIBRARIES(ConstructionAPI ${SWIG_LINK_LIBRARIES})
 
 IF(WIN32)
index f20acfdea97da8d06c4e0a3fbdc624b0930c257d..8e74f3ad65b03e44db54c174d3d9d9c1b5f87c03 100644 (file)
@@ -64,7 +64,11 @@ SET(SWIG_LINK_LIBRARIES
   ${PYTHON_LIBRARIES}
 )
 
-SWIG_ADD_LIBRARY(EventsAPI LANGUAGE python SOURCES Events.i ${PROJECT_HEADERS})
+IF(${CMAKE_VERSION} VERSION_GREATER "3.8.0")
+  SWIG_ADD_LIBRARY(EventsAPI LANGUAGE python SOURCES Events.i ${PROJECT_HEADERS})
+ELSE()
+  SWIG_ADD_MODULE(EventsAPI python EventsAPI.i ${PROJECT_HEADERS})
+ENDIF()
 SWIG_LINK_LIBRARIES(EventsAPI ${SWIG_LINK_LIBRARIES})
 
 IF(WIN32)
index 08c4e8cb1cd8432a7637fcb933cbf6c65d3f5459..e4ec3f0659e76678367ae8cc4d62316104d270dc 100644 (file)
@@ -76,7 +76,11 @@ SET(SWIG_MODULE_ExchangeAPI_EXTRA_DEPS ${SWIG_MODULE_ExchangeAPI_EXTRA_DEPS}
   ${PROJECT_HEADERS}
 )
 
-SWIG_ADD_LIBRARY(ExchangeAPI LANGUAGE python SOURCES ExchangeAPI.i ${PROJECT_HEADERS})
+IF(${CMAKE_VERSION} VERSION_GREATER "3.8.0")
+  SWIG_ADD_LIBRARY(ExchangeAPI LANGUAGE python SOURCES ExchangeAPI.i ${PROJECT_HEADERS})
+ELSE()
+  SWIG_ADD_MODULE(ExchangeAPI python ExchangeAPI.i ${PROJECT_HEADERS})
+ENDIF()
 SWIG_LINK_LIBRARIES(ExchangeAPI ${SWIG_LINK_LIBRARIES})
 
 IF(WIN32)
index e44030e6476fb6fb9ff08a990984370d695b8e27..b4ac9a4bbd1bbba63e8300020b4b0fc1115d5bff 100644 (file)
@@ -118,7 +118,11 @@ SET(SWIG_MODULE_FeaturesAPI_EXTRA_DEPS ${SWIG_MODULE_FeaturesAPI_EXTRA_DEPS}
   ${PROJECT_HEADERS}
 )
 
-SWIG_ADD_LIBRARY(FeaturesAPI LANGUAGE python SOURCES FeaturesAPI.i ${PROJECT_HEADERS})
+IF(${CMAKE_VERSION} VERSION_GREATER "3.8.0")
+  SWIG_ADD_LIBRARY(FeaturesAPI LANGUAGE python SOURCES FeaturesAPI.i ${PROJECT_HEADERS})
+ELSE()
+  SWIG_ADD_MODULE(FeaturesAPI python FeaturesAPI.i ${PROJECT_HEADERS})
+ENDIF()
 SWIG_LINK_LIBRARIES(FeaturesAPI ${SWIG_LINK_LIBRARIES})
 
 IF(WIN32)
index eea7900cb107120ebbac6c22f99249e4b6bbac16..701d3570d8d5378699d737161cf01cbcb5290e27 100644 (file)
@@ -74,7 +74,11 @@ SET(SWIG_MODULE_GDMLAPI_EXTRA_DEPS ${SWIG_MODULE_GDMLAPI_EXTRA_DEPS}
   ${PROJECT_HEADERS}
 )
 
-SWIG_ADD_LIBRARY(GDMLAPI LANGUAGE python SOURCES GDMLAPI.i ${PROJECT_HEADERS})
+IF(${CMAKE_VERSION} VERSION_GREATER "3.8.0")
+  SWIG_ADD_LIBRARY(GDMLAPI LANGUAGE python SOURCES GDMLAPI.i ${PROJECT_HEADERS})
+ELSE()
+  SWIG_ADD_MODULE(GDMLAPI python GDMLAPI.i ${PROJECT_HEADERS})
+ENDIF()
 SWIG_LINK_LIBRARIES(GDMLAPI ${SWIG_LINK_LIBRARIES})
 
 IF(WIN32)
index f74506b6ca551fed9eb5392b9ea7d644a87a4058..b2a2953b565db20d471b5211c89791c224b6b16b 100644 (file)
@@ -132,7 +132,11 @@ SET(SWIG_LINK_LIBRARIES
   ${PYTHON_LIBRARIES}
 )
 
-SWIG_ADD_LIBRARY(GeomAPI LANGUAGE python SOURCES GeomAPI.i ${PROJECT_HEADERS})
+IF(${CMAKE_VERSION} VERSION_GREATER "3.8.0")
+  SWIG_ADD_LIBRARY(GeomAPI LANGUAGE python SOURCES GeomAPI.i ${PROJECT_HEADERS})
+ELSE()
+  SWIG_ADD_MODULE(GeomAPI python GeomAPI.i ${PROJECT_HEADERS})
+ENDIF()
 SWIG_LINK_LIBRARIES(GeomAPI ${SWIG_LINK_LIBRARIES})
 
 IF(WIN32)
index 97eb347d2aeb8d6137a3fee58691d9ba1694d6a7..956eb9cd2b3f3c80005a352b4c9ac6352f9af3aa 100644 (file)
@@ -189,7 +189,11 @@ SET(SWIG_LINK_LIBRARIES
   ${PYTHON_LIBRARIES}
 )
 
-SWIG_ADD_LIBRARY(GeomAlgoAPI LANGUAGE python SOURCES 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)
index d975ae0b04b86763a49228958652bc6359bff5b4..f22839d32ed01989d9b8863627ab528b3afe6c19 100644 (file)
@@ -64,7 +64,11 @@ SET(SWIG_LINK_LIBRARIES
   ${PYTHON_LIBRARIES}
 )
 
-SWIG_ADD_LIBRARY(GeomDataAPI LANGUAGE python SOURCES GeomDataAPI.i ${PROJECT_HEADERS})
+IF(${CMAKE_VERSION} VERSION_GREATER "3.8.0")
+  SWIG_ADD_LIBRARY(GeomDataAPI LANGUAGE python SOURCES GeomDataAPI.i ${PROJECT_HEADERS})
+ELSE()
+  SWIG_ADD_MODULE(GeomDataAPI python GeomDataAPI.i ${PROJECT_HEADERS})
+ENDIF()
 SWIG_LINK_LIBRARIES(GeomDataAPI ${SWIG_LINK_LIBRARIES})
 
 IF(WIN32)
index f10b3bf678402a47b1850ba91ae123bf07c9761e..563611b7aa7180f68973516b0e2daca838ab0b86 100644 (file)
@@ -146,7 +146,11 @@ SET(SWIG_LINK_LIBRARIES
   ${PYTHON_LIBRARIES}
 )
 
-SWIG_ADD_LIBRARY(ModelAPI LANGUAGE python SOURCES ModelAPI.i ${PROJECT_HEADERS})
+IF(${CMAKE_VERSION} VERSION_GREATER "3.8.0")
+  SWIG_ADD_LIBRARY(ModelAPI LANGUAGE python SOURCES ModelAPI.i ${PROJECT_HEADERS})
+ELSE()
+  SWIG_ADD_MODULE(ModelAPI python ModelAPI.i ${PROJECT_HEADERS})
+ENDIF()
 SWIG_LINK_LIBRARIES(ModelAPI ${SWIG_LINK_LIBRARIES})
 
 IF(WIN32)
index bc994a02eb0c795ad5dc83107218e174554081b0..58e55ff583cf1bfafb856622599c66d41ec7aab0 100755 (executable)
@@ -74,7 +74,11 @@ SET(SWIG_LINK_LIBRARIES
   ${PYTHON_LIBRARIES}
 )
 
-SWIG_ADD_LIBRARY(ModelGeomAlgo LANGUAGE python SOURCES ModelGeomAlgo.i ${PROJECT_HEADERS})
+IF(${CMAKE_VERSION} VERSION_GREATER "3.8.0")
+  SWIG_ADD_LIBRARY(ModelGeomAlgo LANGUAGE python SOURCES ModelGeomAlgo.i ${PROJECT_HEADERS})
+ELSE()
+  SWIG_ADD_MODULE(ModelGeomAlgo python ModelGeomAlgo.i ${PROJECT_HEADERS})
+ENDIF()
 SWIG_LINK_LIBRARIES(ModelGeomAlgo ${SWIG_LINK_LIBRARIES})
 
 IF(WIN32)
index 0bc3eb013f6a343dcdc4db05a47abf2692ff84d6..db374645ce88bf3cd3882e6246e6b1ef72d32f92 100644 (file)
@@ -93,7 +93,11 @@ set(SWIG_MODULE_ModelHighAPI_EXTRA_DEPS
   ${PROJECT_HEADERS}
 )
 
-SWIG_ADD_LIBRARY(ModelHighAPI LANGUAGE python SOURCES ModelHighAPI.i ${PROJECT_HEADERS})
+IF(${CMAKE_VERSION} VERSION_GREATER "3.8.0")
+  SWIG_ADD_LIBRARY(ModelHighAPI LANGUAGE python SOURCES ModelHighAPI.i ${PROJECT_HEADERS})
+ELSE()
+  SWIG_ADD_MODULE(ModelHighAPI python ModelHighAPI.i ${PROJECT_HEADERS})
+ENDIF()
 SWIG_LINK_LIBRARIES(ModelHighAPI ${SWIG_LINK_LIBRARIES})
 
 IF(WIN32)
index 926344bd54eeb6b1cc85a8b1e828b78effabf659..08e513cc5dc98a7349f0e7fad7a6a67ed1c5364d 100644 (file)
@@ -75,7 +75,11 @@ SET(SWIG_MODULE_ParametersAPI_EXTRA_DEPS ${SWIG_MODULE_ParametersAPI_EXTRA_DEPS}
   ${PROJECT_HEADERS}
 )
 
-SWIG_ADD_LIBRARY(ParametersAPI LANGUAGE python SOURCES ParametersAPI.i ${PROJECT_HEADERS})
+IF(${CMAKE_VERSION} VERSION_GREATER "3.8.0")
+  SWIG_ADD_LIBRARY(ParametersAPI LANGUAGE python SOURCES ParametersAPI.i ${PROJECT_HEADERS})
+ELSE()
+  SWIG_ADD_MODULE(ParametersAPI python ParametersAPI.i ${PROJECT_HEADERS})
+ENDIF()
 SWIG_LINK_LIBRARIES(ParametersAPI ${SWIG_LINK_LIBRARIES})
 
 IF(WIN32)
index 6747370c774c5dbe865b75f9f17bad9336c3b098..4b2e45c7cd91f522dc00a9d3f903062c8a60826c 100644 (file)
@@ -76,7 +76,11 @@ SET(SWIG_MODULE_PartSetAPI_EXTRA_DEPS ${SWIG_MODULE_PartSetAPI_EXTRA_DEPS}
   ${PROJECT_HEADERS}
 )
 
-SWIG_ADD_LIBRARY(PartSetAPI LANGUAGE python SOURCES PartSetAPI.i ${PROJECT_HEADERS})
+IF(${CMAKE_VERSION} VERSION_GREATER "3.8.0")
+  SWIG_ADD_LIBRARY(PartSetAPI LANGUAGE python SOURCES PartSetAPI.i ${PROJECT_HEADERS})
+ELSE()
+  SWIG_ADD_MODULE(PartSetAPI python PartSetAPI.i ${PROJECT_HEADERS})
+ENDIF()
 SWIG_LINK_LIBRARIES(PartSetAPI ${SWIG_LINK_LIBRARIES})
 
 IF(WIN32)
index b49f75384642745cbfaeeec4238c715bbfaeb4fc..8cd9c647e2071c00206f8b5d8366371b5bd9d185 100644 (file)
@@ -80,7 +80,11 @@ SET(SWIG_MODULE_PrimitivesAPI_EXTRA_DEPS ${SWIG_MODULE_PrimitivesAPI_EXTRA_DEPS}
   ${PROJECT_HEADERS}
 )
 
-SWIG_ADD_LIBRARY(PrimitivesAPI LANGUAGE python SOURCES PrimitivesAPI.i ${PROJECT_HEADERS})
+IF(${CMAKE_VERSION} VERSION_GREATER "3.8.0")
+  SWIG_ADD_LIBRARY(PrimitivesAPI LANGUAGE python SOURCES PrimitivesAPI.i ${PROJECT_HEADERS})
+ELSE()
+  SWIG_ADD_MODULE(PrimitivesAPI python PrimitivesAPI.i ${PROJECT_HEADERS})
+ENDIF()
 SWIG_LINK_LIBRARIES(PrimitivesAPI ${SWIG_LINK_LIBRARIES})
 
 IF(WIN32)
index d7cc664ab0d65c5cf1dee4517e01d572e3c7b67e..c61a089ee8345e85402ef652961a801dba787c23 100644 (file)
@@ -105,7 +105,11 @@ SET(SWIG_MODULE_SketchAPI_EXTRA_DEPS ${SWIG_MODULE_SketchAPI_EXTRA_DEPS}
   ${PROJECT_HEADERS}
 )
 
-SWIG_ADD_LIBRARY(SketchAPI LANGUAGE python SOURCES SketchAPI.i ${PROJECT_HEADERS})
+IF(${CMAKE_VERSION} VERSION_GREATER "3.8.0")
+  SWIG_ADD_LIBRARY(SketchAPI LANGUAGE python SOURCES SketchAPI.i ${PROJECT_HEADERS})
+ELSE()
+  SWIG_ADD_MODULE(SketchAPI python SketchAPI.i ${PROJECT_HEADERS})
+ENDIF()
 SWIG_LINK_LIBRARIES(SketchAPI ${SWIG_LINK_LIBRARIES})
 
 IF(WIN32)