build: Move main config from /src to /include

Move /src/config.h to /include/clementine-config.h. The new name
prevents conflict with 3rdparty/taglib/config.h. A stub src/config.h will
remain for a transition period.  This is a first step in eliminating the
dependency of /ext components on /src.
This commit is contained in:
Jim Broadus 2021-03-15 22:34:49 -07:00 committed by John Maguire
parent 610d87fa33
commit 08ded2384f
4 changed files with 35 additions and 6 deletions

View File

@ -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"

View File

@ -14,8 +14,8 @@
along with Clementine. If not, see <http://www.gnu.org/licenses/>.
*/
#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

View File

@ -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)

24
src/config.h Normal file
View File

@ -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 <http://www.gnu.org/licenses/>.
*/
#ifndef DEPRECATED_CONFIG_H
#define DEPRECATED_CONFIG_H
// Deprecated. Please include clementine-config.h directly.
#include "clementine-config.h"
#endif // DEPRECATED_CONFIG_H