X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FNOTIFICATION_SWIG%2FCMakeLists.txt;h=5fe54d60b9e95f36e97c0a340c74803d1272582b;hb=d8edd4804d9e6513a17c497c1a30326d4ba0d677;hp=7cc2f38f67ddaeae77002aed8bfa4df67713008d;hpb=dcbe70dbef42037f66ce95d3e09d4c0b32f9687c;p=modules%2Fkernel.git diff --git a/src/NOTIFICATION_SWIG/CMakeLists.txt b/src/NOTIFICATION_SWIG/CMakeLists.txt old mode 100755 new mode 100644 index 7cc2f38f6..5fe54d60b --- a/src/NOTIFICATION_SWIG/CMakeLists.txt +++ b/src/NOTIFICATION_SWIG/CMakeLists.txt @@ -1,9 +1,9 @@ -# Copyright (C) 2012-2013 CEA/DEN, EDF R&D, OPEN CASCADE +# Copyright (C) 2012-2021 CEA/DEN, EDF R&D, OPEN CASCADE # # 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. +# 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 @@ -20,12 +20,12 @@ INCLUDE(${SWIG_USE_FILE}) SET_SOURCE_FILES_PROPERTIES(NOTIFICATION.i PROPERTIES CPLUSPLUS ON) -SET_SOURCE_FILES_PROPERTIES(NOTIFICATION.i PROPERTIES SWIG_DEFINITIONS "-shadow") +SET_SOURCE_FILES_PROPERTIES(NOTIFICATION.i PROPERTIES SWIG_FLAGS "-py3") SET_SOURCE_FILES_PROPERTIES(NOTIFICATIONPYTHON_wrap.cxx PROPERTIES COMPILE_FLAGS "${OMNIORB_DEFINITIONS} -DHAVE_CONFIG_H") INCLUDE_DIRECTORIES( - ${PYTHON_INCLUDE_DIRS} - ${PTHREAD_INCLUDE_DIRS} + ${PYTHON_INCLUDE_DIRS} + ${PTHREAD_INCLUDE_DIR} ${OMNIORB_INCLUDE_DIR} ${CMAKE_CURRENT_SOURCE_DIR} ${PROJECT_BINARY_DIR}/salome_adm @@ -37,9 +37,15 @@ INCLUDE_DIRECTORIES( # SWIG module name differs from file name - avoid unnecessary rebuild: SET_SOURCE_FILES_PROPERTIES(NOTIFICATION.i PROPERTIES SWIG_MODULE_NAME libNOTIFICATION) -SWIG_ADD_MODULE(libNOTIFICATION python NOTIFICATION.i NOTIFICATION_Swig.cxx) +IF(${CMAKE_VERSION} VERSION_LESS "3.8.0") + SWIG_ADD_MODULE(libNOTIFICATION python NOTIFICATION.i NOTIFICATION_Swig.cxx) +ELSE() + SWIG_ADD_LIBRARY(libNOTIFICATION LANGUAGE python SOURCES NOTIFICATION.i NOTIFICATION_Swig.cxx) +ENDIF() + + SWIG_LINK_LIBRARIES(libNOTIFICATION ${PYTHON_LIBRARIES} SalomeNotification) -ADD_DEFINITIONS(${OMNIORB_DEFINITIONS} ${PLATFORM_DEFINITIONS}) +ADD_DEFINITIONS(${OMNIORB_DEFINITIONS}) IF(${MACHINE} STREQUAL WINDOWS) SET_TARGET_PROPERTIES(_libNOTIFICATION PROPERTIES DEBUG_OUTPUT_NAME _libNOTIFICATION_d)