summaryrefslogtreecommitdiffstats
path: root/package/openpowerlink/0004-Use-PROJECT_NAME-instead-of-CMAKE_PROJECT_NAME.patch
blob: 3957cd1ebd25c44b1b1987d5124176e1cc02951b (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
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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
From 7aace6a9d28b02c4325610255dc8afe198f02c4d Mon Sep 17 00:00:00 2001
From: Romain Naour <romain.naour@openwide.fr>
Date: Wed, 12 Aug 2015 10:54:32 +0200
Subject: [PATCH] Use PROJECT_NAME instead of CMAKE_PROJECT_NAME

In order to support a top level CMakeLists.txt, use the current project
name instead of the top level one.

This patch has been submitted upstream:
https://github.com/openPOWERLINK/openPOWERLINK_V2/pull/57

Signed-off-by: Romain Naour <romain.naour@openwide.fr>
---
 apps/demo_cn_console/CMakeLists.txt             |  2 +-
 apps/demo_cn_console/linux.cmake                |  2 +-
 apps/demo_mn_console/CMakeLists.txt             |  4 ++--
 apps/demo_mn_console/linux.cmake                |  2 +-
 apps/demo_mn_qt/CMakeLists.txt                  |  4 ++--
 apps/demo_mn_qt/linux.cmake                     |  2 +-
 drivers/linux/drv_daemon_pcap/CMakeLists.txt    |  2 +-
 drivers/linux/drv_kernelmod_edrv/CMakeLists.txt | 10 +++++-----
 8 files changed, 14 insertions(+), 14 deletions(-)

diff --git a/apps/demo_cn_console/CMakeLists.txt b/apps/demo_cn_console/CMakeLists.txt
index cd3b418..c5a47a8 100644
--- a/apps/demo_cn_console/CMakeLists.txt
+++ b/apps/demo_cn_console/CMakeLists.txt
@@ -112,6 +112,6 @@ TARGET_LINK_LIBRARIES(demo_cn_console ${ARCH_LIBRARIES})
 ################################################################################
 # Installation rules
 
-INSTALL(TARGETS demo_cn_console RUNTIME DESTINATION ${CMAKE_PROJECT_NAME})
+INSTALL(TARGETS demo_cn_console RUNTIME DESTINATION ${PROJECT_NAME})
 
 
diff --git a/apps/demo_cn_console/linux.cmake b/apps/demo_cn_console/linux.cmake
index 409bf11..76e381d 100644
--- a/apps/demo_cn_console/linux.cmake
+++ b/apps/demo_cn_console/linux.cmake
@@ -53,5 +53,5 @@ SET (ARCH_LIBRARIES ${ARCH_LIBRARIES} pthread rt)
 ################################################################################
 # Set architecture specific installation files
 
-INSTALL(PROGRAMS ${TOOLS_DIR}/linux/set_prio DESTINATION ${CMAKE_PROJECT_NAME})
+INSTALL(PROGRAMS ${TOOLS_DIR}/linux/set_prio DESTINATION ${PROJECT_NAME})
 
diff --git a/apps/demo_mn_console/CMakeLists.txt b/apps/demo_mn_console/CMakeLists.txt
index 0c54a98..d8df68e 100644
--- a/apps/demo_mn_console/CMakeLists.txt
+++ b/apps/demo_mn_console/CMakeLists.txt
@@ -120,6 +120,6 @@ TARGET_LINK_LIBRARIES(demo_mn_console ${ARCH_LIBRARIES})
 ################################################################################
 # Installation rules
 
-INSTALL(TARGETS demo_mn_console RUNTIME DESTINATION ${CMAKE_PROJECT_NAME})
-INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/mnobd.cdc DESTINATION ${CMAKE_PROJECT_NAME})
+INSTALL(TARGETS demo_mn_console RUNTIME DESTINATION ${PROJECT_NAME})
+INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/mnobd.cdc DESTINATION ${PROJECT_NAME})
 
diff --git a/apps/demo_mn_console/linux.cmake b/apps/demo_mn_console/linux.cmake
index a9e9072..a994928 100644
--- a/apps/demo_mn_console/linux.cmake
+++ b/apps/demo_mn_console/linux.cmake
@@ -53,5 +53,5 @@ SET (ARCH_LIBRARIES ${ARCH_LIBRARIES} pthread rt)
 ################################################################################
 # Set architecture specific installation files
 
-INSTALL(PROGRAMS ${TOOLS_DIR}/linux/set_prio DESTINATION ${CMAKE_PROJECT_NAME})
+INSTALL(PROGRAMS ${TOOLS_DIR}/linux/set_prio DESTINATION ${PROJECT_NAME})
 
diff --git a/apps/demo_mn_qt/CMakeLists.txt b/apps/demo_mn_qt/CMakeLists.txt
index ff3a9aa..282a9d8 100644
--- a/apps/demo_mn_qt/CMakeLists.txt
+++ b/apps/demo_mn_qt/CMakeLists.txt
@@ -161,5 +161,5 @@ TARGET_LINK_LIBRARIES(demo_mn_qt ${ARCH_LIBRARIES} ${QT_LIBRARIES})
 ################################################################################
 # Installation rules
 
-INSTALL(TARGETS demo_mn_qt RUNTIME DESTINATION ${CMAKE_PROJECT_NAME})
-INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/mnobd.cdc DESTINATION ${CMAKE_PROJECT_NAME})
+INSTALL(TARGETS demo_mn_qt RUNTIME DESTINATION ${PROJECT_NAME})
+INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/mnobd.cdc DESTINATION ${PROJECT_NAME})
diff --git a/apps/demo_mn_qt/linux.cmake b/apps/demo_mn_qt/linux.cmake
index 6f19ff2..6ed75ee 100644
--- a/apps/demo_mn_qt/linux.cmake
+++ b/apps/demo_mn_qt/linux.cmake
@@ -45,5 +45,5 @@ SET(ARCH_LIBRARIES ${ARCH_LIBRARIES} pthread rt)
 ################################################################################
 # Set architecture specific installation files
 
-INSTALL(PROGRAMS ${TOOLS_DIR}/linux/set_prio DESTINATION ${CMAKE_PROJECT_NAME})
+INSTALL(PROGRAMS ${TOOLS_DIR}/linux/set_prio DESTINATION ${PROJECT_NAME})
 
diff --git a/drivers/linux/drv_daemon_pcap/CMakeLists.txt b/drivers/linux/drv_daemon_pcap/CMakeLists.txt
index 9041e4d..2702abd 100644
--- a/drivers/linux/drv_daemon_pcap/CMakeLists.txt
+++ b/drivers/linux/drv_daemon_pcap/CMakeLists.txt
@@ -136,5 +136,5 @@ SET_PROPERTY(TARGET ${EXE_NAME} PROPERTY COMPILE_DEFINITIONS_DEBUG DEBUG;DEF_DEB
 TARGET_LINK_LIBRARIES(${EXE_NAME} ${OPLKLIB} ${ARCH_LIBRARIES})
 
 # add installation rules
-INSTALL(TARGETS ${EXE_NAME} RUNTIME DESTINATION ${CMAKE_PROJECT_NAME})
+INSTALL(TARGETS ${EXE_NAME} RUNTIME DESTINATION ${PROJECT_NAME})
 
diff --git a/drivers/linux/drv_kernelmod_edrv/CMakeLists.txt b/drivers/linux/drv_kernelmod_edrv/CMakeLists.txt
index af85f86..59400c0 100644
--- a/drivers/linux/drv_kernelmod_edrv/CMakeLists.txt
+++ b/drivers/linux/drv_kernelmod_edrv/CMakeLists.txt
@@ -301,8 +301,8 @@ ADD_CUSTOM_TARGET(
 ################################################################################
 # add installation rules
 
-INSTALL(FILES ${MODULE_OUTPUT_DIR}/${MODULE_NAME}.ko DESTINATION ${CMAKE_PROJECT_NAME})
-INSTALL(FILES ${TOOLS_DIR}/linux/50-openPOWERLINK.rules DESTINATION ${CMAKE_PROJECT_NAME})
-INSTALL(PROGRAMS ${TOOLS_DIR}/linux/plkload DESTINATION ${CMAKE_PROJECT_NAME})
-INSTALL(PROGRAMS ${TOOLS_DIR}/linux/plkunload DESTINATION ${CMAKE_PROJECT_NAME})
-INSTALL(PROGRAMS ${TOOLS_DIR}/linux/devices.txt DESTINATION ${CMAKE_PROJECT_NAME})
+INSTALL(FILES ${MODULE_OUTPUT_DIR}/${MODULE_NAME}.ko DESTINATION ${PROJECT_NAME})
+INSTALL(FILES ${TOOLS_DIR}/linux/50-openPOWERLINK.rules DESTINATION ${PROJECT_NAME})
+INSTALL(PROGRAMS ${TOOLS_DIR}/linux/plkload DESTINATION ${PROJECT_NAME})
+INSTALL(PROGRAMS ${TOOLS_DIR}/linux/plkunload DESTINATION ${PROJECT_NAME})
+INSTALL(PROGRAMS ${TOOLS_DIR}/linux/devices.txt DESTINATION ${PROJECT_NAME})
-- 
2.4.3

OpenPOWER on IntegriCloud