]> SALOME platform Git repositories - modules/shaper.git/blob - src/Events/CMakeLists.txt
Salome HOME
c9cb2beb04dccbab7578658a0169b8973edc908b
[modules/shaper.git] / src / Events / CMakeLists.txt
1 ## Copyright (C) 2014-20xx CEA/DEN, EDF R&D
2
3 INCLUDE(Common)
4 FIND_PACKAGE(SWIG REQUIRED)
5
6 INCLUDE(${SWIG_USE_FILE})
7
8 SET(PROJECT_HEADERS
9     Events.h
10     Events_Message.h
11     Events_MessageGroup.h 
12     Events_Listener.h
13     Events_Loop.h
14     Events_Error.h
15     Events_LongOp.h
16 )
17
18 SET(PROJECT_SOURCES
19     Events_Message.cpp
20     Events_MessageGroup.cpp
21     Events_Listener.cpp
22     Events_Loop.cpp
23     Events_Error.cpp
24     Events_LongOp.cpp
25 )
26
27 ADD_DEFINITIONS(-DEVENTS_EXPORTS)
28 ADD_LIBRARY(Events SHARED ${PROJECT_SOURCES} ${PROJECT_HEADERS})
29
30 SET(CMAKE_SWIG_FLAGS -threads -Wall)
31
32 SET_SOURCE_FILES_PROPERTIES(Events.i PROPERTIES CPLUSPLUS ON)
33 SET_SOURCE_FILES_PROPERTIES(Events.i PROPERTIES SWIG_DEFINITIONS "-shadow")
34
35 INCLUDE_DIRECTORIES(
36 )
37
38 TARGET_LINK_LIBRARIES(Events ${PROJECT_LIBRARIES})
39
40 SET(SWIG_SCRIPTS
41   ${CMAKE_CURRENT_BINARY_DIR}/EventsAPI.py
42 )
43
44 SET(SWIG_LINK_LIBRARIES
45   Events
46   ${PYTHON_LIBRARIES}
47 )
48
49 SWIG_ADD_MODULE(EventsAPI python Events.i ${PROJECT_HEADERS})
50 SWIG_LINK_LIBRARIES(EventsAPI ${SWIG_LINK_LIBRARIES})
51
52 IF(WIN32)
53   SET_TARGET_PROPERTIES(_EventsAPI PROPERTIES DEBUG_OUTPUT_NAME _EventsAPI_d)
54 ENDIF(WIN32)
55
56 INSTALL(TARGETS Events DESTINATION bin)
57 INSTALL(TARGETS _EventsAPI DESTINATION swig)
58 INSTALL(FILES ${SWIG_SCRIPTS} DESTINATION swig)