cmmake
This commit is contained in:
@@ -5,31 +5,33 @@ set (PYTHON_SOURCES python.c pl2py.c pybips.c py2pl.c pl2pl.c pypreds.c)
|
||||
|
||||
set (PYTHON_HEADERS py4yap.h)
|
||||
|
||||
|
||||
set (CMAKE_POSITION_INDEPENDENT_CODE TRUE)
|
||||
|
||||
include_directories( ${CMAKE_BINARY_DIR} ${CMAKE_SOURCE_DIR}/include )
|
||||
include_directories( ${CMAKE_BINARY_DIR}
|
||||
${CMAKE_SOURCE_DIR}/include ${CMAKE_SOURCE_DIR}/os )
|
||||
|
||||
#talk to python.pl
|
||||
add_lib(YAPPython pyload.c ${PYTHON_HEADERS} )
|
||||
|
||||
add_library (YAPPython SHARED pyload.c ${PYTHON_HEADERS} )
|
||||
|
||||
if (WIN32)
|
||||
add_library (Py4YAP OBJECT ${PYTHON_SOURCES} ${PYTHON_HEADERS})
|
||||
|
||||
target_link_libraries(YAPPython libYap ${PYTHON_LIBRARIES})
|
||||
|
||||
|
||||
else()
|
||||
add_library (Py4YAP SHARED ${PYTHON_SOURCES} ${PYTHON_HEADERS})
|
||||
add_lib(Py4YAP ${PYTHON_SOURCES} ${PYTHON_HEADERS})
|
||||
|
||||
# arithmetic hassle.
|
||||
set_property(TARGET Py4YAP PROPERTY CXX_STANDARD_REQUIRED ON)
|
||||
|
||||
target_link_libraries(Py4YAP libYap ${PYTHON_LIBRARIES})
|
||||
|
||||
MY_install(TARGETS Py4YAP
|
||||
LIBRARY DESTINATION ${libdir}
|
||||
RUNTIME DESTINATION ${dlls}
|
||||
ARCHIVE DESTINATION ${libdir} )
|
||||
endif()
|
||||
# arithmetic hassle.
|
||||
|
||||
target_link_libraries( YAPPython Py4YAP )
|
||||
endif()
|
||||
|
||||
target_link_libraries(YAPPython libYap ${PYTHON_LIBRARIES})
|
||||
|
||||
# arithmetic hassle.
|
||||
set_property(TARGET YAPPython PROPERTY CXX_STANDARD_REQUIRED ON)
|
||||
|
Reference in New Issue
Block a user