This repository has been archived on 2023-08-20. You can view files and clone it, but cannot push or open issues or pull requests.
yap-6.3/packages/python/CMakeLists.txt
Vitor Santos Costa 65ff3ed471 Smaller updates:
constant use of longjmp
conflict with python headers
win32 support
dll support
2017-02-20 15:28:46 +00:00

51 lines
958 B
CMake

#CHECK: PythonLibs, changed to work in WIN32
if (PYTHONLIBS_FOUND)
include(FindPythonModule)
set (PYTHON_SOURCES
python.c pl2py.c pybips.c py2pl.c pl2pl.c pypreds.c)
set (PYTHON_HEADERS
python.h)
set (CMAKE_POSITION_INDEPENDENT_CODE TRUE)
add_library (YAPPython SHARED ${PYTHON_SOURCES})
target_link_libraries(YAPPython libYap ${PYTHON_LIBRARIES}
${WINDLLS}
${GMP_LIBRARIES})
set_property( SOURCE ${PYTHON_SOURCES} APPEND PROPERTY COMPILE_DEFINITIONS YAP_KERNEL=1)
install(FILES python.pl
DESTINATION ${libpl}
)
configure_file ("setup.py.cmake" "setup.py" )
set(SETUP_PY "${CMAKE_CURRENT_BINARY_DIR}/setup.py")
#set_target_properties (YAPPython PROPERTIES PREFIX "")
find_python_module( jupyter )
if (PY_JUPYTER)
add_subdirectory(yap_kernel)
ENDIF()
install(TARGETS YAPPython
LIBRARY DESTINATION ${dlls}
RUNTIME DESTINATION ${dlls}
ARCHIVE DESTINATION ${dlls} )
endif (PYTHONLIBS_FOUND)