Rename cmake_config.h to build_config.h, and don't make it optional

In preparation for MSVC compilation support
master
Rogier 2016-05-17 08:54:43 +02:00
parent 984a4e3a97
commit 82ba727a2d
5 changed files with 10 additions and 16 deletions

2
.gitignore vendored
View File

@ -6,7 +6,7 @@ CPack*
_CPack_Packages/
Makefile
cmake_install.cmake
cmake_config.h
build_config.h
*.deb
*.rpm
*.tar.gz

View File

@ -520,9 +520,9 @@ include(CPack)
# DO this near the end - to make sure all variables have been computed
# and are final.
set(INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX})
configure_file(
"${PROJECT_SOURCE_DIR}/cmake_config.h.in"
"${PROJECT_BINARY_DIR}/cmake_config.h"
"${PROJECT_SOURCE_DIR}/build_config.h.in"
"${PROJECT_BINARY_DIR}/build_config.h"
)
add_definitions ( -DUSE_CMAKE_CONFIG_H )

View File

@ -1,6 +1,6 @@
#include <iostream>
#include "cmake_config.h"
#include "build_config.h"
#include "CharEncodingConverter.h"
#ifdef _WIN32

View File

@ -1,7 +1,7 @@
// Filled in by the build system
#ifndef CMAKE_CONFIG_H
#define CMAKE_CONFIG_H
#ifndef BUILD_CONFIG_H
#define BUILD_CONFIG_H
#define USE_SQLITE3 @USE_SQLITE3@
#define USE_POSTGRESQL @USE_POSTGRESQL@
@ -14,7 +14,7 @@
#define VERSION_MINOR "@VERSION_MINOR@"
#define PACKAGING_FLAT @PACKAGING_FLAT@
#define INSTALL_PREFIX "@CMAKE_INSTALL_PREFIX@"
#define INSTALL_PREFIX "@INSTALL_PREFIX@"
#endif

View File

@ -7,6 +7,8 @@
* =====================================================================
*/
#include "build_config.h"
#if MSDOS || __OS2__ || __NT__ || _WIN32
#define PATH_SEPARATOR '\\'
#else
@ -21,14 +23,6 @@
// Max number of node name -> color mappings stored in a mapblock
#define MAPBLOCK_MAXCOLORS 65536
#ifdef USE_CMAKE_CONFIG_H
#include "cmake_config.h"
#else
#define USE_SQLITE3 1
#define USE_LEVELDB 0
#define USE_REDIS 0
#endif
// List of possible database names (for usage message)
#if USE_SQLITE3
#define USAGE_NAME_SQLITE "/sqlite3"