From 2c963d8d068432296991c20eb3df239bc982a35b Mon Sep 17 00:00:00 2001 From: Sergey Yagovtsev Date: Fri, 1 Sep 2017 00:01:38 +0300 Subject: [PATCH] Install profiler_gui and set rpath to ORIGIN --- CMakeLists.txt | 2 ++ profiler_gui/CMakeLists.txt | 10 ++++++++++ 2 files changed, 12 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 1e26637..8b71367 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -23,6 +23,8 @@ macro(easy_define_target_option TARGET SOURCE_OPTION TARGET_DEFINITION) target_compile_options(${TARGET} PUBLIC -D${TARGET_DEFINITION}=${_VALUE}) endmacro() +SET(CMAKE_INSTALL_RPATH "$ORIGIN") + add_subdirectory(easy_profiler_core) add_subdirectory(profiler_gui) diff --git a/profiler_gui/CMakeLists.txt b/profiler_gui/CMakeLists.txt index 13ffade..448d53d 100644 --- a/profiler_gui/CMakeLists.txt +++ b/profiler_gui/CMakeLists.txt @@ -47,6 +47,16 @@ if (Qt5Widgets_FOUND) if (MINGW) target_compile_definitions(profiler_gui PRIVATE -DSTRSAFE_NO_DEPRECATE) endif () + + install( + TARGETS + profiler_gui + RUNTIME + DESTINATION + bin + ) + + set_property(TARGET profiler_gui PROPERTY INSTALL_RPATH_USE_LINK_PATH TRUE) else () message(STATUS "INFO\n\n\tQt5 not found! Generating EasyProfiler projects without GUI.\n") endif ()