b1063a0136
From [1]: With version 2.0, the source code has been cleanly split into an application-oriented user library and a time-critical stack driver. The latter may be moved to a dedicated communication processor or into a kernel module to deliver enhanced performance while still keeping the API in user space. This new version break the API used in the v1.x but this is a complete rewrite of the Powerlink EPSG DS 301 implementation. The v1.x is deprecated anyway. The new build system has been split in several CMake projects which makes it difficult to package with the Buildroot CMake infra. So add a top level CMakeLists.txt to build each openpowerlink component without having to package each of them in a separate Buildroot packages. Also we need to fix the build system to support the top level CMake build. [1] http://sourceforge.net/projects/openpowerlink/ Signed-off-by: Romain Naour <romain.naour@gmail.com> [Thomas: - rename patches to not contain the [FIX] part in their title. - rewrap Config.in help text - rename "openPOWERLINK stack type" to "stack type" - rename ""openpowerlink demos" to "demos"] Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
126 lines
6.2 KiB
Diff
126 lines
6.2 KiB
Diff
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
|
|
|