[arrayfire] 47/61: Install examples source irrespective of value of BUILD_EXAMPLES

Ghislain Vaillant ghisvail-guest at moszumanska.debian.org
Tue Dec 8 11:55:10 UTC 2015


This is an automated email from the git hooks/post-receive script.

ghisvail-guest pushed a commit to branch dfsg-clean
in repository arrayfire.

commit 92599d7da5c533785bd7b3d8619bbdd26215f338
Author: Shehzan Mohammed <shehzan at arrayfire.com>
Date:   Thu Dec 3 13:39:53 2015 -0500

    Install examples source irrespective of value of BUILD_EXAMPLES
    
    * Only the examples source is installed, which does not depend on the value of
    BUILD_EXAMPLES.
    * So when BUILD_EXAMPLES is OFF, the examples source is installed without
    building the examples.
---
 CMakeLists.txt          | 13 +++++++++++++
 examples/CMakeLists.txt |  8 --------
 2 files changed, 13 insertions(+), 8 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index c76ef4b..28c983f 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -235,6 +235,19 @@ INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/Install/ArrayFireConfig.cmake
     DESTINATION ${AF_INSTALL_CMAKE_DIR}
     COMPONENT cmake)
 
+# install the examples irrespective of the BUILD_EXAMPLES value
+# only the examples source files are installed, so the installation of these
+# source files does not depend on BUILD_EXAMPLES
+# when BUILD_EXAMPLES is OFF, the examples source is installed without
+# building the example executables
+INSTALL(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/examples/"
+    DESTINATION "${AF_INSTALL_EXAMPLE_DIR}"
+    COMPONENT examples)
+
+INSTALL(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/assets/examples"
+    DESTINATION "${AF_INSTALL_EXAMPLE_DIR}/assets"
+    COMPONENT examples)
+
 IF(APPLE)
     INCLUDE("${CMAKE_MODULE_PATH}/osx_install/OSXInstaller.cmake")
 ENDIF(APPLE)
diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt
index 9acc046..5144bf6 100644
--- a/examples/CMakeLists.txt
+++ b/examples/CMakeLists.txt
@@ -127,11 +127,3 @@ IF (${OpenCL_FOUND})
 ELSE()
     MESSAGE(STATUS "EXAMPLES: OpenCL backend is OFF. OpenCL was not found")
 ENDIF()
-
-INSTALL(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/"
-    DESTINATION "${AF_INSTALL_EXAMPLE_DIR}"
-    COMPONENT examples)
-
-INSTALL(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/../assets/examples"
-    DESTINATION "${AF_INSTALL_EXAMPLE_DIR}/assets"
-)

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/arrayfire.git



More information about the debian-science-commits mailing list