[arrayfire] 54/75: OSX Installer: Move libforge and ArrayFireConfig into common sub package

Ghislain Vaillant ghisvail-guest at moszumanska.debian.org
Mon Feb 29 08:01:17 UTC 2016


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 529b638ad1d0f683c093ca9945aa89ec3d1cc59f
Author: Shehzan Mohammed <shehzan at arrayfire.com>
Date:   Tue Feb 23 15:20:47 2016 -0500

    OSX Installer: Move libforge and ArrayFireConfig into common sub package
    
    * libforge and ArrayFireConfig.cmake files are now in a common package
    * This package is no visible at install time
    * The package is enabled if any of the backends are enabled (like unified)
    * This is done so that the common files are installed only once rather than by
      each backend package
---
 CMakeModules/osx_install/OSXInstaller.cmake | 25 +++++++++++++++++++++++--
 CMakeModules/osx_install/distribution.dist  | 14 ++++++++++++--
 2 files changed, 35 insertions(+), 4 deletions(-)

diff --git a/CMakeModules/osx_install/OSXInstaller.cmake b/CMakeModules/osx_install/OSXInstaller.cmake
index d79d68f..b2514f8 100644
--- a/CMakeModules/osx_install/OSXInstaller.cmake
+++ b/CMakeModules/osx_install/OSXInstaller.cmake
@@ -13,15 +13,28 @@ SET(OSX_INSTALL_DIR ${CMAKE_MODULE_PATH}/osx_install)
 ################################################################################
 SET(OSX_TEMP "${CMAKE_BINARY_DIR}/osx_install_files")
 
+# Common files - libforge, ArrayFireConfig*.cmake
 FILE(GLOB COMMONLIB "${CMAKE_INSTALL_PREFIX}/${AF_INSTALL_LIB_DIR}/libforge*.dylib")
 FILE(GLOB COMMONCMAKE "${CMAKE_INSTALL_PREFIX}/${AF_INSTALL_CMAKE_DIR}/ArrayFireConfig*.cmake")
 
+ADD_CUSTOM_TARGET(OSX_INSTALL_SETUP_COMMON)
+FOREACH(SRC ${COMMONLIB} ${COMMONCMAKE})
+    FILE(RELATIVE_PATH SRC_REL ${CMAKE_INSTALL_PREFIX} ${SRC})
+    ADD_CUSTOM_COMMAND(TARGET OSX_INSTALL_SETUP_COMMON PRE_BUILD
+                       COMMAND ${CMAKE_COMMAND} -E copy
+                       ${SRC} "${OSX_TEMP}/common/${SRC_REL}"
+                       WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
+                       COMMENT "Copying Common files to temporary OSX Install Dir"
+                       )
+ENDFOREACH()
+
+# Backends - CPU, CUDA, OpenCL, Unified
 MACRO(OSX_INSTALL_SETUP BACKEND LIB)
     FILE(GLOB ${BACKEND}LIB "${CMAKE_INSTALL_PREFIX}/${AF_INSTALL_LIB_DIR}/lib${LIB}*.dylib")
     FILE(GLOB ${BACKEND}CMAKE "${CMAKE_INSTALL_PREFIX}/${AF_INSTALL_CMAKE_DIR}/ArrayFire${BACKEND}*.cmake")
 
     ADD_CUSTOM_TARGET(OSX_INSTALL_SETUP_${BACKEND})
-    FOREACH(SRC ${${BACKEND}LIB} ${COMMONLIB} ${${BACKEND}CMAKE} ${COMMONCMAKE})
+    FOREACH(SRC ${${BACKEND}LIB} ${${BACKEND}CMAKE})
         FILE(RELATIVE_PATH SRC_REL ${CMAKE_INSTALL_PREFIX} ${SRC})
         ADD_CUSTOM_COMMAND(TARGET OSX_INSTALL_SETUP_${BACKEND} PRE_BUILD
                            COMMAND ${CMAKE_COMMAND} -E copy
@@ -157,6 +170,14 @@ PKG_BUILD(  PKG_NAME        ArrayFireUNIFIED
             PATH_TO_FILES   ${OSX_TEMP}/Unified
             FILTERS         cpu cuda opencl)
 
+PKG_BUILD(  PKG_NAME        ArrayFireCommon
+            DEPENDS         OSX_INSTALL_SETUP_COMMON
+            TARGETS         common_package
+            INSTALL_LOCATION /usr/local
+            IDENTIFIER      com.arrayfire.pkg.arrayfire.libcommon
+            PATH_TO_FILES   ${OSX_TEMP}/common
+            FILTERS         cpu cuda opencl unified)
+
 PKG_BUILD(  PKG_NAME        ArrayFireHeaders
             DEPENDS         OSX_INSTALL_SETUP_INCLUDE
             TARGETS         header_package
@@ -180,5 +201,5 @@ PKG_BUILD(  PKG_NAME        ArrayFireDoc
             PATH_TO_FILES   ${OSX_TEMP}/doc
             FILTERS         cmake)
 
-PRODUCT_BUILD(DEPENDS ${cpu_package} ${cuda_package} ${opencl_package} ${unified_package} ${header_package} ${examples_package} ${doc_package})
+PRODUCT_BUILD(DEPENDS ${cpu_package} ${cuda_package} ${opencl_package} ${unified_package} ${common_package} ${header_package} ${examples_package} ${doc_package})
 
diff --git a/CMakeModules/osx_install/distribution.dist b/CMakeModules/osx_install/distribution.dist
index 6c460a6..b476bf0 100644
--- a/CMakeModules/osx_install/distribution.dist
+++ b/CMakeModules/osx_install/distribution.dist
@@ -19,6 +19,7 @@
     <pkg-ref id="com.arrayfire.arrayfire.inc"           version="${AF_VERSION}" onConclusion="none">ArrayFireHeaders.pkg</pkg-ref>
     <pkg-ref id="com.arrayfire.arrayfire.examples"      version="${AF_VERSION}" onConclusion="none">ArrayFireExamples.pkg</pkg-ref>
     <pkg-ref id="com.arrayfire.arrayfire.doc"           version="${AF_VERSION}" onConclusion="none">ArrayFireDoc.pkg</pkg-ref>
+    <pkg-ref id="com.arrayfire.arrayfire.libcommon"     version="${AF_VERSION}" onConclusion="none">ArrayFireCommon.pkg</pkg-ref>
     <options customize="always" require-scripts="false"/>
     <choices-outline>
         <line choice="libs">
@@ -26,14 +27,15 @@
             <line choice="cuda_lib"/>
             <line choice="opencl_lib"/>
             <line choice="com.arrayfire.arrayfire.unified.lib"/>
+            <line choice="com.arrayfire.arrayfire.libcommon"/>
         </line>
         <line choice="com.arrayfire.arrayfire.inc"/>
         <line choice="com.arrayfire.arrayfire.examples"/>
         <line choice="com.arrayfire.arrayfire.doc"/>
     </choices-outline>
     <choice id="libs" title="ArrayFire Libraries" visible="true" />
-    <choice title="ArrayFire CPU Libraries. Also installs the corresponding CMake config files."
-            description="ArrayFire targeting CPUs."
+    <choice title="CPU Libraries"
+            description="ArrayFire targeting CPUs. Also installs the corresponding CMake config files."
             id="cpu_lib" visible="true" enabled="true">
         <pkg-ref id="com.arrayfire.arrayfire.cpu.lib"/>
     </choice>
@@ -55,6 +57,14 @@
             enabled="CheckBackendSelected()">
         <pkg-ref id="com.arrayfire.arrayfire.unified.lib"/>
     </choice>
+    <choice title="Library Common"
+            description="Installs Forge and ArrayFireConfig.cmake files"
+            id="com.arrayfire.arrayfire.libcommon"
+            selected="CheckBackendSelected()"
+            visible="false"
+            enabled="CheckBackendSelected()">
+        <pkg-ref id="com.arrayfire.arrayfire.libcommon"/>
+    </choice>
     <choice title="ArrayFire Headers" description="ArrayFire Headers" id="com.arrayfire.arrayfire.inc" visible="true" enabled="true">
         <pkg-ref id="com.arrayfire.arrayfire.inc"/>
     </choice>

-- 
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