Merge branch 'master' of ssh://git.dcc.fc.up.pt/yap-6.3
This commit is contained in:
commit
843f9f8d87
@ -128,9 +128,10 @@ if (HAVE_LIBANDROID)
|
||||
set(EXTRALIBS ${EXTRALIBS} android)
|
||||
endif (HAVE_LIBANDROID)
|
||||
|
||||
check_library_exists(m main "" HAVE_LIBM)
|
||||
find_library(HAVE_LIBM m)
|
||||
if (HAVE_LIBM)
|
||||
set(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} m)
|
||||
target_link_libraries(libYap m)
|
||||
set(EXTRALIBS ${EXTRALIBS} m)
|
||||
endif (HAVE_LIBM)
|
||||
|
||||
check_library_exists(dl dlopen "" HAVE_LIBDL)
|
||||
@ -207,10 +208,11 @@ endif (HAVE_LIBLOG)
|
||||
# endif (HAVE_LIBSOCKET)
|
||||
|
||||
|
||||
check_library_exists(upthread main "" HAVE_LIBPTHREAD)
|
||||
find_library(HAVE_LIBPTHREAD pthread)
|
||||
if (HAVE_LIBPTHREAD)
|
||||
set( EXTRALIBS ${EXTRALIBS} pthread)
|
||||
endif (HAVE_LIBPTHREAD)
|
||||
target_link_libraries(libYap pthread)
|
||||
set(EXTRALIBS ${EXTRALIBS} pthread)
|
||||
endif (HAVE_LIBPTHREAD)
|
||||
|
||||
|
||||
check_library_exists(unicode main "" HAVE_LIBUNICODE)
|
||||
|
@ -1,48 +1,18 @@
|
||||
|
||||
#CHECK: PythonLibs
|
||||
|
||||
if (PYTHONLIBS_FOUND)
|
||||
|
||||
|
||||
set (PYTHON_SOURCES
|
||||
python.c pl2py.c pybips.c py2pl.c pl2pl.c pypreds.c )
|
||||
|
||||
add_library (libpython SHARED ${PYTHON_SOURCES})
|
||||
|
||||
set (PYTHON_HEADERS
|
||||
python.h)
|
||||
|
||||
#try to use Brew first
|
||||
#set ( PYTHON_LIBRARY /Anaconda/lib/libpython2.7.dylib )
|
||||
#set ( PYTHON_INCLUDE_DIR /Anaconda/include/python2.7 )
|
||||
#set( PYTHON_LIBRARY /usr/local/opt/python/Frameworks/Python.framework/Versions/Current/lib/libpython2.7.dylib) # - path to the python library
|
||||
#set( PYTHON_INCLUDE_DIR /usr/local/opt/python/Frameworks/Python.framework/Versions/Current/include/python2.7 ) # - path to where Python.h is found
|
||||
|
||||
|
||||
if (PYTHONLIBS_FOUND) # PYTHONLIBS_FOUND - have the Python libs been found
|
||||
# PYTHON_LIBRARIES - path to the python library
|
||||
# PYTHON_INCLUDE_PATH - path to where Python.h is found (deprecated)
|
||||
# PYTHON_INCLUDE_DIRS - path to where Python.h is found
|
||||
# PYTHON_DEBUG_LIBRARIES - path to the debug library (deprecated)
|
||||
# PYTHONLIBS_VERSION_STRING - version of the Python libs found (since CMake 2.8.8)
|
||||
#
|
||||
#
|
||||
#
|
||||
# The Python_ADDITIONAL_VERSIONS variable can be used to specify a list
|
||||
# of version numbers that should be taken into account when searching
|
||||
# for Python. You need to set this variable before calling
|
||||
# find_package(PythonLibs).
|
||||
#
|
||||
# If you'd like to specify the installation of Python to use, you should
|
||||
# modify the following cache variables:
|
||||
#
|
||||
# ::
|
||||
#
|
||||
# PYTHON_LIBRARY - path to the python library
|
||||
# PYTHON_INCLUDE_DIR - path to where Python.h is found
|
||||
#
|
||||
# If also calling find_package(PythonInterp), call find_package(PythonInterp)
|
||||
# first to get the currently active Python version by default with a consistent
|
||||
# version of PYTHON_LIBRARIES.
|
||||
|
||||
add_library (libpython SHARED ${PYTHON_SOURCES})
|
||||
|
||||
configure_file ("setup.py.cmake" "setup.py" )
|
||||
# configure_file ("setup.py.cmake" "setup.py" )
|
||||
|
||||
target_link_libraries(libpython libYap ${PYTHON_LIBRARIES})
|
||||
|
||||
|
Reference in New Issue
Block a user