2015-10-20 08:05:00 +01:00
|
|
|
|
2017-02-20 15:28:46 +00:00
|
|
|
#CHECK: PythonLibs, changed to work in WIN32
|
2014-12-14 12:05:43 +00:00
|
|
|
|
2017-05-08 18:51:29 +01:00
|
|
|
set (PYTHON_SOURCES python.c pl2py.c pybips.c py2pl.c pl2pl.c pypreds.c)
|
2016-08-18 08:12:40 +01:00
|
|
|
|
2017-06-13 13:34:17 +01:00
|
|
|
set (PYTHON_HEADERS py4yap.h)
|
2016-08-22 06:08:59 +01:00
|
|
|
|
2017-05-08 18:51:29 +01:00
|
|
|
set (CMAKE_POSITION_INDEPENDENT_CODE TRUE)
|
2016-12-10 07:01:10 +00:00
|
|
|
|
2017-06-13 13:34:17 +01:00
|
|
|
include_directories( ${CMAKE_BINARY_DIR} ${CMAKE_SOURCE_DIR}/include )
|
|
|
|
|
2017-06-16 11:53:46 +01:00
|
|
|
add_library (YAPPython SHARED pyload.c ${PYTHON_HEADERS} )
|
|
|
|
|
2017-06-12 18:00:47 +01:00
|
|
|
if (WIN32)
|
2017-06-15 22:40:55 +01:00
|
|
|
add_library (Py4YAP OBJECT ${PYTHON_SOURCES} ${PYTHON_HEADERS})
|
2017-06-16 11:53:46 +01:00
|
|
|
|
2017-06-15 22:40:55 +01:00
|
|
|
else()
|
|
|
|
add_library (Py4YAP SHARED ${PYTHON_SOURCES} ${PYTHON_HEADERS})
|
|
|
|
|
|
|
|
# arithmetic hassle.
|
|
|
|
set_property(TARGET Py4YAP PROPERTY CXX_STANDARD_REQUIRED ON)
|
|
|
|
|
|
|
|
target_link_libraries(Py4YAP libYap ${PYTHON_LIBRARIES})
|
|
|
|
target_link_libraries(YAPPython Py4YAP)
|
|
|
|
|
|
|
|
MY_install(TARGETS Py4YAP
|
|
|
|
LIBRARY DESTINATION ${libdir}
|
|
|
|
RUNTIME DESTINATION ${dlls}
|
|
|
|
ARCHIVE DESTINATION ${libdir} )
|
2017-06-12 18:00:47 +01:00
|
|
|
endif()
|
2016-07-31 16:09:21 +01:00
|
|
|
|
2017-06-15 22:40:55 +01:00
|
|
|
|
2017-06-08 22:16:52 +01:00
|
|
|
# arithmetic hassle.
|
|
|
|
set_property(TARGET YAPPython PROPERTY CXX_STANDARD_REQUIRED ON)
|
|
|
|
|
2017-06-13 13:34:17 +01:00
|
|
|
target_link_libraries(YAPPython libYap ${PYTHON_LIBRARIES})
|
2017-05-14 11:36:09 +01:00
|
|
|
|
2017-06-16 11:53:46 +01:00
|
|
|
set_property( SOURCE ${PYTHON_SOURCES} APPEND PROPERTY COMPILE_DEFINITIONS YAP_KERNEL=1 _GNU_SOURCE=1)
|
2016-04-12 16:22:53 +01:00
|
|
|
|
2017-05-08 18:51:29 +01:00
|
|
|
set (PYTHON_PL python.pl)
|
2016-07-31 16:09:21 +01:00
|
|
|
|
2017-05-08 18:51:29 +01:00
|
|
|
install(FILES python.pl DESTINATION ${libpl} )
|
2014-12-14 12:05:43 +00:00
|
|
|
|
2017-05-08 18:51:29 +01:00
|
|
|
add_to_group( pl_library PYTHON_PL )
|
2014-12-14 12:05:43 +00:00
|
|
|
|
2017-06-16 11:53:46 +01:00
|
|
|
set_target_properties (YAPPython PROPERTIES PREFIX "")
|
2017-02-22 21:28:05 +00:00
|
|
|
|
2017-05-02 07:38:23 +01:00
|
|
|
install(TARGETS YAPPython
|
2017-05-27 22:54:00 +01:00
|
|
|
LIBRARY DESTINATION ${dlls}
|
|
|
|
RUNTIME DESTINATION ${dlls}
|
|
|
|
ARCHIVE DESTINATION ${dlls} )
|
2016-08-22 04:01:38 +01:00
|
|
|
|