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-05-08 18:51:29 +01:00
|
|
|
set (PYTHON_HEADERS python.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-05-08 18:51:29 +01:00
|
|
|
add_library (YAPPython SHARED ${PYTHON_SOURCES})
|
2016-07-31 16:09:21 +01:00
|
|
|
|
2017-05-14 11:36:09 +01:00
|
|
|
target_link_libraries(YAPPython libYap ${PYTHON_LIBRARY})
|
|
|
|
|
2017-05-08 18:51:29 +01:00
|
|
|
set_property( SOURCE ${PYTHON_SOURCES} APPEND PROPERTY COMPILE_DEFINITIONS YAP_KERNEL=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-05-02 07:38:23 +01:00
|
|
|
# configure_file ("setup.py.cmake" "setup.py" )
|
2016-08-23 01:18:33 +01:00
|
|
|
|
2017-05-08 18:51:29 +01:00
|
|
|
# set(SETUP_PY "${CMAKE_CURRENT_BINARY_DIR}/setup.py")
|
2017-02-22 21:28:05 +00:00
|
|
|
|
2017-05-08 18:51:29 +01:00
|
|
|
#set_target_properties (YAPPython PROPERTIES PREFIX "")
|
2017-02-22 21:28:05 +00:00
|
|
|
|
2017-05-08 18:51:29 +01:00
|
|
|
IF(WIN32)
|
2017-05-02 07:38:23 +01:00
|
|
|
install(TARGETS YAPPython
|
|
|
|
LIBRARY DESTINATION ${libdir}
|
|
|
|
RUNTIME DESTINATION ${bindir}
|
|
|
|
ARCHIVE DESTINATION ${libdir} )
|
|
|
|
else()
|
|
|
|
install(TARGETS YAPPython
|
|
|
|
LIBRARY DESTINATION ${libdir}
|
|
|
|
RUNTIME DESTINATION ${libdir}
|
|
|
|
ARCHIVE DESTINATION ${libdir} )
|
2017-05-08 18:51:29 +01:00
|
|
|
endif()
|
2016-08-22 04:01:38 +01:00
|
|
|
|