21 lines
586 B
CMake
21 lines
586 B
CMake
|
|
# This is a CMake example for Python
|
|
|
|
INCLUDE(${SWIG_USE_FILE})
|
|
|
|
FIND_PACKAGE(PythonLibs)
|
|
INCLUDE_DIRECTORIES(${PYTHON_INCLUDE_PATH})
|
|
|
|
INCLUDE_DIRECTORIES( ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_SOURCE_DIR}/CXX)
|
|
|
|
SET(CMAKE_SWIG_FLAGS "")
|
|
|
|
SET_SOURCE_FILES_PROPERTIES(../yap.i PROPERTIES CPLUSPLUS ON)
|
|
SET_SOURCE_FILES_PROPERTIES(../yap.i PROPERTIES SWIG_FLAGS "-includeall")
|
|
SWIG_ADD_MODULE(yapy python ../yap.i)
|
|
SWIG_LINK_LIBRARIES(yapy ${PYTHON_LIBRARIES} Yap++ libYap)
|
|
|
|
INSTALL(FILES yapy.py
|
|
${CMAKE_CURRENT_BINARY_DIR}/${outdir}/yap.py
|
|
DESTINATION ${libpl}/python)
|