diff --git a/CMakeLists.txt b/CMakeLists.txt index 14f00956..efbb3efb 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -81,13 +81,12 @@ if(NOT WIN32 AND NOT BUILD_FRAMEWORK) endif() include_directories(${CMAKE_CURRENT_BINARY_DIR}) -configure_file(config-taglib.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config.h) if(WITH_ASF) - set(TAGLIB_WITH_ASF TRUE) + set(TAGLIB_WITH_ASF TRUE) endif() if(WITH_MP4) - set(TAGLIB_WITH_MP4 TRUE) + set(TAGLIB_WITH_MP4 TRUE) endif() configure_file(taglib/taglib_config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/taglib_config.h) diff --git a/bindings/c/tag_c.cpp b/bindings/c/tag_c.cpp index b1af613c..5b739d6f 100644 --- a/bindings/c/tag_c.cpp +++ b/bindings/c/tag_c.cpp @@ -19,10 +19,7 @@ * USA * ***************************************************************************/ -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - +#include "taglib_config.h" #include #include #include diff --git a/config-taglib.h.cmake b/config-taglib.h.cmake deleted file mode 100644 index aee25a79..00000000 --- a/config-taglib.h.cmake +++ /dev/null @@ -1,43 +0,0 @@ -/* config-taglib.h. Generated by cmake from config-taglib.h.cmake */ - -/* Indicates the endianness of your target system */ -#cmakedefine TAGLIB_LITTLE_ENDIAN 1 -#cmakedefine TAGLIB_BIG_ENDIAN 1 - -/* Size of integral types */ -#cmakedefine SIZEOF_SHORT ${SIZEOF_SHORT} -#cmakedefine SIZEOF_INT ${SIZEOF_INT} -#cmakedefine SIZEOF_LONGLONG ${SIZEOF_LONGLONG} -#cmakedefine SIZEOF_WCHAR_T ${SIZEOF_WCHAR_T} - -/* Defined if your compiler supports std::wstring */ -#cmakedefine HAVE_STD_WSTRING 1 - -/* Defined if your compiler supports some atomic operations */ -#cmakedefine HAVE_STD_ATOMIC 1 -#cmakedefine HAVE_BOOST_ATOMIC 1 -#cmakedefine HAVE_GCC_ATOMIC 1 -#cmakedefine HAVE_MAC_ATOMIC 1 -#cmakedefine HAVE_WIN_ATOMIC 1 -#cmakedefine HAVE_IA64_ATOMIC 1 - -/* Defined if your compiler supports some byte swap functions */ -#cmakedefine HAVE_GCC_BYTESWAP_16 1 -#cmakedefine HAVE_GCC_BYTESWAP_32 1 -#cmakedefine HAVE_GCC_BYTESWAP_64 1 -#cmakedefine HAVE_GLIBC_BYTESWAP 1 -#cmakedefine HAVE_MSC_BYTESWAP 1 -#cmakedefine HAVE_MAC_BYTESWAP 1 -#cmakedefine HAVE_OPENBSD_BYTESWAP 1 - -/* Defined if your compiler supports codecvt */ -#cmakedefine HAVE_STD_CODECVT 1 - -/* Defined if you have libz */ -#cmakedefine HAVE_ZLIB 1 - -#cmakedefine NO_ITUNES_HACKS 1 -#cmakedefine WITH_ASF 1 -#cmakedefine WITH_MP4 1 - -#cmakedefine TESTS_DIR "@TESTS_DIR@" diff --git a/taglib/asf/asfproperties.cpp b/taglib/asf/asfproperties.cpp index 11d43b9d..638baf6e 100644 --- a/taglib/asf/asfproperties.cpp +++ b/taglib/asf/asfproperties.cpp @@ -23,8 +23,7 @@ * http://www.mozilla.org/MPL/ * ***************************************************************************/ -#include "config.h" - +#include "taglib_config.h" #include #include #include "asfproperties.h" diff --git a/taglib/asf/asftag.cpp b/taglib/asf/asftag.cpp index 70881209..0767817f 100644 --- a/taglib/asf/asftag.cpp +++ b/taglib/asf/asftag.cpp @@ -23,8 +23,7 @@ * http://www.mozilla.org/MPL/ * ***************************************************************************/ -#include "config.h" - +#include "taglib_config.h" #include #include "asftag.h" diff --git a/taglib/fileref.cpp b/taglib/fileref.cpp index 6da560b7..508fc0c5 100644 --- a/taglib/fileref.cpp +++ b/taglib/fileref.cpp @@ -27,7 +27,7 @@ * http://www.mozilla.org/MPL/ * ***************************************************************************/ -#include +#include "taglib_config.h" #ifdef _WIN32 # include diff --git a/taglib/mp4/mp4properties.cpp b/taglib/mp4/mp4properties.cpp index f5d7ed21..d704b452 100644 --- a/taglib/mp4/mp4properties.cpp +++ b/taglib/mp4/mp4properties.cpp @@ -23,8 +23,7 @@ * http://www.mozilla.org/MPL/ * ***************************************************************************/ -#include "config.h" - +#include "taglib_config.h" #include #include #include "mp4file.h" diff --git a/taglib/mp4/mp4tag.cpp b/taglib/mp4/mp4tag.cpp index e16a994b..1edeace7 100644 --- a/taglib/mp4/mp4tag.cpp +++ b/taglib/mp4/mp4tag.cpp @@ -23,8 +23,7 @@ * http://www.mozilla.org/MPL/ * ***************************************************************************/ -#include "config.h" - +#include "taglib_config.h" #include #include #include diff --git a/taglib/mpeg/id3v2/id3v2frame.cpp b/taglib/mpeg/id3v2/id3v2frame.cpp index a444b9eb..6333f9d9 100644 --- a/taglib/mpeg/id3v2/id3v2frame.cpp +++ b/taglib/mpeg/id3v2/id3v2frame.cpp @@ -23,7 +23,7 @@ * http://www.mozilla.org/MPL/ * ***************************************************************************/ -#include "config.h" +#include "taglib_config.h" #if HAVE_ZLIB #include diff --git a/taglib/mpeg/id3v2/id3v2framefactory.cpp b/taglib/mpeg/id3v2/id3v2framefactory.cpp index 54b37ce8..5c223e1a 100644 --- a/taglib/mpeg/id3v2/id3v2framefactory.cpp +++ b/taglib/mpeg/id3v2/id3v2framefactory.cpp @@ -23,8 +23,7 @@ * http://www.mozilla.org/MPL/ * ***************************************************************************/ -#include "config.h" - +#include "taglib_config.h" #include #include "id3v2framefactory.h" diff --git a/taglib/taglib_config.h.cmake b/taglib/taglib_config.h.cmake index 0f499e2c..c97e6b6b 100644 --- a/taglib/taglib_config.h.cmake +++ b/taglib/taglib_config.h.cmake @@ -1,4 +1,42 @@ /* taglib_config.h. Generated by cmake from taglib_config.h.cmake */ +/* Indicates the endianness of your target system */ +#cmakedefine TAGLIB_LITTLE_ENDIAN 1 +#cmakedefine TAGLIB_BIG_ENDIAN 1 + +/* Size of integral types */ +#cmakedefine SIZEOF_SHORT ${SIZEOF_SHORT} +#cmakedefine SIZEOF_INT ${SIZEOF_INT} +#cmakedefine SIZEOF_LONGLONG ${SIZEOF_LONGLONG} +#cmakedefine SIZEOF_WCHAR_T ${SIZEOF_WCHAR_T} + +/* Defined if your compiler supports std::wstring */ +#cmakedefine HAVE_STD_WSTRING 1 + +/* Defined if your compiler supports some atomic operations */ +#cmakedefine HAVE_STD_ATOMIC 1 +#cmakedefine HAVE_BOOST_ATOMIC 1 +#cmakedefine HAVE_GCC_ATOMIC 1 +#cmakedefine HAVE_MAC_ATOMIC 1 +#cmakedefine HAVE_WIN_ATOMIC 1 +#cmakedefine HAVE_IA64_ATOMIC 1 + +/* Defined if your compiler supports some byte swap functions */ +#cmakedefine HAVE_GCC_BYTESWAP_16 1 +#cmakedefine HAVE_GCC_BYTESWAP_32 1 +#cmakedefine HAVE_GCC_BYTESWAP_64 1 +#cmakedefine HAVE_GLIBC_BYTESWAP 1 +#cmakedefine HAVE_MSC_BYTESWAP 1 +#cmakedefine HAVE_MAC_BYTESWAP 1 +#cmakedefine HAVE_OPENBSD_BYTESWAP 1 + +/* Defined if your compiler supports codecvt */ +#cmakedefine HAVE_STD_CODECVT 1 + +/* Defined if you have libz */ +#cmakedefine HAVE_ZLIB 1 + #define TAGLIB_WITH_ASF 1 #define TAGLIB_WITH_MP4 1 + +#cmakedefine TESTS_DIR "@TESTS_DIR@" diff --git a/taglib/taglib_export.h b/taglib/taglib_export.h index 3e868551..737ae644 100644 --- a/taglib/taglib_export.h +++ b/taglib/taglib_export.h @@ -40,8 +40,4 @@ #define TAGLIB_EXPORT #endif -#ifndef TAGLIB_NO_CONFIG -#include "taglib_config.h" -#endif - #endif diff --git a/taglib/toolkit/taglib.h b/taglib/toolkit/taglib.h index bc94aa88..da725f97 100755 --- a/taglib/toolkit/taglib.h +++ b/taglib/toolkit/taglib.h @@ -26,27 +26,12 @@ #ifndef TAGLIB_H #define TAGLIB_H -#include "config.h" +#include "taglib_config.h" #define TAGLIB_MAJOR_VERSION 1 #define TAGLIB_MINOR_VERSION 8 #define TAGLIB_PATCH_VERSION 0 -#if defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ > 1)) -#define TAGLIB_IGNORE_MISSING_DESTRUCTOR _Pragma("GCC diagnostic ignored \"-Wnon-virtual-dtor\"") -#else -#define TAGLIB_IGNORE_MISSING_DESTRUCTOR -#endif - -#if (defined(_MSC_VER) && _MSC_VER >= 1600) -#define TAGLIB_CONSTRUCT_BITSET(x) static_cast(x) -#else -#define TAGLIB_CONSTRUCT_BITSET(x) static_cast(x) -#endif - -#include -#include - // Check the widths of integral types. #if SIZEOF_SHORT != 2 @@ -65,6 +50,20 @@ # error TagLib requires that wchar_t is sufficient to store a UTF-16 char. #endif +#include + +#if defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ > 1)) +#define TAGLIB_IGNORE_MISSING_DESTRUCTOR _Pragma("GCC diagnostic ignored \"-Wnon-virtual-dtor\"") +#else +#define TAGLIB_IGNORE_MISSING_DESTRUCTOR +#endif + +#if (defined(_MSC_VER) && _MSC_VER >= 1600) +#define TAGLIB_CONSTRUCT_BITSET(x) static_cast(x) +#else +#define TAGLIB_CONSTRUCT_BITSET(x) static_cast(x) +#endif + // Atomic increment/decrement operations #if defined(HAVE_STD_ATOMIC) diff --git a/tests/test_fileref.cpp b/tests/test_fileref.cpp index 5500ae7f..06663c97 100644 --- a/tests/test_fileref.cpp +++ b/tests/test_fileref.cpp @@ -6,9 +6,6 @@ #include #include #include "utils.h" -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif using namespace std; using namespace TagLib; diff --git a/tests/utils.h b/tests/utils.h index b69bfa50..5de051e7 100644 --- a/tests/utils.h +++ b/tests/utils.h @@ -1,6 +1,5 @@ -#ifdef HAVE_CONFIG_H -#include -#endif +#include "taglib_config.h" + #ifdef _WIN32 #include #else