1 CMAKE_MINIMUM_REQUIRED(VERSION 2.8.11)
3 FIND_PACKAGE(SWIG REQUIRED)
4 INCLUDE(${SWIG_USE_FILE})
6 INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR})
11 ModelAPI_PluginManager.h
18 ModelAPI_PluginManager.cxx
21 ADD_DEFINITIONS(-DMODELAPI_EXPORTS)
22 ADD_LIBRARY(ModelAPI SHARED ${PROJECT_SOURCES} ${PROJECT_HEADERS})
23 SET_TARGET_PROPERTIES(ModelAPI PROPERTIES LINKER_LANGUAGE CXX)
24 #TARGET_LINK_LIBRARIES(ModelAPI ${PROJECT_LIBRARIES})
26 SET(CMAKE_SWIG_FLAGS "")
28 SET_SOURCE_FILES_PROPERTIES(ModelAPI.i PROPERTIES CPLUSPLUS ON)
29 # "-includeall" is not needed: it starts to follow the standard inludes (like "string") without success
30 # SET_SOURCE_FILES_PROPERTIES(ModelAPI.i PROPERTIES SWIG_FLAGS)
31 SET_SOURCE_FILES_PROPERTIES(ModelAPI.i PROPERTIES SWIG_DEFINITIONS "-shadow")
32 #SET_SOURCE_FILES_PROPERTIES(ModelAPIPYTHON_wrap.cxx PROPERTIES COMPILE_FLAGS "-D_WIN32")
35 ${CMAKE_CURRENT_BINARY_DIR}/ModelAPI.py
38 SET(SWIG_LINK_LIBRARIES
43 SWIG_ADD_MODULE(ModelAPI python ModelAPI.i ${PROJECT_HEADERS})
44 SWIG_LINK_LIBRARIES(ModelAPI ${SWIG_LINK_LIBRARIES})
47 SET_TARGET_PROPERTIES(_ModelAPI PROPERTIES DEBUG_OUTPUT_NAME _ModelAPI_d)
50 INSTALL(TARGETS _ModelAPI DESTINATION swig)
51 #INSTALL(TARGETS ${SWIG_SCRIPTS} DESTINATION swig)