meta-intel/dynamic-layers/openembedded-layer/recipes-support/opencv/files/0003-use-GNUInstallDirs-on-nix.patch
Anuj Mittal 90b225ce8a dldt-inference-engine: upgrade 2019r1.1 -> 2019r2
* Release notes:
https://software.intel.com/en-us/articles/OpenVINO-RelNotes

* Enable unit tests to be built and tested using ptest mechanism.

* Include patches from Clear Linux for build fixes.

* Switch to using python3 and threading to using TBB. Switch ENABLE_OPENCV
to off so opencv from system is used.

* Remove do_install and patch Makefiles instead to install libraries correctly.

Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
2019-09-30 15:34:44 +08:00

82 lines
2.9 KiB
Diff

From 970443ce6bf31128c3517374e2890a93518d988e Mon Sep 17 00:00:00 2001
From: Kevron Rees <kevron.m.rees@intel.com>
Date: Wed, 3 Apr 2019 09:20:48 -0700
Subject: [PATCH] use GNUInstallDirs on *nix
Upstream-Status: Submitted [Patch taken from Clear Linux and has been submitted
upstream]
Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
---
.../thirdparty/clDNN/CMakeLists.txt | 3 +-
.../thirdparty/clDNN/src/CMakeLists.txt | 36 +++++++++++++++----
2 files changed, 31 insertions(+), 8 deletions(-)
diff --git a/inference-engine/thirdparty/clDNN/CMakeLists.txt b/inference-engine/thirdparty/clDNN/CMakeLists.txt
index 624d95c..5957791 100644
--- a/inference-engine/thirdparty/clDNN/CMakeLists.txt
+++ b/inference-engine/thirdparty/clDNN/CMakeLists.txt
@@ -93,7 +93,8 @@ set(CLDNN__GTEST_DIR "${CLDNN__COMMON_DIR}/googletest-fused")
# Build targets settings.
# Path which points to default root directory for compilation output.
-set(CLDNN_BUILD__DEFAULT_OUT_ROOT "${CMAKE_CURRENT_SOURCE_DIR}/build/out")
+set(CLDNN_BUILD__DEFAULT_OUT_ROOT "${CMAKE_BINARY_DIR}")
+set(CLDNN__OUTPUT_DIR, "${CMAKE_BINARY_DIR}")
# Prefix for all targets in internal pass.
set(CLDNN_BUILD__PROJ_NAME_PREFIX "")
diff --git a/inference-engine/thirdparty/clDNN/src/CMakeLists.txt b/inference-engine/thirdparty/clDNN/src/CMakeLists.txt
index 132c6e4..cc88535 100644
--- a/inference-engine/thirdparty/clDNN/src/CMakeLists.txt
+++ b/inference-engine/thirdparty/clDNN/src/CMakeLists.txt
@@ -247,17 +247,39 @@ target_link_libraries("${CLDNN_BUILD__PROJ}" PRIVATE ${CLDNN__SYSTEM_LINK_LIBRAR
# ========================================== Installation ==============================================
+if(UNIX)
+ include(GNUInstallDirs)
+endif(UNIX)
+
+
# API headers.
-install(DIRECTORY "${CLDNN__API_DIR}/"
+if(UNIX)
+ install(DIRECTORY "${CLDNN__API_DIR}/"
+ DESTINATION "${CMAKE_INSTALL_FULL_INCLUDEDIR}/clDNN"
+ FILE_PERMISSIONS OWNER_WRITE OWNER_READ GROUP_READ WORLD_READ
+ )
+else()
+ install(DIRECTORY "${CLDNN__API_DIR}/"
DESTINATION "include/clDNN"
FILE_PERMISSIONS OWNER_WRITE OWNER_READ GROUP_READ WORLD_READ
)
+endif(UNIX)
+
# Binaries.
-install(TARGETS "${CLDNN_BUILD__PROJ}"
- ARCHIVE DESTINATION "lib"
- LIBRARY DESTINATION "lib"
- RUNTIME DESTINATION "bin"
- INCLUDES DESTINATION "include/clDNN"
- )
+if(UNIX)
+ install(TARGETS "${CLDNN_BUILD__PROJ}"
+ ARCHIVE DESTINATION "${CMAKE_INSTALL_FULL_LIBDIR}"
+ LIBRARY DESTINATION "${CMAKE_INSTALL_FULL_LIBDIR}"
+ RUNTIME DESTINATION "${CMAKE_INSTALL_FULL_BINDIR}"
+ INCLUDES DESTINATION "${CMAKE_INSTALL_FULL_INCLUDEDIR}/clDNN"
+ )
+else()
+ install(TARGETS "${CLDNN_BUILD__PROJ}"
+ ARCHIVE DESTINATION "lib"
+ LIBRARY DESTINATION "lib"
+ RUNTIME DESTINATION "bin"
+ INCLUDES DESTINATION "include/clDNN"
+ )
+endif(UNIX)
# ======================================================================================================
--
2.23.0