Fix install libcaffe2_protos.a issue mentioned in #14317 (#17393)
authorGemfield <gemfield@civilnet.cn>
Sat, 23 Feb 2019 00:56:06 +0000 (16:56 -0800)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Sat, 23 Feb 2019 01:05:48 +0000 (17:05 -0800)
Summary:
Fix install libcaffe2_protos.a issue mentioned in #14317.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/17393

Differential Revision: D14195359

Pulled By: soumith

fbshipit-source-id: ed4da594905d708d03fcd719dc50aec6811d5d3f

caffe2/CMakeLists.txt
scripts/README.md

index 43af006..6cd02d4 100644 (file)
@@ -206,6 +206,9 @@ if(NOT BUILD_ATEN_ONLY)
   #     nothing changes. If one has a dependent library that uses protobuf, then one needs to
   #     have the right protobuf version as well as linking to libprotobuf.a.
   target_link_libraries(caffe2_protos PUBLIC protobuf::libprotobuf)
+  if (NOT BUILD_SHARED_LIBS)
+    INSTALL(TARGETS caffe2_protos ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}")
+  endif()
 endif()
 
 # Compile exposed libraries.
index 102f049..07e12e5 100644 (file)
@@ -1,8 +1,8 @@
-This directory contains the usful tools.
+This directory contains the useful tools.
 
 
 ## build_android.sh
-This script is to build PyTorch/Caffe2 library for Android. Take following steps to start the build:
+This script is to build PyTorch/Caffe2 library for Android. Take the following steps to start the build:
 
 - set ANDROID_NDK to the location of ndk