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

60 lines
1.1 KiB
CMake
Raw Normal View History

2015-10-20 08:05:00 +01:00
#CHECK: PythonLibs, changed to work in WIN32
2014-12-14 12:05:43 +00:00
2016-08-18 08:12:40 +01:00
if (PYTHONLIBS_FOUND)
include(FindPythonModule)
2016-08-22 06:08:59 +01:00
set (PYTHON_SOURCES
python.c pl2py.c pybips.c py2pl.c pl2pl.c pypreds.c)
2016-12-10 07:01:10 +00:00
set (PYTHON_HEADERS
python.h)
2016-07-31 16:09:21 +01:00
set (CMAKE_POSITION_INDEPENDENT_CODE TRUE)
2016-04-12 16:22:53 +01:00
add_library (YAPPython SHARED ${PYTHON_SOURCES})
2016-07-31 16:09:21 +01:00
2017-02-22 08:56:20 +00:00
target_link_libraries(YAPPython libYap ${PYTHON_LIBRARY}
${WINDLLS}
${GMP_LIBRARIES})
2014-12-14 12:05:43 +00:00
set_property( SOURCE ${PYTHON_SOURCES} APPEND PROPERTY COMPILE_DEFINITIONS YAP_KERNEL=1)
2015-02-03 02:37:25 +00:00
2014-12-14 12:05:43 +00:00
install(FILES python.pl
DESTINATION ${libpl}
)
2016-08-23 01:18:33 +01:00
configure_file ("setup.py.cmake" "setup.py" )
set(SETUP_PY "${CMAKE_CURRENT_BINARY_DIR}/setup.py")
#set_target_properties (YAPPython PROPERTIES PREFIX "")
2015-02-03 02:37:25 +00:00
2016-08-22 04:01:38 +01:00
find_python_module( jupyter )
if (PY_JUPYTER)
2016-08-18 08:13:55 +01:00
add_subdirectory(yap_kernel)
ENDIF()
2017-02-22 21:28:05 +00:00
IF(WIN32)
install(TARGETS YAPPython
LIBRARY DESTINATION ${dlls}
2017-02-22 21:28:05 +00:00
RUNTIME DESTINATION ${bindir}
ARCHIVE DESTINATION ${dlls} )
else()
install(TARGETS YAPPython
LIBRARY DESTINATION ${dlls}
RUNTIME DESTINATION ${dlls}
ARCHIVE DESTINATION ${dlls} )
2017-02-22 21:28:05 +00:00
endif()
2016-08-22 04:01:38 +01:00
endif (PYTHONLIBS_FOUND)