diff --git a/CMakeLists.txt b/CMakeLists.txt
index 7440ba633717fe795a8bde8e791ad907149659ee..470df4585e24ece334ed8e4b745cbd78be20f803 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -79,10 +79,14 @@ endif()
 
 
 if(ENABLE_RELATIVE_PREFIX)
-	set(LINPHONE_PLUGINS_DIR "./lib/liblinphone/plugins")
+	set(LINPHONE_DATA_DIR ".")
 else()
-	set(LINPHONE_PLUGINS_DIR "${CMAKE_INSTALL_PREFIX}/lib/liblinphone/plugins")
+	set(LINPHONE_DATA_DIR "${CMAKE_INSTALL_PREFIX}")
 endif()
+set(LINPHONE_PLUGINS_DIR "${LINPHONE_DATA_DIR}/lib/liblinphone/plugins")
+set(PACKAGE_LOCALE_DIR "${LINPHONE_DATA_DIR}/share/locale")
+set(PACKAGE_DATA_DIR "${LINPHONE_DATA_DIR}/share")
+set(PACKAGE_SOUND_DIR "${LINPHONE_DATA_DIR}/share/sounds/linphone")
 configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config.h)
 set_source_files_properties(${CMAKE_CURRENT_BINARY_DIR}/config.h PROPERTIES GENERATED ON)
 add_definitions(-DHAVE_CONFIG_H)
diff --git a/config.h.cmake b/config.h.cmake
index 6f8db1a8682c870999044e11eca83f4183729996..aa49b3b9898de3489ea38eeeaceea533639869d7 100644
--- a/config.h.cmake
+++ b/config.h.cmake
@@ -25,4 +25,7 @@
 #define LINPHONE_MICRO_VERSION ${LINPHONE_MICRO_VERSION}
 #define LINPHONE_VERSION "${LINPHONE_VERSION}"
 
-#cmakedefine LINPHONE_PLUGINS_DIR "${LINPHONE_PLUGINS_DIR}"
+#define LINPHONE_PLUGINS_DIR "${LINPHONE_PLUGINS_DIR}"
+#define PACKAGE_LOCALE_DIR "${PACKAGE_LOCALE_DIR}"
+#define PACKAGE_DATA_DIR "${PACKAGE_DATA_DIR}"
+#define PACKAGE_SOUND_DIR "${PACKAGE_SOUND_DIR}"