1 # Copyright (C) 2014-2023 CEA, EDF
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
21 FIND_PACKAGE(SWIG REQUIRED)
23 INCLUDE(${SWIG_USE_FILE})
38 Events_MessageGroup.cpp
42 Events_InfoMessage.cpp
43 Events_MessageBool.cpp
50 ADD_DEFINITIONS(-DEVENTS_EXPORTS)
51 ADD_LIBRARY(Events SHARED ${PROJECT_SOURCES} ${PROJECT_HEADERS})
53 SET(CMAKE_SWIG_FLAGS -threads -w362)
55 SET_SOURCE_FILES_PROPERTIES(Events.i PROPERTIES CPLUSPLUS ON)
56 SET_SOURCE_FILES_PROPERTIES(Events.i PROPERTIES SWIG_DEFINITIONS "-shadow")
62 TARGET_LINK_LIBRARIES(Events ${PROJECT_LIBRARIES})
65 ${CMAKE_CURRENT_BINARY_DIR}/EventsAPI.py
68 SET(SWIG_LINK_LIBRARIES
73 IF(${CMAKE_VERSION} VERSION_GREATER "3.8.0")
74 SWIG_ADD_LIBRARY(EventsAPI LANGUAGE python SOURCES Events.i ${PROJECT_HEADERS})
76 SWIG_ADD_MODULE(EventsAPI python Events.i ${PROJECT_HEADERS})
78 SWIG_LINK_LIBRARIES(EventsAPI ${SWIG_LINK_LIBRARIES})
81 SET_TARGET_PROPERTIES(_EventsAPI PROPERTIES DEBUG_OUTPUT_NAME _EventsAPI_d)
84 INSTALL(TARGETS Events DESTINATION ${SHAPER_INSTALL_BIN})
85 INSTALL(TARGETS _EventsAPI DESTINATION ${SHAPER_INSTALL_SWIG})
86 INSTALL(FILES ${SWIG_SCRIPTS} DESTINATION ${SHAPER_INSTALL_SWIG})