Making python layer work with cmake

This commit is contained in:
philkr 2015-03-06 16:49:19 -08:00
Родитель 65d84a595d
Коммит 3d30510a50
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()