This is an automated email from the ASF dual-hosted git repository.
kellen pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git
The following commit(s) were added to refs/heads/master by this push:
new bff0fdc CMake: Enable installation of cpp-package headers (#13339)
bff0fdc is described below
commit bff0fdce13057ecd6d8b79c0c3d4dbefd5b85bd8
Author: Moritz Maxeiner <[email protected]>
AuthorDate: Mon Dec 31 23:55:55 2018 +0100
CMake: Enable installation of cpp-package headers (#13339)
* Allow CMake based installation of cpp-package
* Add installation of missing nnvm headers
* Add documentation as to where public headers will be installed
---
CMakeLists.txt | 5 +++++
cpp-package/CMakeLists.txt | 2 ++
2 files changed, 7 insertions(+)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 3b8bbd2..20ade5d 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -732,7 +732,12 @@ install(TARGETS ${MXNET_INSTALL_TARGETS}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
)
+# NOTE: Public headers will be installed into
${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_INCLUDEDIR}, see
+# https://cmake.org/cmake/help/v3.0/variable/CMAKE_INSTALL_PREFIX.html
+# https://cmake.org/cmake/help/v3.0/module/GNUInstallDirs.html
+
install(DIRECTORY include/ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
+install(DIRECTORY 3rdparty/tvm/nnvm/include/ DESTINATION
${CMAKE_INSTALL_INCLUDEDIR})
if (INSTALL_EXAMPLES)
install(DIRECTORY example DESTINATION
${CMAKE_INSTALL_DATADIR}/${PROJECT_NAME})
endif()
diff --git a/cpp-package/CMakeLists.txt b/cpp-package/CMakeLists.txt
index f7fbc77..5d29772 100644
--- a/cpp-package/CMakeLists.txt
+++ b/cpp-package/CMakeLists.txt
@@ -20,4 +20,6 @@ if(USE_CPP_PACKAGE)
add_subdirectory(example)
endif()
+ install(DIRECTORY include/ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
+
endif()