From f9fd20ea3893c515b19cae6fa3693b1649fb9487 Mon Sep 17 00:00:00 2001 From: Luke Yeager Date: Fri, 8 Jul 2016 12:05:17 -0700 Subject: Fix Python installation with CMake install target --- python/CMakeLists.txt | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) (limited to 'python') diff --git a/python/CMakeLists.txt b/python/CMakeLists.txt index a2264140..bf492a24 100644 --- a/python/CMakeLists.txt +++ b/python/CMakeLists.txt @@ -22,13 +22,19 @@ if(UNIX OR APPLE) endif() # ---[ Install -file(GLOB files1 *.py requirements.txt) -install(FILES ${files1} DESTINATION python) - -file(GLOB files2 caffe/*.py) -install(FILES ${files2} DESTINATION python/caffe) +# scripts +file(GLOB python_files *.py requirements.txt) +install(FILES ${python_files} DESTINATION python) + +# module +install(DIRECTORY caffe + DESTINATION python + FILES_MATCHING + PATTERN "*.py" + PATTERN "ilsvrc_2012_mean.npy" + PATTERN "test" EXCLUDE + ) + +# _caffe.so install(TARGETS pycaffe DESTINATION python/caffe) -install(DIRECTORY caffe/imagenet caffe/proto caffe/test DESTINATION python/caffe) - - -- cgit v1.2.3