--- CMakeLists.txt.orig	2015-12-12 08:02:09 UTC
+++ CMakeLists.txt
@@ -206,16 +206,21 @@ if (NOT DEFINED SYSCONFDIR)
     set(SYSCONFDIR "${CMAKE_INSTALL_PREFIX}/etc" CACHE PATH "sys config directory [default=PREFIX/etc/]")
 endif()
 
-set(includedir "${CMAKE_INSTALL_PREFIX}/include")
-set(libdir ${LIB_INSTALL_DIR})
-set(pkgconfdir ${LIBDATA_INSTALL_DIR}/pkgconfig)
-set(mandir ${MAN_INSTALL_DIR})
+set(includedir "${PREFIX}/include")
+set(libdir ${PREFIX}/lib)
+set(pkgconfdir ${PREFIX}/libdata/pkgconfig)
+set(mandir ${MANPREFIX}/man)
 set(addondir ${libdir}/${package} )
-set(pkgdatadir ${prefix}/share/${package})
+set(addondestdir "\${PREFIX}/lib/${package}" )
+set(pkgdatadir ${DATADIR})
+set(pkgdatadestdir "\${DATADIR}")
 set(configdescdir ${pkgdatadir}/configdesc)
+set(configdescdestdir ${pkgdatadestdir}/configdesc)
 set(addonconfigdir ${pkgdatadir}/addon)
+set(addonconfigdestdir ${pkgdatadestdir}/addon)
 set(imconfigdir ${pkgdatadir}/inputmethod)
-set(localedir ${CMAKE_INSTALL_PREFIX}/share/locale)
+set(imconfigdestdir ${pkgdatadestdir}/inputmethod)
+set(localedir ${PREFIX}/share/locale)
 
 list(FIND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES "${LIB_INSTALL_DIR}" _isSystemPlatformLibDir)
 list(FIND CMAKE_CXX_IMPLICIT_LINK_DIRECTORIES "${LIB_INSTALL_DIR}" _isSystemCxxLibDir)
@@ -228,9 +233,13 @@ endif("${_isSystemPlatformLibDir}" STREQ
 
 # For FcitxMacro
 set(FCITX4_ADDON_INSTALL_DIR ${addondir})
+set(FCITX4_ADDON_INSTALL_DESTDIR ${addondestdir})
 set(FCITX4_CONFIGDESC_INSTALL_DIR ${configdescdir})
+set(FCITX4_CONFIGDESC_INSTALL_DESTDIR ${configdescdir})
 set(FCITX4_ADDON_CONFIG_INSTALL_DIR ${addonconfigdir})
+set(FCITX4_ADDON_CONFIG_INSTALL_DESTDIR ${addonconfigdir})
 set(FCITX4_INPUTMETHOD_CONFIG_INSTALL_DIR ${imconfigdir})
+set(FCITX4_INPUTMETHOD_CONFIG_INSTALL_DESTDIR ${imconfigdir})
 set(FCITX4_PACKAGE_NAME ${package})
 
 function(_RESOLVE_LIBRARY_PATH _FILE_NAME _LIBRARY_PATH)
