Skip to content

Commit

Permalink
fix yocoto installation of cmake for usermerge feature
Browse files Browse the repository at this point in the history
Yocto requires all binaries and library to be installed
in /usr directory for usermerge feature to work.

Signed-off-by: Mahesh Rao <[email protected]>
  • Loading branch information
maheshraotm committed Sep 5, 2024
1 parent c18034b commit 21b64b1
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 12 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/linux-aarch64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,10 @@ jobs:
script: |
set -ex
cmake --install ${{github.workspace}}/work/build --prefix=${{github.workspace}}/work/deploy -v --component uniLibRSU_lib_Runtime
test -f "${{github.workspace}}/work/deploy/lib/libuniLibRSU.so.$(cat ${{github.workspace}}/work/build/CMakeCache.txt | grep CMAKE_PROJECT_VERSION_MAJOR | cut -d "=" -f2)"
test -f "${{github.workspace}}/work/deploy/include/RSU_OSAL_types.h"
test -f "${{github.workspace}}/work/deploy/include/libRSU.h"
test -f "${{github.workspace}}/work/deploy/include/libRSU_OSAL.h"
test -f "${{github.workspace}}/work/deploy/usr/lib/libuniLibRSU.so.$(cat ${{github.workspace}}/work/build/CMakeCache.txt | grep CMAKE_PROJECT_VERSION_MAJOR | cut -d "=" -f2)"
test -f "${{github.workspace}}/work/deploy/usr/include/RSU_OSAL_types.h"
test -f "${{github.workspace}}/work/deploy/usr/include/libRSU.h"
test -f "${{github.workspace}}/work/deploy/usr/include/libRSU_OSAL.h"
test -f "${{github.workspace}}/work/deploy/etc/librsu.rc"
- name: deploy client application
Expand All @@ -64,4 +64,4 @@ jobs:
script: |
set -ex
cmake --install ${{github.workspace}}/work/build --prefix=${{github.workspace}}/work/deploy -v --component uniLibRSU_client_Runtime_GSRD
test -x "${{github.workspace}}/work/deploy/sbin/rsu_client"
test -x "${{github.workspace}}/work/deploy/usr/bin/rsu_client"
13 changes: 7 additions & 6 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
cmake_minimum_required(VERSION 3.24)

include(CMakePackageConfigHelpers)
include(GNUInstallDirs)

include(cmake/platform.cmake)
include(cmake/coverage.cmake)
Expand Down Expand Up @@ -81,26 +82,26 @@ if(PLATFORM STREQUAL linux-aarch64)

install(TARGETS uniLibRSU
LIBRARY
DESTINATION ${CMAKE_INSTALL_LIBDIR}
DESTINATION usr/lib
COMPONENT uniLibRSU_lib_Development
PUBLIC_HEADER
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
DESTINATION usr/include
COMPONENT uniLibRSU_lib_Development
ARCHIVE
DESTINATION ${CMAKE_INSTALL_LIBDIR}
DESTINATION usr/lib
COMPONENT uniLibRSU_lib_Development
)

install(TARGETS uniLibRSU
LIBRARY
DESTINATION ${CMAKE_INSTALL_LIBDIR}
DESTINATION usr/lib
COMPONENT uniLibRSU_lib_Runtime
NAMELINK_SKIP
ARCHIVE
DESTINATION ${CMAKE_INSTALL_LIBDIR}
DESTINATION usr/lib
COMPONENT uniLibRSU_lib_Runtime
PUBLIC_HEADER
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
DESTINATION usr/include
COMPONENT uniLibRSU_lib_Runtime
)

Expand Down
2 changes: 1 addition & 1 deletion linux-example/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@ set_target_properties(rsu_client PROPERTIES

install(TARGETS rsu_client
RUNTIME
DESTINATION ${CMAKE_INSTALL_SBINDIR}
DESTINATION usr/bin
COMPONENT uniLibRSU_client_Runtime_GSRD
)

0 comments on commit 21b64b1

Please sign in to comment.