]> SALOME platform Git repositories - modules/shaper.git/blob - src/Events/CMakeLists.txt
Salome HOME
Fix for the issue #2401
[modules/shaper.git] / src / Events / CMakeLists.txt
1 ## Copyright (C) 2014-2017  CEA/DEN, EDF R&D
2 ##
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.
7 ##
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.
12 ##
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
16 ##
17 ## See http:##www.salome-platform.org/ or
18 ## email : webmaster.salome@opencascade.com<mailto:webmaster.salome@opencascade.com>
19 ##
20
21 INCLUDE(Common)
22 FIND_PACKAGE(SWIG REQUIRED)
23
24 INCLUDE(${SWIG_USE_FILE})
25
26 SET(PROJECT_HEADERS
27     Events.h
28     Events_Message.h
29     Events_MessageGroup.h
30     Events_Listener.h
31     Events_Loop.h
32     Events_LongOp.h
33     Events_InfoMessage.h
34 )
35
36 SET(PROJECT_SOURCES
37     Events_Message.cpp
38     Events_MessageGroup.cpp
39     Events_Listener.cpp
40     Events_Loop.cpp
41     Events_LongOp.cpp
42     Events_InfoMessage.cpp
43 )
44
45 ADD_DEFINITIONS(-DEVENTS_EXPORTS)
46 ADD_LIBRARY(Events SHARED ${PROJECT_SOURCES} ${PROJECT_HEADERS})
47
48 SET(CMAKE_SWIG_FLAGS -threads -Wall)
49
50 SET_SOURCE_FILES_PROPERTIES(Events.i PROPERTIES CPLUSPLUS ON)
51 SET_SOURCE_FILES_PROPERTIES(Events.i PROPERTIES SWIG_DEFINITIONS "-shadow")
52
53 INCLUDE_DIRECTORIES(
54 )
55
56 TARGET_LINK_LIBRARIES(Events ${PROJECT_LIBRARIES})
57
58 SET(SWIG_SCRIPTS
59   ${CMAKE_CURRENT_BINARY_DIR}/EventsAPI.py
60 )
61
62 SET(SWIG_LINK_LIBRARIES
63   Events
64   ${PYTHON_LIBRARIES}
65 )
66
67 SWIG_ADD_MODULE(EventsAPI python Events.i ${PROJECT_HEADERS})
68 SWIG_LINK_LIBRARIES(EventsAPI ${SWIG_LINK_LIBRARIES})
69
70 IF(WIN32)
71   SET_TARGET_PROPERTIES(_EventsAPI PROPERTIES DEBUG_OUTPUT_NAME _EventsAPI_d)
72 ENDIF(WIN32)
73
74 INSTALL(TARGETS Events DESTINATION ${SHAPER_INSTALL_BIN})
75 INSTALL(TARGETS _EventsAPI DESTINATION ${SHAPER_INSTALL_SWIG})
76 INSTALL(FILES ${SWIG_SCRIPTS} DESTINATION ${SHAPER_INSTALL_SWIG})