2016-11-03 22:05:22 +01:00
|
|
|
From 4e8aa3a9e1696e5e02ff0a3ae5a72f034ee60c2f Mon Sep 17 00:00:00 2001
|
2016-06-04 16:38:10 +02:00
|
|
|
From: Romain Naour <romain.naour@gmail.com>
|
|
|
|
Date: Wed, 25 May 2016 15:57:10 +0200
|
2016-02-07 17:56:56 +01:00
|
|
|
Subject: [PATCH] install the stack libraries to "lib" subdirectory
|
|
|
|
|
|
|
|
Using '.' to install the stack libraries is not correct since
|
|
|
|
it will install them to /usr/.
|
|
|
|
|
|
|
|
ls /usr/liboplkmnapp-kernelintf.so
|
|
|
|
|
|
|
|
Fix this by using 'lib' instead of '.'
|
|
|
|
|
|
|
|
The problem with the openpowerlink build system is that it expect
|
|
|
|
the stack directory to be a "local staging" directory which
|
|
|
|
contains headers and libraries. So the libraries build by the
|
|
|
|
stack project are installed in stack/lib by default.
|
|
|
|
|
|
|
|
This is wrong to do that because it becomes difficult to package
|
|
|
|
openpowerlink for normal Linux systems.
|
|
|
|
|
|
|
|
Buildroot like others build system expect from a packaged software
|
|
|
|
to install libraries and headers build/provided in a staging
|
|
|
|
directory.
|
|
|
|
|
|
|
|
It seems that CMAKE_INSTALL_PREFIX is misused by the default value
|
|
|
|
"${CMAKE_CURRENT_SOURCE_DIR}/lib/${SYSTEM_NAME_DIR}/${SYSTEM_PROCESSOR_DIR}"
|
|
|
|
since it already contains the lib directory and therefore the
|
|
|
|
entire build system is messed up.
|
|
|
|
|
|
|
|
It seems that the openpowerlink's build system doesn't allow/support
|
|
|
|
CMAKE_INSTALL_PREFIX to be set externally
|
|
|
|
(which is the standard approach).
|
|
|
|
|
|
|
|
The issue has been reported [1] upstream and a build system
|
|
|
|
refactoring is needed to fix this properly.
|
|
|
|
|
|
|
|
[1] http://sourceforge.net/p/openpowerlink/discussion/newbie/thread/3f13af65/#8f80/a50a/4649/f07c
|
|
|
|
|
2016-11-03 22:05:22 +01:00
|
|
|
[rebase on v2.5.0]
|
2016-06-04 16:38:10 +02:00
|
|
|
Signed-off-by: Romain Naour <romain.naour@gmail.com>
|
2016-02-07 17:56:56 +01:00
|
|
|
---
|
2016-11-03 22:05:22 +01:00
|
|
|
stack/proj/linux/liboplkcn-sim/CMakeLists.txt | 2 +-
|
2016-02-07 17:56:56 +01:00
|
|
|
stack/proj/linux/liboplkcn/CMakeLists.txt | 2 +-
|
|
|
|
stack/proj/linux/liboplkcnapp-kernelintf/CMakeLists.txt | 2 +-
|
|
|
|
stack/proj/linux/liboplkcnapp-userintf/CMakeLists.txt | 2 +-
|
|
|
|
stack/proj/linux/liboplkcndrv-pcap/CMakeLists.txt | 2 +-
|
2016-11-03 22:05:22 +01:00
|
|
|
stack/proj/linux/liboplkmn-sim/CMakeLists.txt | 2 +-
|
2016-02-07 17:56:56 +01:00
|
|
|
stack/proj/linux/liboplkmn/CMakeLists.txt | 2 +-
|
|
|
|
stack/proj/linux/liboplkmnapp-kernelintf/CMakeLists.txt | 2 +-
|
2016-11-03 22:05:22 +01:00
|
|
|
stack/proj/linux/liboplkmnapp-kernelpcp/CMakeLists.txt | 2 +-
|
2016-02-07 17:56:56 +01:00
|
|
|
stack/proj/linux/liboplkmnapp-userintf/CMakeLists.txt | 2 +-
|
|
|
|
stack/proj/linux/liboplkmndrv-pcap/CMakeLists.txt | 2 +-
|
2016-11-03 22:05:22 +01:00
|
|
|
11 files changed, 11 insertions(+), 11 deletions(-)
|
2016-02-07 17:56:56 +01:00
|
|
|
|
2016-11-03 22:05:22 +01:00
|
|
|
diff --git a/stack/proj/linux/liboplkcn-sim/CMakeLists.txt b/stack/proj/linux/liboplkcn-sim/CMakeLists.txt
|
|
|
|
index 73b641d..b8b5c9d 100644
|
|
|
|
--- a/stack/proj/linux/liboplkcn-sim/CMakeLists.txt
|
|
|
|
+++ b/stack/proj/linux/liboplkcn-sim/CMakeLists.txt
|
|
|
|
@@ -96,4 +96,4 @@ ADD_LIBRARY(${LIB_NAME} ${LIB_TYPE} ${LIB_SOURCES})
|
|
|
|
TARGET_LINK_LIBRARIES(${LIB_NAME} ${ARCH_LIBRARIES})
|
|
|
|
SET_PROPERTY(TARGET ${LIB_NAME} PROPERTY COMPILE_DEFINITIONS_DEBUG DEBUG;DEF_DEBUG_LVL=${CFG_DEBUG_LVL})
|
|
|
|
SET_PROPERTY(TARGET ${LIB_NAME} PROPERTY DEBUG_POSTFIX "_d")
|
|
|
|
-INSTALL(TARGETS ${LIB_NAME} ARCHIVE DESTINATION . LIBRARY DESTINATION .)
|
|
|
|
+INSTALL(TARGETS ${LIB_NAME} ARCHIVE DESTINATION lib LIBRARY DESTINATION lib)
|
2016-02-07 17:56:56 +01:00
|
|
|
diff --git a/stack/proj/linux/liboplkcn/CMakeLists.txt b/stack/proj/linux/liboplkcn/CMakeLists.txt
|
2016-11-03 22:05:22 +01:00
|
|
|
index 323eafc..459124a 100644
|
2016-02-07 17:56:56 +01:00
|
|
|
--- a/stack/proj/linux/liboplkcn/CMakeLists.txt
|
|
|
|
+++ b/stack/proj/linux/liboplkcn/CMakeLists.txt
|
2016-11-03 22:05:22 +01:00
|
|
|
@@ -90,4 +90,4 @@ ADD_LIBRARY(${LIB_NAME} ${LIB_TYPE} ${LIB_SOURCES})
|
2016-02-07 17:56:56 +01:00
|
|
|
TARGET_LINK_LIBRARIES(${LIB_NAME} ${ARCH_LIBRARIES})
|
|
|
|
SET_PROPERTY(TARGET ${LIB_NAME} PROPERTY COMPILE_DEFINITIONS_DEBUG DEBUG;DEF_DEBUG_LVL=${CFG_DEBUG_LVL})
|
|
|
|
SET_PROPERTY(TARGET ${LIB_NAME} PROPERTY DEBUG_POSTFIX "_d")
|
|
|
|
-INSTALL(TARGETS ${LIB_NAME} ARCHIVE DESTINATION . LIBRARY DESTINATION .)
|
|
|
|
+INSTALL(TARGETS ${LIB_NAME} ARCHIVE DESTINATION lib LIBRARY DESTINATION lib)
|
|
|
|
diff --git a/stack/proj/linux/liboplkcnapp-kernelintf/CMakeLists.txt b/stack/proj/linux/liboplkcnapp-kernelintf/CMakeLists.txt
|
2016-11-03 22:05:22 +01:00
|
|
|
index f8b1850..c16194a 100644
|
2016-02-07 17:56:56 +01:00
|
|
|
--- a/stack/proj/linux/liboplkcnapp-kernelintf/CMakeLists.txt
|
|
|
|
+++ b/stack/proj/linux/liboplkcnapp-kernelintf/CMakeLists.txt
|
2016-11-03 22:05:22 +01:00
|
|
|
@@ -83,4 +83,4 @@ ADD_LIBRARY(${LIB_NAME} ${LIB_TYPE} ${LIB_SOURCES})
|
2016-02-07 17:56:56 +01:00
|
|
|
TARGET_LINK_LIBRARIES(${LIB_NAME} ${ARCH_LIBRARIES})
|
|
|
|
SET_PROPERTY(TARGET ${LIB_NAME} PROPERTY COMPILE_DEFINITIONS_DEBUG DEBUG;DEF_DEBUG_LVL=${CFG_DEBUG_LVL})
|
|
|
|
SET_PROPERTY(TARGET ${LIB_NAME} PROPERTY DEBUG_POSTFIX "_d")
|
|
|
|
-INSTALL(TARGETS ${LIB_NAME} ARCHIVE DESTINATION . LIBRARY DESTINATION .)
|
|
|
|
+INSTALL(TARGETS ${LIB_NAME} ARCHIVE DESTINATION lib LIBRARY DESTINATION lib)
|
|
|
|
diff --git a/stack/proj/linux/liboplkcnapp-userintf/CMakeLists.txt b/stack/proj/linux/liboplkcnapp-userintf/CMakeLists.txt
|
2016-11-03 22:05:22 +01:00
|
|
|
index 0f07e63..0074616 100644
|
2016-02-07 17:56:56 +01:00
|
|
|
--- a/stack/proj/linux/liboplkcnapp-userintf/CMakeLists.txt
|
|
|
|
+++ b/stack/proj/linux/liboplkcnapp-userintf/CMakeLists.txt
|
2016-11-03 22:05:22 +01:00
|
|
|
@@ -83,4 +83,4 @@ ADD_LIBRARY(${LIB_NAME} ${LIB_TYPE} ${LIB_SOURCES})
|
2016-02-07 17:56:56 +01:00
|
|
|
TARGET_LINK_LIBRARIES(${LIB_NAME} ${ARCH_LIBRARIES})
|
|
|
|
SET_PROPERTY(TARGET ${LIB_NAME} PROPERTY COMPILE_DEFINITIONS_DEBUG DEBUG;DEF_DEBUG_LVL=${CFG_DEBUG_LVL})
|
|
|
|
SET_PROPERTY(TARGET ${LIB_NAME} PROPERTY DEBUG_POSTFIX "_d")
|
|
|
|
-INSTALL(TARGETS ${LIB_NAME} ARCHIVE DESTINATION . LIBRARY DESTINATION .)
|
|
|
|
+INSTALL(TARGETS ${LIB_NAME} ARCHIVE DESTINATION lib LIBRARY DESTINATION lib)
|
|
|
|
diff --git a/stack/proj/linux/liboplkcndrv-pcap/CMakeLists.txt b/stack/proj/linux/liboplkcndrv-pcap/CMakeLists.txt
|
2016-11-03 22:05:22 +01:00
|
|
|
index d0dad78..ee0fdec 100644
|
2016-02-07 17:56:56 +01:00
|
|
|
--- a/stack/proj/linux/liboplkcndrv-pcap/CMakeLists.txt
|
|
|
|
+++ b/stack/proj/linux/liboplkcndrv-pcap/CMakeLists.txt
|
2016-11-03 22:05:22 +01:00
|
|
|
@@ -76,4 +76,4 @@ ADD_LIBRARY(${LIB_NAME} ${LIB_TYPE} ${LIB_SOURCES})
|
|
|
|
TARGET_LINK_LIBRARIES(${LIB_NAME} ${ARCH_LIBRARIES})
|
|
|
|
SET_PROPERTY(TARGET ${LIB_NAME} PROPERTY COMPILE_DEFINITIONS_DEBUG DEBUG;DEF_DEBUG_LVL=${CFG_DEBUG_LVL})
|
|
|
|
SET_PROPERTY(TARGET ${LIB_NAME} PROPERTY DEBUG_POSTFIX "_d")
|
|
|
|
-INSTALL(TARGETS ${LIB_NAME} ARCHIVE DESTINATION . LIBRARY DESTINATION .)
|
|
|
|
+INSTALL(TARGETS ${LIB_NAME} ARCHIVE DESTINATION lib LIBRARY DESTINATION lib)
|
|
|
|
diff --git a/stack/proj/linux/liboplkmn-sim/CMakeLists.txt b/stack/proj/linux/liboplkmn-sim/CMakeLists.txt
|
|
|
|
index eb6396a..5beaa07 100644
|
|
|
|
--- a/stack/proj/linux/liboplkmn-sim/CMakeLists.txt
|
|
|
|
+++ b/stack/proj/linux/liboplkmn-sim/CMakeLists.txt
|
|
|
|
@@ -91,4 +91,4 @@ ADD_LIBRARY(${LIB_NAME} ${LIB_TYPE} ${LIB_SOURCES})
|
2016-02-07 17:56:56 +01:00
|
|
|
TARGET_LINK_LIBRARIES(${LIB_NAME} ${ARCH_LIBRARIES})
|
|
|
|
SET_PROPERTY(TARGET ${LIB_NAME} PROPERTY COMPILE_DEFINITIONS_DEBUG DEBUG;DEF_DEBUG_LVL=${CFG_DEBUG_LVL})
|
|
|
|
SET_PROPERTY(TARGET ${LIB_NAME} PROPERTY DEBUG_POSTFIX "_d")
|
|
|
|
-INSTALL(TARGETS ${LIB_NAME} ARCHIVE DESTINATION . LIBRARY DESTINATION .)
|
|
|
|
+INSTALL(TARGETS ${LIB_NAME} ARCHIVE DESTINATION lib LIBRARY DESTINATION lib)
|
|
|
|
diff --git a/stack/proj/linux/liboplkmn/CMakeLists.txt b/stack/proj/linux/liboplkmn/CMakeLists.txt
|
2016-11-03 22:05:22 +01:00
|
|
|
index cf7927f..6b19557 100644
|
2016-02-07 17:56:56 +01:00
|
|
|
--- a/stack/proj/linux/liboplkmn/CMakeLists.txt
|
|
|
|
+++ b/stack/proj/linux/liboplkmn/CMakeLists.txt
|
2016-11-03 22:05:22 +01:00
|
|
|
@@ -89,4 +89,4 @@ ADD_LIBRARY(${LIB_NAME} ${LIB_TYPE} ${LIB_SOURCES})
|
2016-02-07 17:56:56 +01:00
|
|
|
TARGET_LINK_LIBRARIES(${LIB_NAME} ${ARCH_LIBRARIES})
|
|
|
|
SET_PROPERTY(TARGET ${LIB_NAME} PROPERTY COMPILE_DEFINITIONS_DEBUG DEBUG;DEF_DEBUG_LVL=${CFG_DEBUG_LVL})
|
|
|
|
SET_PROPERTY(TARGET ${LIB_NAME} PROPERTY DEBUG_POSTFIX "_d")
|
|
|
|
-INSTALL(TARGETS ${LIB_NAME} ARCHIVE DESTINATION . LIBRARY DESTINATION .)
|
|
|
|
+INSTALL(TARGETS ${LIB_NAME} ARCHIVE DESTINATION lib LIBRARY DESTINATION lib)
|
|
|
|
diff --git a/stack/proj/linux/liboplkmnapp-kernelintf/CMakeLists.txt b/stack/proj/linux/liboplkmnapp-kernelintf/CMakeLists.txt
|
2016-11-03 22:05:22 +01:00
|
|
|
index 9daa2df..bfccb25 100644
|
2016-02-07 17:56:56 +01:00
|
|
|
--- a/stack/proj/linux/liboplkmnapp-kernelintf/CMakeLists.txt
|
|
|
|
+++ b/stack/proj/linux/liboplkmnapp-kernelintf/CMakeLists.txt
|
2016-11-03 22:05:22 +01:00
|
|
|
@@ -82,4 +82,4 @@ ADD_LIBRARY(${LIB_NAME} ${LIB_TYPE} ${LIB_SOURCES})
|
2016-06-04 16:38:10 +02:00
|
|
|
TARGET_LINK_LIBRARIES(${LIB_NAME} ${ARCH_LIBRARIES})
|
|
|
|
SET_PROPERTY(TARGET ${LIB_NAME} PROPERTY COMPILE_DEFINITIONS_DEBUG DEBUG;DEF_DEBUG_LVL=${CFG_DEBUG_LVL})
|
|
|
|
SET_PROPERTY(TARGET ${LIB_NAME} PROPERTY DEBUG_POSTFIX "_d")
|
|
|
|
-INSTALL(TARGETS ${LIB_NAME} ARCHIVE DESTINATION . LIBRARY DESTINATION .)
|
|
|
|
+INSTALL(TARGETS ${LIB_NAME} ARCHIVE DESTINATION lib LIBRARY DESTINATION lib)
|
2016-11-03 22:05:22 +01:00
|
|
|
diff --git a/stack/proj/linux/liboplkmnapp-kernelpcp/CMakeLists.txt b/stack/proj/linux/liboplkmnapp-kernelpcp/CMakeLists.txt
|
|
|
|
index 0135f46..83128eb 100644
|
|
|
|
--- a/stack/proj/linux/liboplkmnapp-kernelpcp/CMakeLists.txt
|
|
|
|
+++ b/stack/proj/linux/liboplkmnapp-kernelpcp/CMakeLists.txt
|
|
|
|
@@ -91,4 +91,4 @@ ADD_LIBRARY(${LIB_NAME} ${LIB_TYPE} ${LIB_SOURCES})
|
2016-02-07 17:56:56 +01:00
|
|
|
TARGET_LINK_LIBRARIES(${LIB_NAME} ${ARCH_LIBRARIES})
|
|
|
|
SET_PROPERTY(TARGET ${LIB_NAME} PROPERTY COMPILE_DEFINITIONS_DEBUG DEBUG;DEF_DEBUG_LVL=${CFG_DEBUG_LVL})
|
|
|
|
SET_PROPERTY(TARGET ${LIB_NAME} PROPERTY DEBUG_POSTFIX "_d")
|
|
|
|
-INSTALL(TARGETS ${LIB_NAME} ARCHIVE DESTINATION . LIBRARY DESTINATION .)
|
|
|
|
+INSTALL(TARGETS ${LIB_NAME} ARCHIVE DESTINATION lib LIBRARY DESTINATION lib)
|
|
|
|
diff --git a/stack/proj/linux/liboplkmnapp-userintf/CMakeLists.txt b/stack/proj/linux/liboplkmnapp-userintf/CMakeLists.txt
|
2016-11-03 22:05:22 +01:00
|
|
|
index cd97882..aaaa526 100644
|
2016-02-07 17:56:56 +01:00
|
|
|
--- a/stack/proj/linux/liboplkmnapp-userintf/CMakeLists.txt
|
|
|
|
+++ b/stack/proj/linux/liboplkmnapp-userintf/CMakeLists.txt
|
2016-11-03 22:05:22 +01:00
|
|
|
@@ -82,4 +82,4 @@ ADD_LIBRARY(${LIB_NAME} ${LIB_TYPE} ${LIB_SOURCES})
|
2016-02-07 17:56:56 +01:00
|
|
|
TARGET_LINK_LIBRARIES(${LIB_NAME} ${ARCH_LIBRARIES})
|
|
|
|
SET_PROPERTY(TARGET ${LIB_NAME} PROPERTY COMPILE_DEFINITIONS_DEBUG DEBUG;DEF_DEBUG_LVL=${CFG_DEBUG_LVL})
|
|
|
|
SET_PROPERTY(TARGET ${LIB_NAME} PROPERTY DEBUG_POSTFIX "_d")
|
|
|
|
-INSTALL(TARGETS ${LIB_NAME} ARCHIVE DESTINATION . LIBRARY DESTINATION .)
|
|
|
|
+INSTALL(TARGETS ${LIB_NAME} ARCHIVE DESTINATION lib LIBRARY DESTINATION lib)
|
|
|
|
diff --git a/stack/proj/linux/liboplkmndrv-pcap/CMakeLists.txt b/stack/proj/linux/liboplkmndrv-pcap/CMakeLists.txt
|
2016-11-03 22:05:22 +01:00
|
|
|
index 7e1a820..82205c2 100644
|
2016-02-07 17:56:56 +01:00
|
|
|
--- a/stack/proj/linux/liboplkmndrv-pcap/CMakeLists.txt
|
|
|
|
+++ b/stack/proj/linux/liboplkmndrv-pcap/CMakeLists.txt
|
2016-11-03 22:05:22 +01:00
|
|
|
@@ -79,4 +79,4 @@ ADD_LIBRARY(${LIB_NAME} ${LIB_TYPE} ${LIB_SOURCES})
|
2016-02-07 17:56:56 +01:00
|
|
|
TARGET_LINK_LIBRARIES(${LIB_NAME} ${ARCH_LIBRARIES})
|
|
|
|
SET_PROPERTY(TARGET ${LIB_NAME} PROPERTY COMPILE_DEFINITIONS_DEBUG DEBUG;DEF_DEBUG_LVL=${CFG_DEBUG_LVL})
|
|
|
|
SET_PROPERTY(TARGET ${LIB_NAME} PROPERTY DEBUG_POSTFIX "_d")
|
|
|
|
-INSTALL(TARGETS ${LIB_NAME} ARCHIVE DESTINATION . LIBRARY DESTINATION .)
|
|
|
|
+INSTALL(TARGETS ${LIB_NAME} ARCHIVE DESTINATION lib LIBRARY DESTINATION lib)
|
|
|
|
--
|
2016-11-03 22:05:22 +01:00
|
|
|
2.8.1
|
2016-02-07 17:56:56 +01:00
|
|
|
|