From 7b7f9c1403fd73174ef56237c8032cefac82d437 Mon Sep 17 00:00:00 2001 From: easymodo Date: Mon, 1 Jun 2020 17:27:58 +0300 Subject: [PATCH] [cmake] check for absolute path; change SHARED > MODULE --- CMakeLists.txt | 7 ++++++- plugins/player_mpv/CMakeLists.txt | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) Index: qimgv-0.9.1/CMakeLists.txt =================================================================== --- qimgv-0.9.1.orig/CMakeLists.txt +++ qimgv-0.9.1/CMakeLists.txt @@ -12,7 +12,12 @@ project(qimgv #endif() message(STATUS "Build configuration: " ${CMAKE_BUILD_TYPE}) -set(QIMGV_PLUGIN_DIR "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}/qimgv") +if(IS_ABSOLUTE ${CMAKE_INSTALL_LIBDIR}) + set(QIMGV_PLUGIN_DIR "${CMAKE_INSTALL_LIBDIR}/qimgv") +else() + set(QIMGV_PLUGIN_DIR "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}/qimgv") +endif() + ADD_DEFINITIONS(-D_QIMGV_PLUGIN_DIR="${QIMGV_PLUGIN_DIR}") message(STATUS "Plugin dir: " ${QIMGV_PLUGIN_DIR}) Index: qimgv-0.9.1/plugins/player_mpv/CMakeLists.txt =================================================================== --- qimgv-0.9.1.orig/plugins/player_mpv/CMakeLists.txt +++ qimgv-0.9.1/plugins/player_mpv/CMakeLists.txt @@ -14,7 +14,7 @@ pkg_check_modules(Mpv REQUIRED IMPORTED_ include(GNUInstallDirs) -add_library(player_mpv SHARED +add_library(player_mpv MODULE src/videoplayer.cpp src/mpvwidget.cpp src/videoplayermpv.cpp