blob: 87f9c4838238fcb803f89a0102d79c5ef31b7e1c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
From f8c7732e24502c06739944f9a721c9d84a50319d Mon Sep 17 00:00:00 2001
From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Date: Sun, 26 Aug 2018 19:11:55 +0200
Subject: [PATCH] fix install of binaries with a static only library
Define CMAKE_INSTALL_RPATH only if ENABLE_SHARED is set otherwise the
following error is raised:
CMake Error at cmake_install.cmake:73 (file):
file RPATH_CHANGE could not write new RPATH:
/usr/lib
to the file:
/home/fabrice/buildroot/output/host/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/bin/rdjpgcom
No valid ELF RPATH or RUNPATH entry exists in the file;
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
[Upstream status: https://github.com/libjpeg-turbo/libjpeg-turbo/pull/273]
---
CMakeLists.txt | 2 ++
1 file changed, 2 insertions(+)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 1719522..862ab11 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -109,7 +109,9 @@ endif()
include(cmakescripts/GNUInstallDirs.cmake)
+if(ENABLE_SHARED)
set(CMAKE_INSTALL_RPATH ${CMAKE_INSTALL_FULL_LIBDIR})
+endif()
macro(report_directory var)
if(CMAKE_INSTALL_${var} STREQUAL CMAKE_INSTALL_FULL_${var})
--
2.14.1
|