diff --git a/cmake/megamol_config.cmake b/cmake/megamol_config.cmake index 2158e6df38..5ad52b2ce9 100644 --- a/cmake/megamol_config.cmake +++ b/cmake/megamol_config.cmake @@ -43,6 +43,13 @@ else () message(FATAL_ERROR "Unsupported compiler specified: '${CMAKE_CXX_COMPILER_ID}'") endif () +# Set RPath to "../lib" on binary install +if (UNIX) + set(CMAKE_BUILD_RPATH_USE_ORIGIN TRUE) + set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE) + set(CMAKE_INSTALL_RPATH "\$ORIGIN/../lib") +endif () + # Dependencies # OpenMP diff --git a/docs/manual.md b/docs/manual.md index 95821f1932..9a5599a03f 100644 --- a/docs/manual.md +++ b/docs/manual.md @@ -133,7 +133,7 @@ Our CI pipeline tests the build with gcc-9 and clang-10 on Ubuntu 20.04. - Hint: Use the `-j` option for `make` to run the build in parallel threads. -7. The run script `megamol.sh` is located in the default installation path `megamol/build/install/bin`. +7. The binary `megamol` is located in the default installation path `megamol/build/install/bin`. ### Command Line Arguments @@ -344,22 +344,6 @@ Open a console (e.g *Linux Terminal* or *Windows Powershell*) and change your wo $ ./megamol ``` -If additional external libraries are required (e.g. when using the OSPRay plugin), for Linux you have to run the provided shell script `./megamol.sh` instead. -This script adds the required library path: - -```bash - #!/bin/bash - # - # MegaMol startup script - # Copyright 2020, https://megamol.org/ - # - - BIN_DIR=$(dirname "$(readlink -f "${BASH_SOURCE[0]}")") - cd "$BIN_DIR" - - LD_LIBRARY_PATH=../lib:$LD_LIBRARY_PATH ./megamol "$@" -``` - MegaMol should start and print several messages to the console and an empty rendering window should appear. You can either check the console log messages or the messages printed in the *Log Console* window. The leading number of each line is the log level. @@ -586,8 +570,8 @@ e.g. mmSetFramebufferSize(100, 100). **CLI Option:** `--window wxh+x+y` - e.g. ./megamol.sh --window 100x100 for a window of size 100 x 100 pixels. - Also see help output: `./megamol.sh -h` + e.g. ./megamol --window 100x100 for a window of size 100 x 100 pixels. + Also see help output: `./megamol -h` ### ScreenShooter Module diff --git a/frontend/main/CMakeLists.txt b/frontend/main/CMakeLists.txt index bdca9530f0..836d438e69 100644 --- a/frontend/main/CMakeLists.txt +++ b/frontend/main/CMakeLists.txt @@ -40,15 +40,6 @@ if(BUILD_FRONTEND) install(FILES $ DESTINATION bin OPTIONAL) endif() endif () - - if(UNIX) - include(GNUInstallDirs) - set(cfg_LIB_PATH "../lib") # relative path from bin to lib dir - set(MEGAMOL_SHELL_START_SCRIPT "megamol.sh") - configure_file(extra/megamol.sh.in ${CMAKE_BINARY_DIR}/${MEGAMOL_SHELL_START_SCRIPT} @ONLY) - install(PROGRAMS ${CMAKE_BINARY_DIR}/${MEGAMOL_SHELL_START_SCRIPT} DESTINATION "bin") - endif() - endif() if(ENABLE_GL) diff --git a/frontend/main/extra/megamol.sh.in b/frontend/main/extra/megamol.sh.in deleted file mode 100644 index cafa14f2fb..0000000000 --- a/frontend/main/extra/megamol.sh.in +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash -# -# MegaMol startup script -# Copyright 2020, https://megamol.org/ -# - -BIN_DIR=$(dirname "$(readlink -f "${BASH_SOURCE[0]}")") -cd "$BIN_DIR" - -LD_LIBRARY_PATH=@cfg_LIB_PATH@:$LD_LIBRARY_PATH ./megamol "$@" diff --git a/plugins/cinematic/README.md b/plugins/cinematic/README.md index cad4e44de1..20f141c0d7 100644 --- a/plugins/cinematic/README.md +++ b/plugins/cinematic/README.md @@ -137,7 +137,7 @@ In order to run the example change to the `bin` folder of the megamol executable *Under Windows:* `.\megamol.exe ../examples/cinematic/cinematic_editor_megamol.lua` -*Under Linux:* `./megamol.sh ../examples/cinematic/cinematic_editor_megamol.lua` +*Under Linux:* `./megamol ../examples/cinematic/cinematic_editor_megamol.lua` ### How to use the cinematic editor diff --git a/plugins/mmospray/Readme.md b/plugins/mmospray/Readme.md index 357cd160a1..34a6ba58fb 100644 --- a/plugins/mmospray/Readme.md +++ b/plugins/mmospray/Readme.md @@ -40,8 +40,7 @@ The current dependencies are: [rkcommon](https://github.com/ospray/rkcommon), [o - CMake subsequently asks for the build files of the following dependencies: - rkcommon: `/install/rkcommon/lib/cmake/...` - Build and install MegaMol. - - In order to test OSPRay, start MegaMol using the example project file `/install/examples/testspheres_ospray_megamol.lua`. - *Note:* On Linux, you have to run MegaMol using the `megamol.sh` script in order to additionally set the required path to the shared libraries of OSPRay. + - In order to test OSPRay, start MegaMol using the example project file `/install/examples/testspheres_ospray_megamol.lua`. ## Modules