diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 00000000..957d95e3 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,547 @@ + +### C ### +# Prerequisites +*.d + +# Object files +*.o +*.ko +*.obj +*.elf + +# Linker output +*.ilk +*.map +*.exp + +# Precompiled Headers +*.gch +*.pch + +# Libraries +*.lib +*.a +*.la +*.lo + +# Shared objects (inc. Windows DLLs) +*.dll +*.so +*.so.* +*.dylib + +# Executables +*.exe +*.out +*.app +*.i*86 +*.x86_64 +*.hex + +# Debug files +*.dSYM/ +*.su +*.idb +*.pdb + +# Kernel Module Compile Results +*.mod* +*.cmd +.tmp_versions/ +modules.order +Module.symvers +Mkfile.old +dkms.conf + +### C++ ### +# Prerequisites + +# Compiled Object files +*.slo + +# Precompiled Headers + +# Compiled Dynamic libraries + +# Fortran module files +*.mod +*.smod + +# Compiled Static libraries +*.lai + +# Executables + +### CMake ### +CMakeCache.txt +CMakeFiles +CMakeScripts +Testing +Makefile +cmake_install.cmake +install_manifest.txt +compile_commands.json +CTestTestfile.cmake +build + +### Eclipse ### + +.metadata +bin/ +tmp/ +*.tmp +*.bak +*.swp +*~.nib +local.properties +.settings/ +.loadpath +.recommenders + +# External tool builders +.externalToolBuilders/ + +# Locally stored "Eclipse launch configurations" +*.launch + +# PyDev specific (Python IDE for Eclipse) +*.pydevproject + +# CDT-specific (C/C++ Development Tooling) +.cproject + +# Java annotation processor (APT) +.factorypath + +# PDT-specific (PHP Development Tools) +.buildpath + +# sbteclipse plugin +.target + +# Tern plugin +.tern-project + +# TeXlipse plugin +.texlipse + +# STS (Spring Tool Suite) +.springBeans + +# Code Recommenders +.recommenders/ + +# Scala IDE specific (Scala & Java development for Eclipse) +.cache-main +.scala_dependencies +.worksheet + +### Eclipse Patch ### +# Eclipse Core +.project + +# JDT-specific (Eclipse Java Development Tools) +.classpath + +### Linux ### +*~ + +# temporary files which can be created if a process still has a handle open of a deleted file +.fuse_hidden* + +# KDE directory preferences +.directory + +# Linux trash folder which might appear on any partition or disk +.Trash-* + +# .nfs files are created when an open file is removed but is still being accessed +.nfs* + +### SublimeText ### +# cache files for sublime text +*.tmlanguage.cache +*.tmPreferences.cache +*.stTheme.cache + +# workspace files are user-specific +*.sublime-workspace + +# project files should be checked into the repository, unless a significant +# proportion of contributors will probably not be using SublimeText +# *.sublime-project + +# sftp configuration file +sftp-config.json + +# Package control specific files +Package Control.last-run +Package Control.ca-list +Package Control.ca-bundle +Package Control.system-ca-bundle +Package Control.cache/ +Package Control.ca-certs/ +Package Control.merged-ca-bundle +Package Control.user-ca-bundle +oscrypto-ca-bundle.crt +bh_unicode_properties.cache + +# Sublime-github package stores a github token in this file +# https://packagecontrol.io/packages/sublime-github +GitHub.sublime-settings + +### Vim ### +# swap +[._]*.s[a-v][a-z] +[._]*.sw[a-p] +[._]s[a-v][a-z] +[._]sw[a-p] +# session +Session.vim +# temporary +.netrwhist +# auto-generated tag files +tags + +### VisualStudioCode ### +.vscode/* +#!.vscode/settings.json +!.vscode/tasks.json +#!.vscode/launch.json +!.vscode/extensions.json +.history + +### Windows ### +# Windows thumbnail cache files +Thumbs.db +ehthumbs.db +ehthumbs_vista.db + +# Folder config file +Desktop.ini + +# Recycle Bin used on file shares +$RECYCLE.BIN/ + +# Windows Installer files +*.cab +*.msi +*.msm +*.msp + +# Windows shortcuts +*.lnk + +### VisualStudio ### +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. +## +## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore + +# User-specific files +*.suo +*.user +*.userosscache +*.sln.docstates + +# User-specific files (MonoDevelop/Xamarin Studio) +*.userprefs + +# Build results +[Dd]ebug/ +[Dd]ebugPublic/ +[Rr]elease/ +[Rr]eleases/ +x64/ +x86/ +bld/ +[Bb]in/ +[Oo]bj/ +[Ll]og/ + +# Visual Studio 2015 cache/options directory +.vs/ +# Uncomment if you have tasks that create the project's static files in wwwroot +#wwwroot/ + +# MSTest test Results +[Tt]est[Rr]esult*/ +[Bb]uild[Ll]og.* + +# NUNIT +*.VisualState.xml +TestResult.xml + +# Build Results of an ATL Project +[Dd]ebugPS/ +[Rr]eleasePS/ +dlldata.c + +# .NET Core +project.lock.json +project.fragment.lock.json +artifacts/ +**/Properties/launchSettings.json + +*_i.c +*_p.c +*_i.h +*.meta +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp_proj +*.log +*.vspscc +*.vssscc +.builds +*.pidb +*.svclog +*.scc + +# Chutzpah Test files +_Chutzpah* + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opendb +*.opensdf +*.sdf +*.cachefile +*.VC.db +*.VC.VC.opendb + +# Visual Studio profiler +*.psess +*.vsp +*.vspx +*.sap + +# TFS 2012 Local Workspace +$tf/ + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper*/ +*.[Rr]e[Ss]harper +*.DotSettings.user + +# JustCode is a .NET coding add-in +.JustCode + +# TeamCity is a build add-in +_TeamCity* + +# DotCover is a Code Coverage Tool +*.dotCover + +# Visual Studio code coverage results +*.coverage +*.coveragexml + +# NCrunch +_NCrunch_* +.*crunch*.local.xml +nCrunchTemp_* + +# MightyMoose +*.mm.* +AutoTest.Net/ + +# Web workbench (sass) +.sass-cache/ + +# Installshield output folder +[Ee]xpress/ + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html + +# Click-Once directory +publish/ + +# Publish Web Output +*.[Pp]ublish.xml +*.azurePubxml +# TODO: Uncomment the next line to ignore your web deploy settings. +# By default, sensitive information, such as encrypted password +# should be stored in the .pubxml.user file. +#*.pubxml +*.pubxml.user +*.publishproj + +# Microsoft Azure Web App publish settings. Comment the next line if you want to +# checkin your Azure Web App publish settings, but sensitive information contained +# in these scripts will be unencrypted +PublishScripts/ + +# NuGet Packages +*.nupkg +# The packages folder can be ignored because of Package Restore +**/packages/* +# except build/, which is used as an MSBuild target. +!**/packages/build/ +# Uncomment if necessary however generally it will be regenerated when needed +#!**/packages/repositories.config +# NuGet v3's project.json files produces more ignorable files +*.nuget.props +*.nuget.targets + +# Microsoft Azure Build Output +csx/ +*.build.csdef + +# Microsoft Azure Emulator +ecf/ +rcf/ + +# Windows Store app package directories and files +AppPackages/ +BundleArtifacts/ +Package.StoreAssociation.xml +_pkginfo.txt + +# Visual Studio cache files +# files ending in .cache can be ignored +*.[Cc]ache +# but keep track of directories ending in .cache +!*.[Cc]ache/ + +# Others +ClientBin/ +~$* +*.dbmdl +*.dbproj.schemaview +*.jfm +*.pfx +*.publishsettings +orleans.codegen.cs + +# Since there are multiple workflows, uncomment next line to ignore bower_components +# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) +#bower_components/ + +# RIA/Silverlight projects +Generated_Code/ + +# Backup & report files from converting an old project file +# to a newer Visual Studio version. Backup files are not needed, +# because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML +UpgradeLog*.htm + +# SQL Server files +*.mdf +*.ldf +*.ndf + +# Business Intelligence projects +*.rdl.data +*.bim.layout +*.bim_*.settings + +# Microsoft Fakes +FakesAssemblies/ + +# GhostDoc plugin setting file +*.GhostDoc.xml + +# Node.js Tools for Visual Studio +.ntvs_analysis.dat +node_modules/ + +# Typescript v1 declaration files +typings/ + +# Visual Studio 6 build log +*.plg + +# Visual Studio 6 workspace options file +*.opt + +# Visual Studio 6 auto-generated workspace file (contains which files were open etc.) +*.vbw + +# Visual Studio LightSwitch build output +**/*.HTMLClient/GeneratedArtifacts +**/*.DesktopClient/GeneratedArtifacts +**/*.DesktopClient/ModelManifest.xml +**/*.Server/GeneratedArtifacts +**/*.Server/ModelManifest.xml +_Pvt_Extensions + +# Paket dependency manager +.paket/paket.exe +paket-files/ + +# FAKE - F# Make +.fake/ + +# JetBrains Rider +.idea/ +*.sln.iml + +# CodeRush +.cr/ + +# Python Tools for Visual Studio (PTVS) +__pycache__/ +*.pyc + +# Cake - Uncomment if you are using it +# tools/** +# !tools/packages.config + +# Telerik's JustMock configuration file +*.jmconfig + +# BizTalk build output +*.btp.cs +*.btm.cs +*.odx.cs +*.xsd.cs + +# YCM config files +.ycm_extra_conf.py +.color_coded + +# Clang format +.clang-format + +### VisualStudio Patch ### +# By default, sensitive information, such as encrypted password +# should be stored in the .pubxml.user file. + +### Git ### +# Created by git for backups. To disable backups in Git: +# $ git config --global mergetool.keepBackup false +*.orig + +# Created by git when using merge tools for conflicts +*.BACKUP.* +*.BASE.* +*.LOCAL.* +*.REMOTE.* +*_BACKUP_*.txt +*_BASE_*.txt +*_LOCAL_*.txt +*_REMOTE_*.txt + +# End of https://www.gitignore.io/api/git \ No newline at end of file diff --git a/CMakeLists.txt b/CMakeLists.txt index 2f7e7116..7d8ccf05 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -23,6 +23,7 @@ cmake_minimum_required(VERSION 3.5.0 FATAL_ERROR) option(UCLIENT_SUPERBUILD "Enable superbuild compilation." ON) option(UCLIENT_BUILD_TESTS "Build tests." OFF) option(UCLIENT_BUILD_EXAMPLES "Build examples." OFF) +option(UCLIENT_INSTALL_EXAMPLES "Install examples." OFF) option(UCLIENT_VERBOSE_SERIALIZATION "Build with serialization verbosity." OFF) option(UCLIENT_VERBOSE_MESSAGE "Build with message verbosity." OFF) option(UCLIENT_PIC "Control Position Independent Code." ON) @@ -58,7 +59,7 @@ list(APPEND _deps "microcdr\;${_microcdr_version}") ############################################################################### set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules) if(NOT UCLIENT_SUPERBUILD) - project(microxrcedds_client VERSION "1.2.1" LANGUAGES C) + project(microxrcedds_client VERSION "1.2.2" LANGUAGES C) else() project(uclient_superbuild NONE) include(${PROJECT_SOURCE_DIR}/cmake/SuperBuild.cmake) @@ -278,16 +279,16 @@ endif() # Examples ############################################################################### if(UCLIENT_BUILD_EXAMPLES) - add_subdirectory(examples/PublishHelloWorld) - add_subdirectory(examples/SubscribeHelloWorld) - add_subdirectory(examples/PublishHelloWorldP2P) - add_subdirectory(examples/SubscribeHelloWorldP2P) - add_subdirectory(examples/ShapesDemo) add_subdirectory(examples/Deployment) add_subdirectory(examples/Discovery) - add_subdirectory(examples/RequestAdder) - add_subdirectory(examples/ReplyAdder) add_subdirectory(examples/MultiSessionHelloWorld) + add_subdirectory(examples/PublishHelloWorld) + add_subdirectory(examples/PublishHelloWorldP2P) + add_subdirectory(examples/ReplyAdder) + add_subdirectory(examples/RequestAdder) + add_subdirectory(examples/ShapesDemo) + add_subdirectory(examples/SubscribeHelloWorld) + add_subdirectory(examples/SubscribeHelloWorldP2P) endif() ############################################################################### diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 00000000..36ef937d --- /dev/null +++ b/Dockerfile @@ -0,0 +1,45 @@ +######################################################################################### +# Micro XRCE-DDS Client Docker +######################################################################################### + +# Build stage +FROM ubuntu AS build +ENV DEBIAN_FRONTEND=noninteractive +WORKDIR /root + +# Essentials +RUN apt-get update +RUN apt-get install -y \ + software-properties-common \ + build-essential \ + cmake \ + git + +# Prepare Micro XRCE-DDS Client workspace +RUN mkdir -p /client/build +ADD . /client/ + +# Build Micro XRCE-DDS Client and install +RUN cd /client/build && \ + cmake \ + -DCMAKE_INSTALL_PREFIX=../install \ + -DUCLIENT_BUILD_EXAMPLES=ON \ + -DUCLIENT_INSTALL_EXAMPLES=ON \ + -DUCLIENT_ISOLATED_INSTALL=OFF \ + .. &&\ + make && make install + +# Prepare Micro XRCE-DDS Client artifacts +RUN cd /client && \ + tar -czvf install.tar.gz -C install . + +# Final user image +FROM ubuntu +WORKDIR /root + +# Copy Micro XRCE-DDS Client build artifacts +COPY --from=build /client/install.tar.gz /usr/local/ +RUN tar -xzvf /usr/local/install.tar.gz -C /usr/local/ &&\ + rm /usr/local/install.tar.gz + +RUN ldconfig \ No newline at end of file diff --git a/examples/Deployment/CMakeLists.txt b/examples/Deployment/CMakeLists.txt index b2c85b23..cc8d7f0b 100644 --- a/examples/Deployment/CMakeLists.txt +++ b/examples/Deployment/CMakeLists.txt @@ -38,16 +38,14 @@ else() target_link_libraries(ConfiguratorClient microxrcedds_client $<$:-Wl,--gc-section,--no-export-dynamic>) - install(TARGETS ${PROJECT_NAME} - RUNTIME DESTINATION examples/uxr/client/${PROJECT_NAME}/${BIN_INSTALL_DIR} - ) - - install(DIRECTORY ${PROJECT_SOURCE_DIR}/ - DESTINATION examples/uxr/client/${PROJECT_NAME} - FILES_MATCHING PATTERN "*.h" - PATTERN "*.c" - PATTERN "*.idl" - ) + if(UCLIENT_INSTALL_EXAMPLES) + install( + TARGETS + ${PROJECT_NAME} + RUNTIME DESTINATION + ${BIN_INSTALL_DIR} + ) + endif() ############################################################# ### PUBLISHER @@ -60,16 +58,14 @@ else() target_link_libraries(PublisherClient microxrcedds_client $<$:-Wl,--gc-section,--no-export-dynamic>) - install(TARGETS ${PROJECT_NAME} - RUNTIME DESTINATION examples/uxr/client/${PROJECT_NAME}/${BIN_INSTALL_DIR} - ) - - install(DIRECTORY ${PROJECT_SOURCE_DIR}/ - DESTINATION examples/uxr/client/${PROJECT_NAME} - FILES_MATCHING PATTERN "*.h" - PATTERN "*.c" - PATTERN "*.idl" - ) + if(UCLIENT_INSTALL_EXAMPLES) + install( + TARGETS + ${PROJECT_NAME} + RUNTIME DESTINATION + ${BIN_INSTALL_DIR} + ) + endif() ############################################################# ### SUBSCRIBER @@ -82,14 +78,12 @@ else() target_link_libraries(SubscriberClient microxrcedds_client $<$:-Wl,--gc-section,--no-export-dynamic>) - install(TARGETS ${PROJECT_NAME} - RUNTIME DESTINATION examples/uxr/client/${PROJECT_NAME}/${BIN_INSTALL_DIR} - ) - - install(DIRECTORY ${PROJECT_SOURCE_DIR}/ - DESTINATION examples/uxr/client/${PROJECT_NAME} - FILES_MATCHING PATTERN "*.h" - PATTERN "*.c" - PATTERN "*.idl" - ) + if(UCLIENT_INSTALL_EXAMPLES) + install( + TARGETS + ${PROJECT_NAME} + RUNTIME DESTINATION + ${BIN_INSTALL_DIR} + ) + endif() endif() diff --git a/examples/Discovery/CMakeLists.txt b/examples/Discovery/CMakeLists.txt index f24e6890..01bfc2bb 100644 --- a/examples/Discovery/CMakeLists.txt +++ b/examples/Discovery/CMakeLists.txt @@ -38,14 +38,12 @@ else() target_link_libraries(${PROJECT_NAME} microxrcedds_client $<$:-Wl,--gc-section,--no-export-dynamic>) - install(TARGETS ${PROJECT_NAME} - RUNTIME DESTINATION examples/uxr/client/${PROJECT_NAME}/${BIN_INSTALL_DIR} - ) - - install(DIRECTORY ${PROJECT_SOURCE_DIR}/ - DESTINATION examples/uxr/client/${PROJECT_NAME} - FILES_MATCHING PATTERN "*.h" - PATTERN "*.c" - ) - + if(UCLIENT_INSTALL_EXAMPLES) + install( + TARGETS + ${PROJECT_NAME} + RUNTIME DESTINATION + ${BIN_INSTALL_DIR} + ) + endif() endif() diff --git a/examples/MultiSessionHelloWorld/CMakeLists.txt b/examples/MultiSessionHelloWorld/CMakeLists.txt index e5fe4d70..ea437d15 100644 --- a/examples/MultiSessionHelloWorld/CMakeLists.txt +++ b/examples/MultiSessionHelloWorld/CMakeLists.txt @@ -38,14 +38,12 @@ else() target_link_libraries(${PROJECT_NAME} microxrcedds_client $<$:-Wl,--gc-section,--no-export-dynamic>) - install(TARGETS ${PROJECT_NAME} - RUNTIME DESTINATION examples/uxr/client/${PROJECT_NAME}/${BIN_INSTALL_DIR} - ) - - install(DIRECTORY ${PROJECT_SOURCE_DIR}/ - DESTINATION examples/uxr/client/${PROJECT_NAME} - FILES_MATCHING PATTERN "*.h" - PATTERN "*.c" - PATTERN "*.idl" - ) + if(UCLIENT_INSTALL_EXAMPLES) + install( + TARGETS + ${PROJECT_NAME} + RUNTIME DESTINATION + ${BIN_INSTALL_DIR} + ) + endif() endif() diff --git a/examples/PublishHelloWorld/CMakeLists.txt b/examples/PublishHelloWorld/CMakeLists.txt index db7e3ea1..e4fb8074 100644 --- a/examples/PublishHelloWorld/CMakeLists.txt +++ b/examples/PublishHelloWorld/CMakeLists.txt @@ -38,14 +38,12 @@ else() target_link_libraries(${PROJECT_NAME} microxrcedds_client $<$:-Wl,--gc-section,--no-export-dynamic>) - install(TARGETS ${PROJECT_NAME} - RUNTIME DESTINATION examples/uxr/client/${PROJECT_NAME}/${BIN_INSTALL_DIR} - ) - - install(DIRECTORY ${PROJECT_SOURCE_DIR}/ - DESTINATION examples/uxr/client/${PROJECT_NAME} - FILES_MATCHING PATTERN "*.h" - PATTERN "*.c" - PATTERN "*.idl" - ) + if(UCLIENT_INSTALL_EXAMPLES) + install( + TARGETS + ${PROJECT_NAME} + RUNTIME DESTINATION + ${BIN_INSTALL_DIR} + ) + endif() endif() diff --git a/examples/PublishHelloWorldP2P/CMakeLists.txt b/examples/PublishHelloWorldP2P/CMakeLists.txt index 10d48386..b8aa4c3b 100644 --- a/examples/PublishHelloWorldP2P/CMakeLists.txt +++ b/examples/PublishHelloWorldP2P/CMakeLists.txt @@ -38,14 +38,12 @@ else() target_link_libraries(${PROJECT_NAME} microxrcedds_client $<$:-Wl,--gc-section,--no-export-dynamic>) - install(TARGETS ${PROJECT_NAME} - RUNTIME DESTINATION examples/uxr/client/${PROJECT_NAME}/${BIN_INSTALL_DIR} - ) - - install(DIRECTORY ${PROJECT_SOURCE_DIR}/ - DESTINATION examples/uxr/client/${PROJECT_NAME} - FILES_MATCHING PATTERN "*.h" - PATTERN "*.c" - PATTERN "*.idl" - ) + if(UCLIENT_INSTALL_EXAMPLES) + install( + TARGETS + ${PROJECT_NAME} + RUNTIME DESTINATION + ${BIN_INSTALL_DIR} + ) + endif() endif() diff --git a/examples/ReplyAdder/CMakeLists.txt b/examples/ReplyAdder/CMakeLists.txt index 65812b55..0d923ac2 100644 --- a/examples/ReplyAdder/CMakeLists.txt +++ b/examples/ReplyAdder/CMakeLists.txt @@ -36,17 +36,12 @@ else() microxrcedds_client ) - install(TARGETS ${PROJECT_NAME} - RUNTIME DESTINATION - examples/uxr/client/${PROJECT_NAME}/${BIN_INSTALL_DIR} - ) - - install(DIRECTORY ${PROJECT_SOURCE_DIR} - DESTINATION - examples/uxr/client/${PROJECT_NAME} - FILES_MATCHING - PATTERN "*.h" - PATTERN "*.c" - PATTERN "*.idl" - ) + if(UCLIENT_INSTALL_EXAMPLES) + install( + TARGETS + ${PROJECT_NAME} + RUNTIME DESTINATION + ${BIN_INSTALL_DIR} + ) + endif() endif() \ No newline at end of file diff --git a/examples/RequestAdder/CMakeLists.txt b/examples/RequestAdder/CMakeLists.txt index d692af8d..9d0552c8 100644 --- a/examples/RequestAdder/CMakeLists.txt +++ b/examples/RequestAdder/CMakeLists.txt @@ -36,17 +36,12 @@ else() microxrcedds_client ) - install(TARGETS ${PROJECT_NAME} - RUNTIME DESTINATION - examples/uxr/client/${PROJECT_NAME}/${BIN_INSTALL_DIR} - ) - - install(DIRECTORY ${PROJECT_SOURCE_DIR} - DESTINATION - examples/uxr/client/${PROJECT_NAME} - FILES_MATCHING - PATTERN "*.h" - PATTERN "*.c" - PATTERN "*.idl" - ) + if(UCLIENT_INSTALL_EXAMPLES) + install( + TARGETS + ${PROJECT_NAME} + RUNTIME DESTINATION + ${BIN_INSTALL_DIR} + ) + endif() endif() \ No newline at end of file diff --git a/examples/ShapesDemo/CMakeLists.txt b/examples/ShapesDemo/CMakeLists.txt index 6a601dbf..f6e2c05d 100644 --- a/examples/ShapesDemo/CMakeLists.txt +++ b/examples/ShapesDemo/CMakeLists.txt @@ -45,14 +45,12 @@ else() $<$:-Wl,--gc-section,--no-export-dynamic> ) - install(TARGETS ${PROJECT_NAME} - RUNTIME DESTINATION examples/uxr/client/${PROJECT_NAME}/${BIN_INSTALL_DIR} - ) - - install(DIRECTORY ${PROJECT_SOURCE_DIR}/ - DESTINATION examples/uxr/client/${PROJECT_NAME} - FILES_MATCHING PATTERN "*.h" - PATTERN "*.c" - PATTERN "*.idl" - ) + if(UCLIENT_INSTALL_EXAMPLES) + install( + TARGETS + ${PROJECT_NAME} + RUNTIME DESTINATION + ${BIN_INSTALL_DIR} + ) + endif() endif() diff --git a/examples/SubscribeHelloWorld/CMakeLists.txt b/examples/SubscribeHelloWorld/CMakeLists.txt index 34a84e27..06f9dbbe 100644 --- a/examples/SubscribeHelloWorld/CMakeLists.txt +++ b/examples/SubscribeHelloWorld/CMakeLists.txt @@ -39,14 +39,12 @@ else() target_link_libraries(${PROJECT_NAME} microxrcedds_client $<$:-Wl,--gc-section,--no-export-dynamic>) - install(TARGETS ${PROJECT_NAME} - RUNTIME DESTINATION examples/uxr/client/${PROJECT_NAME}/${BIN_INSTALL_DIR} - ) - - install(DIRECTORY ${PROJECT_SOURCE_DIR}/ - DESTINATION examples/uxr/client/${PROJECT_NAME} - FILES_MATCHING PATTERN "*.h" - PATTERN "*.c" - PATTERN "*.idl" - ) + if(UCLIENT_INSTALL_EXAMPLES) + install( + TARGETS + ${PROJECT_NAME} + RUNTIME DESTINATION + ${BIN_INSTALL_DIR} + ) + endif() endif() diff --git a/examples/SubscribeHelloWorldP2P/CMakeLists.txt b/examples/SubscribeHelloWorldP2P/CMakeLists.txt index 948bad2b..72aecc5a 100644 --- a/examples/SubscribeHelloWorldP2P/CMakeLists.txt +++ b/examples/SubscribeHelloWorldP2P/CMakeLists.txt @@ -39,14 +39,13 @@ else() target_link_libraries(${PROJECT_NAME} microxrcedds_client $<$:-Wl,--gc-section,--no-export-dynamic>) - install(TARGETS ${PROJECT_NAME} - RUNTIME DESTINATION examples/uxr/client/${PROJECT_NAME}/${BIN_INSTALL_DIR} - ) + if(UCLIENT_INSTALL_EXAMPLES) + install( + TARGETS + ${PROJECT_NAME} + RUNTIME DESTINATION + ${BIN_INSTALL_DIR} + ) + endif() - install(DIRECTORY ${PROJECT_SOURCE_DIR}/ - DESTINATION examples/uxr/client/${PROJECT_NAME} - FILES_MATCHING PATTERN "*.h" - PATTERN "*.c" - PATTERN "*.idl" - ) endif() diff --git a/examples/TimeSync/CMakeLists.txt b/examples/TimeSync/CMakeLists.txt index ffbbbec2..f65424aa 100644 --- a/examples/TimeSync/CMakeLists.txt +++ b/examples/TimeSync/CMakeLists.txt @@ -17,7 +17,7 @@ if (${CMAKE_VERSION} VERSION_GREATER 3.0) cmake_policy(SET CMP0048 NEW) endif() -project(time-sync) +project(TimeSync) if(NOT UCLIENT_BUILD_EXAMPLES) find_package(microxrcedds_client REQUIRED) @@ -38,14 +38,12 @@ else() target_link_libraries(${PROJECT_NAME} microxrcedds_client $<$:-Wl,--gc-section,--no-export-dynamic>) - install(TARGETS ${PROJECT_NAME} - RUNTIME DESTINATION examples/uxr/client/${PROJECT_NAME}/${BIN_INSTALL_DIR} - ) - - install(DIRECTORY ${PROJECT_SOURCE_DIR}/ - DESTINATION examples/uxr/client/${PROJECT_NAME} - FILES_MATCHING PATTERN "*.h" - PATTERN "*.c" - PATTERN "*.idl" - ) + if(UCLIENT_INSTALL_EXAMPLES) + install( + TARGETS + ${PROJECT_NAME} + RUNTIME DESTINATION + ${BIN_INSTALL_DIR} + ) + endif() endif() diff --git a/src/c/core/log/log.c b/src/c/core/log/log.c index 2d717cfa..b68637d7 100644 --- a/src/c/core/log/log.c +++ b/src/c/core/log/log.c @@ -303,7 +303,7 @@ void uxr_print_serialization(int direction, const uint8_t* buffer, size_t size) //================================================================== char* print_array_2(const uint8_t* array_2) { - static char buffer[256]; + static char buffer[249]; sprintf(buffer, "%02X%02X", array_2[0], array_2[1]); return buffer; }