Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions Demos/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -93,12 +93,12 @@ macro(make_silkit_demo executableName demoSourceFile addToPackage)
$<$<CXX_COMPILER_ID:MSVC>: "${CMAKE_CURRENT_SOURCE_DIR}/../../demo.manifest" >
)
remove_definitions(-DEXPORT_SilKitAPI)

# Group this demo project into a folder
set_target_properties(${executableName} PROPERTIES
FOLDER "Demos"
RUNTIME_OUTPUT_DIRECTORY "${_DEMO_OUTPUT_DIR}"
INSTALL_RPATH "$ORIGIN/../lib:$ORIGIN"
INSTALL_RPATH "$ORIGIN/../${CMAKE_INSTALL_LIBDIR}:$ORIGIN"
)

foreach(_build_type ${CMAKE_CONFIGURATION_TYPES})
Expand All @@ -111,8 +111,8 @@ macro(make_silkit_demo executableName demoSourceFile addToPackage)

find_package(Threads)
target_link_libraries(${executableName}
PRIVATE
SilKit::SilKit
PRIVATE
SilKit::SilKit
Threads::Threads
)
if(MSVC)
Expand Down
6 changes: 3 additions & 3 deletions SilKit/cmake/SilKitInstall.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
# |- bin/+
# |- *{.exe,dll}
# |- SilKitLauncher
# |- lib/+
# |- *.{so,a,lib} <artifacts>
# |- python/site-packages/Launcher <launcher support>
# |- {lib,lib64}/+
# |- *.{so,a,lib} <artifacts>
# |- python/site-packages/Launcher <launcher support>
# |
# |- share/+
# |- cmake/ <exports>
Expand Down
2 changes: 1 addition & 1 deletion Utilities/SilKitMonitor/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ add_executable(sil-kit-monitor
set_target_properties(sil-kit-monitor PROPERTIES
FOLDER "Utilities"
RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/$<CONFIG>"
INSTALL_RPATH "$ORIGIN/../lib"
INSTALL_RPATH "$ORIGIN/../${CMAKE_INSTALL_LIBDIR}"
Copy link
Collaborator Author

@snps-behrens snps-behrens Jan 23, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a question that occurred to me looking at this again: Is there a reason the sil-kit-monitor does not have the trailing $ORIGIN that the other executables have? Or maybe the other way around; what is the reason that all the other executables are installed with a trailing $ORIGIN in the RPATH?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was before my time, so I don't know the exact reason, but the whole RPATH shenanigans are happening so we/users can take the SIL Kit Zip distributions and just copy them wherever on the target system and as long as the folder hierarchy of the zip is kept intact, everything works. The trailing $ORIGIN might be a remnant from earlier distribution models, but afaik it is not needed in the current distribution model. Can't be sure though to change that without breaking some users workflow.

To be frank I'd rather get rid of the whole rpath setting by default via CMakeLists.txt and put it specifically into the CMake cmdline/scripts that build the ZIP distributions. But that is a bigger discussion to be had, so for the moment I am just glad someone fixed it for non Debian derived Linux distributions :)

)

target_link_libraries(sil-kit-monitor
Expand Down
2 changes: 1 addition & 1 deletion Utilities/SilKitSystemController/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ add_executable(sil-kit-system-controller
set_target_properties(sil-kit-system-controller PROPERTIES
FOLDER "Utilities"
RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/$<CONFIG>"
INSTALL_RPATH "$ORIGIN/../lib:$ORIGIN"
INSTALL_RPATH "$ORIGIN/../${CMAKE_INSTALL_LIBDIR}:$ORIGIN"
)

target_link_libraries(sil-kit-system-controller
Expand Down
4 changes: 3 additions & 1 deletion docs/changelog/versions/latest.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,6 @@

## Fixed

- `sil-kit-registry`: fixed the configurability of the listen URI, when used as Windows System Service.
- `sil-kit-registry`: fixed the configurability of the listen URI, when used as Windows System Service.

- `cmake`: Demo and Utility `RPATH`s are now set to match the install hierarchy on all systems.
9 changes: 4 additions & 5 deletions docs/for-developers/developers.rst
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ Using the |ProductName| package
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

The |ProductName| distribution contains a self-contained and deployable installation in the *SilKit* directory.
The CMake build configuration required is exported to ``SilKit/lib/cmake/SilKit`` and defines the ``SilKit::SilKit`` target.
The CMake build configuration required is exported to ``SilKit/{lib,lib64}/cmake/SilKit`` and defines the ``SilKit::SilKit`` target.

From CMake this can be consumed via the ``find_package(SilKit CONFIG)`` mechanism.
For example, the following CMakeLists.txt imports the |ProductName| library based on its file system path.
Expand All @@ -57,7 +57,7 @@ For example, the following CMakeLists.txt imports the |ProductName| library base
:lines: 22-31

Properties, like include directories and compile flags, are automatically handled by the imported target.
If you use another method to build your software you can directly use the ``SilKit/include`` and ``SilKit/lib`` directories for C++ headers and libraries.
If you use another method to build your software you can directly use the ``SilKit/include`` and ``SilKit/{lib,lib64}`` directories for C++ headers and libraries.

.. _sec:developer-simple:

Expand Down Expand Up @@ -145,15 +145,15 @@ For convenience and to reduce code duplication, these utility programs are imple
The final simulation setup can be run through the following commands:

.. code-block::

# Start the Middleware Registry
./sil-kit-registry.exe

# Start the System Controller and tell it to wait for PublisherParticipant and SubscriberParticipant
./sil-kit-system-controller.exe PublisherParticipant SubscriberParticipant

# Start the application running the two participants
# Make sure that the SilKit.dll and simple.yaml are available
# Make sure that the SilKit.dll and simple.yaml are available
./SampleSilKit.exe

The complete source code of this sample can be found here: :download:`CMakeLists.txt<../code-samples/simple/CMakeLists.txt>`
Expand Down Expand Up @@ -267,4 +267,3 @@ Since these are not part of the CI pipeline, compatibility with these platforms
* - Ubuntu 18.04
- amd64
-

Loading