Merge pull request #2059 from philkr/python_layer_cmake

[cmake] add Python layer
This commit is contained in:
Evan Shelhamer 2015-03-06 22:08:28 -08:00
Родитель 01342761ae 3d30510a50
Коммит a66be31501
2 изменённых файлов: 6 добавлений и 0 удалений

Просмотреть файл

@ -20,6 +20,7 @@ caffe_option(BUILD_python "Build Python wrapper" ON)
set(python_version "2" CACHE STRING "Specify which python version to use")
caffe_option(BUILD_matlab "Build Matlab wrapper" OFF IF UNIX OR APPLE)
caffe_option(BUILD_docs "Build documentation" ON IF UNIX OR APPLE)
caffe_option(BUILD_python_layer "Build the caffe python layer" ON)
# ---[ Dependencies
include(cmake/Dependencies.cmake)

Просмотреть файл

@ -127,6 +127,11 @@ if(BUILD_python)
endif()
if(PYTHONLIBS_FOUND AND NUMPY_FOUND AND Boost_PYTHON_FOUND)
set(HAVE_PYTHON TRUE)
if(BUILD_python_layer)
add_definitions(-DWITH_PYTHON_LAYER)
include_directories(SYSTEM ${PYTHON_INCLUDE_DIRS} ${NUMPY_INCLUDE_DIR} ${Boost_INCLUDE_DIRS})
list(APPEND Caffe_LINKER_LIBS ${PYTHON_LIBRARIES} ${Boost_LIBRARIES})
endif()
endif()
endif()