Salome HOME
Implementation of Point feature (without computation of result yet) plus some debug...
[modules/shaper.git] / src / ModelAPI / CMakeLists.txt
1 CMAKE_MINIMUM_REQUIRED(VERSION 2.8.11)
2
3 INCLUDE(Common)
4 FIND_PACKAGE(SWIG REQUIRED)
5 INCLUDE(${SWIG_USE_FILE})
6 INCLUDE(FindPython)
7 INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR})
8
9 SET(PROJECT_HEADERS
10     ModelAPI.h
11     ModelAPI_Interface.h
12     ModelAPI_PluginManager.h
13     ModelAPI_Plugin.h
14     ModelAPI_Feature.h
15     ModelAPI_Iterator.h
16     ModelAPI_Object.h
17     ModelAPI_Document.h
18     ModelAPI_Attribute.h
19     ModelAPI_AttributeDouble.h
20     ModelAPI_AttributeDocRef.h
21 )
22
23 SET(PROJECT_SOURCES
24     ModelAPI_PluginManager.cxx
25 )
26
27 ADD_DEFINITIONS(-DMODELAPI_EXPORTS)
28 ADD_LIBRARY(ModelAPI SHARED ${PROJECT_SOURCES} ${PROJECT_HEADERS})
29 SET_TARGET_PROPERTIES(ModelAPI PROPERTIES LINKER_LANGUAGE CXX)
30 #TARGET_LINK_LIBRARIES(ModelAPI ${PROJECT_LIBRARIES})
31
32 SET(CMAKE_SWIG_FLAGS "")
33
34 SET_SOURCE_FILES_PROPERTIES(ModelAPI.i PROPERTIES CPLUSPLUS ON)
35 # "-includeall" is not needed: it starts to follow the standard inludes (like "string") without success
36 # SET_SOURCE_FILES_PROPERTIES(ModelAPI.i PROPERTIES SWIG_FLAGS)
37 SET_SOURCE_FILES_PROPERTIES(ModelAPI.i PROPERTIES SWIG_DEFINITIONS "-shadow")
38 #SET_SOURCE_FILES_PROPERTIES(ModelAPIPYTHON_wrap.cxx PROPERTIES COMPILE_FLAGS "-D_WIN32")
39
40 SET(SWIG_SCRIPTS
41   ${CMAKE_CURRENT_BINARY_DIR}/ModelAPI.py
42 )
43
44 SET(SWIG_LINK_LIBRARIES
45   ModelAPI 
46   ${PYTHON_LIBRARIES}
47 )
48
49 SWIG_ADD_MODULE(ModelAPI python ModelAPI.i ${PROJECT_HEADERS})
50 SWIG_LINK_LIBRARIES(ModelAPI ${SWIG_LINK_LIBRARIES})
51
52 IF(WIN32)
53   SET_TARGET_PROPERTIES(_ModelAPI PROPERTIES DEBUG_OUTPUT_NAME _ModelAPI_d)
54 ENDIF(WIN32)
55
56 INSTALL(TARGETS _ModelAPI DESTINATION swig)
57 #INSTALL(TARGETS ${SWIG_SCRIPTS} DESTINATION swig)
58
59