diff --git a/CMakeLists.txt b/CMakeLists.txt
index 600dc6efe..27f64fee9 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -192,6 +192,10 @@ add_definitions(${QT_DEFINITIONS})
link_directories(${TAGLIB_LIBRARY_DIRS})
link_directories(${GSTREAMER_LIBRARY_DIRS})
+# Top level headers and generated headers
+include_directories(${PROJECT_SOURCE_DIR}/include)
+include_directories(${PROJECT_BINARY_DIR}/include)
+
include_directories(${Boost_INCLUDE_DIRS})
include_directories(${TAGLIB_INCLUDE_DIRS})
include_directories(${GSTREAMER_INCLUDE_DIRS})
@@ -475,6 +479,10 @@ if(HAVE_MOODBAR)
add_subdirectory(gst/moodbar)
endif()
+# Global configuration
+configure_file(${CMAKE_CURRENT_SOURCE_DIR}/include/clementine-config.h.in
+ ${CMAKE_CURRENT_BINARY_DIR}/include/clementine-config.h)
+
# Uninstall support
configure_file(
"${CMAKE_CURRENT_SOURCE_DIR}/cmake_uninstall.cmake.in"
diff --git a/src/config.h.in b/include/clementine-config.h.in
similarity index 95%
rename from src/config.h.in
rename to include/clementine-config.h.in
index 20427754b..eb6dbfced 100644
--- a/src/config.h.in
+++ b/include/clementine-config.h.in
@@ -14,8 +14,8 @@
along with Clementine. If not, see .
*/
-#ifndef CONFIG_H_IN
-#define CONFIG_H_IN
+#ifndef CLEMENTINE_CONFIG_H
+#define CLEMENTINE_CONFIG_H
#define CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}"
#define CMAKE_EXECUTABLE_SUFFIX "${CMAKE_EXECUTABLE_SUFFIX}"
@@ -56,4 +56,4 @@
#define USE_BUNDLE_DIR "${USE_BUNDLE_DIR}"
-#endif // CONFIG_H_IN
+#endif // CLEMENTINE_CONFIG_H
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 5afb5b992..2d5092d5a 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -1243,9 +1243,6 @@ optional_source(LINUX
HEADERS core/ubuntuunityhack.h
)
-configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config.h.in
- ${CMAKE_CURRENT_BINARY_DIR}/config.h)
-
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/version.h.in
${CMAKE_CURRENT_BINARY_DIR}/version.h)
diff --git a/src/config.h b/src/config.h
new file mode 100644
index 000000000..d07a2ad08
--- /dev/null
+++ b/src/config.h
@@ -0,0 +1,24 @@
+/* This file is part of Clementine.
+
+ Clementine is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Clementine is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Clementine. If not, see .
+*/
+
+#ifndef DEPRECATED_CONFIG_H
+#define DEPRECATED_CONFIG_H
+
+// Deprecated. Please include clementine-config.h directly.
+
+#include "clementine-config.h"
+
+#endif // DEPRECATED_CONFIG_H