$OpenBSD: patch-cmake_FindPhononInternal_cmake,v 1.1.1.1 2017/07/17 21:06:37 zhuk Exp $
Allow paths to be overriden.
Also, make sure that subdirectory paths do not expand to absolute ones automatically.
--- cmake/FindPhononInternal.cmake.orig	Sun Mar 26 23:03:05 2017
+++ cmake/FindPhononInternal.cmake	Sun Mar 26 23:05:34 2017
@@ -64,20 +64,20 @@ include(${phonon_cmake_module_dir}/MacroEnsureVersion.
 
 include(GNUInstallDirs)
 
-set(SHARE_INSTALL_PREFIX        "${CMAKE_INSTALL_FULL_DATAROOTDIR}")  #              CACHE PATH "Base directory for files which go to share/")
-set(INCLUDE_INSTALL_DIR         "include" ) #           CACHE PATH "The subdirectory to the header prefix")
+set(BIN_INSTALL_DIR             "bin"              CACHE STRING "The install dir for executables (default ${EXEC_INSTALL_PREFIX}/bin)")
+set(LIB_INSTALL_DIR             "${CMAKE_INSTALL_LIBDIR}"   CACHE STRING "The subdirectory relative to the install prefix where libraries will be installed")
+set(SHARE_INSTALL_PREFIX        "share"            CACHE STRING "Base directory for files which go to share/") 
 if (PHONON_BUILD_PHONON4QT5)
-    set(INCLUDE_INSTALL_DIR         "include/${PHONON_LIB_SONAME}" ) #           CACHE PATH "The subdirectory to the header prefix")
-endif (PHONON_BUILD_PHONON4QT5)
-set(BIN_INSTALL_DIR             "bin"     ) #         CACHE PATH "The install dir for executables (default ${EXEC_INSTALL_PREFIX}/bin)")
-set(LIB_INSTALL_DIR             "${CMAKE_INSTALL_LIBDIR}" ) #  CACHE PATH "The subdirectory relative to the install prefix where libraries will be installed"
-set(PLUGIN_INSTALL_DIR          "${LIB_INSTALL_DIR}/kde4"                   CACHE PATH "The subdirectory relative to the install prefix where plugins will be installed (default is ${LIB_INSTALL_DIR}/kde4)")
-if (PHONON_BUILD_PHONON4QT5)
-    set(PLUGIN_INSTALL_DIR          "${LIB_INSTALL_DIR}/qt5"                   CACHE PATH "The subdirectory relative to the install prefix where plugins will be installed (default is ${LIB_INSTALL_DIR}/qt5)" FORCE)
-endif(PHONON_BUILD_PHONON4QT5)
-set(BACKEND_INSTALL_DIR "${PLUGIN_INSTALL_DIR}/plugins/${PHONON_LIB_SONAME}_backend")
+    set(INCLUDE_INSTALL_DIR         "include/${PHONON_LIB_SONAME}"       CACHE STRING "The subdirectory to the header prefix")
+    set(PLUGIN_INSTALL_DIR          "${LIB_INSTALL_DIR}/qt5"                   CACHE STRING "The subdirectory relative to the install prefix where plugins will be installed (default is ${LIB_INSTALL_DIR}/qt5)" FORCE)
+else ()
+    set(INCLUDE_INSTALL_DIR         "include"          CACHE STRING "The subdirectory to the header prefix")
+    set(PLUGIN_INSTALL_DIR          "${LIB_INSTALL_DIR}/kde4"                   CACHE STRING "The subdirectory relative to the install prefix where plugins will be installed (default is ${LIB_INSTALL_DIR}/kde4)")
+endif ()
 if(WIN32) # Imported from Phonon VLC
     set(BACKEND_INSTALL_DIR "bin/${PHONON_LIB_SONAME}_backend")
+else ()
+    set(BACKEND_INSTALL_DIR "${PLUGIN_INSTALL_DIR}/plugins/${PHONON_LIB_SONAME}_backend")
 endif()
 set(ICON_INSTALL_DIR            "${SHARE_INSTALL_PREFIX}/icons"             CACHE PATH "The icon install dir (default ${SHARE_INSTALL_PREFIX}/share/icons/)")
 set(SERVICES_INSTALL_DIR        "${SHARE_INSTALL_PREFIX}/kde4/services"     CACHE PATH "The install dir for service (desktop, protocol, ...) files")
