Skip to content

Commit

Permalink
fixed bug in intall-tree: _caffe.so installed by install(TARGET ...) …
Browse files Browse the repository at this point in the history
…was overwritten with symlink created at build time and installed with install(DIRECTORY ...)
  • Loading branch information
Anatoly Baksheev committed Feb 22, 2015
1 parent 8cb4a2c commit 659b9fe
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions python/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ if(NOT HAVE_PYTHON)
endif()

include_directories(${PYTHON_INCLUDE_DIRS} ${NUMPY_INCLUDE_DIR} ${Boost_INCLUDE_DIRS})
file(GLOB_RECURSE python_srcs ${PROJECT_SOURCE_DIR}/python/*.cpp)
file(GLOB_RECURSE python_srcs ${CMAKE_SOURCE_DIR}/python/*.cpp)

add_library(pycaffe SHARED ${python_srcs})
target_link_libraries(pycaffe ${Caffe_LINK} ${PYTHON_LIBRARIES} ${Boost_LIBRARIES})
Expand All @@ -22,9 +22,13 @@ if(UNIX OR APPLE)
endif()

# ---[ Install
file(GLOB files *.py requirements.txt)
install(FILES ${files} DESTINATION python)
install(DIRECTORY caffe DESTINATION python)
install(TARGETS pycaffe DESTINATION python/caffe)
file(GLOB files1 *.py requirements.txt)
install(FILES ${files1} DESTINATION python)

file(GLOB files2 caffe/*.py)
install(FILES ${files2} DESTINATION python/caffe)
install(TARGETS pycaffe DESTINATION python/caffe)
install(DIRECTORY caffe/imagenet caffe/proto caffe/test DESTINATION python/caffe)



0 comments on commit 659b9fe

Please sign in to comment.