File: 0001-iotjs-Install-binaries-to-system-1134.patch

package info (click to toggle)
iotjs 1.0%2B715-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, sid
  • size: 36,416 kB
  • sloc: ansic: 241,611; javascript: 58,534; python: 8,269; sh: 7,889; cpp: 2,526; makefile: 1,744; perl: 1,554; tcl: 862; xml: 464; asm: 97
file content (71 lines) | stat: -rw-r--r-- 2,895 bytes parent folder | download
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
From: Philippe Coval <rzr@users.sf.net>
Date: Thu, 15 Oct 2020 18:42:27 +0200
Subject: build: Install to system's path

Install directory is prefixed by destdir to install in staging directory.

This change is useful for debian packaging.

Runtime destination rely on RUNTIME_OUTPUT_DIRECTORY property

This was introduced first in #1134 and then dropped in #1848

This will be helpful for packaging,
for example on Tizen install using RPM macro: "%make_install"
or Debian's debhelper.

Work along CMAKE_INSTALL_PREFIX,
or/and can be overloaded individualy to alternate locations.

Email has been updated for community support.

Forwarded: https://github.com/jerryscript-project/iotjs/pull/1923
Bug: https://github.com/jerryscript-project/iotjs/issues/1945
Relate-to: https://github.com/Samsung/iotjs/pull/1134
Change-Id: Ib969a1d5c2e7bc402b455377fc57a94654aa74dc
Origin: https://github.com/TizenTeam/iotjs/tree/sandbox/rzr/review/install/master
Bug-Debian: https://bugs.debian.org/957364
Gbp-Pq: Name 0001-iotjs-Install-binaries-to-system-1134.patch
Update: 2020-10-16
IoT.js-DCO-1.0-Signed-off-by: Philippe Coval rzr@users.sf.net
---
 cmake/iotjs.cmake | 15 ++++++++++-----
 1 file changed, 10 insertions(+), 5 deletions(-)

diff --git a/cmake/iotjs.cmake b/cmake/iotjs.cmake
index 5c1b8db..14f2249 100644
--- a/cmake/iotjs.cmake
+++ b/cmake/iotjs.cmake
@@ -566,12 +566,17 @@ if("${BIN_INSTALL_DIR}" STREQUAL "")
   set(BIN_INSTALL_DIR "bin")
 endif()
 
+if("${INCLUDE_INSTALL_DIR}" STREQUAL "")
+  set(INCLUDE_INSTALL_DIR "include/iotjs")
+endif()
+
 # Configure the iotjs executable
 if(NOT BUILD_LIB_ONLY)
   set(TARGET_IOTJS iotjs)
   message(STATUS "CMAKE_BINARY_DIR        ${CMAKE_BINARY_DIR}")
-  message(STATUS "BINARY_INSTALL_DIR      ${INSTALL_PREFIX}/bin")
-  message(STATUS "LIBRARY_INSTALL_DIR     ${INSTALL_PREFIX}/lib")
+  message(STATUS "BINARY_INSTALL_DIR      ${INSTALL_PREFIX}/${BIN_INSTALL_DIR}")
+  message(STATUS "LIBRARY_INSTALL_DIR     ${INSTALL_PREFIX}/${LIB_INSTALL_DIR}")
+  message(STATUS "INCLUDE_INSTALL_DIR     ${INSTALL_PREFIX}/${INCLUDE_INSTALL_DIR}")
 
   add_executable(${TARGET_IOTJS} ${ROOT_DIR}/src/platform/linux/iotjs_linux.c)
   set_target_properties(${TARGET_IOTJS} PROPERTIES
@@ -581,9 +586,9 @@ if(NOT BUILD_LIB_ONLY)
   target_include_directories(${TARGET_IOTJS} PRIVATE ${IOTJS_INCLUDE_DIRS})
   target_link_libraries(${TARGET_IOTJS} ${TARGET_LIB_IOTJS})
   install(TARGETS ${TARGET_IOTJS} ${TARGET_LIB_IOTJS}
-          RUNTIME DESTINATION "${INSTALL_PREFIX}/bin"
-          LIBRARY DESTINATION "${INSTALL_PREFIX}/lib"
-          PUBLIC_HEADER DESTINATION "${INSTALL_PREFIX}/include/iotjs")
+          RUNTIME DESTINATION "${BIN_INSTALL_DIR}"
+          LIBRARY DESTINATION "${LIB_INSTALL_DIR}"
+          PUBLIC_HEADER DESTINATION "${INCLUDE_INSTALL_DIR}")
 else()
   install(TARGETS ${TARGET_LIB_IOTJS} DESTINATION ${LIB_INSTALL_DIR})
 endif()