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)
+endif(WITH_ASF)
+if(WITH_MP4)
+ set(TAGLIB_WITH_MP4 TRUE)
+endif(WITH_MP4)
+configure_file(taglib/taglib_config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/taglib_config.h )
+install( FILES ${CMAKE_CURRENT_BINARY_DIR}/taglib_config.h DESTINATION ${INCLUDE_INSTALL_DIR}/taglib)
+
ADD_SUBDIRECTORY( taglib )
ADD_SUBDIRECTORY(tests)
return reinterpret_cast<TagLib_File *>(new Ogg::Speex::File(filename));
case TagLib_File_TrueAudio:
return reinterpret_cast<TagLib_File *>(new TrueAudio::File(filename));
-#ifdef WITH_MP4
+#ifdef TAGLIB_WITH_MP4
case TagLib_File_MP4:
return reinterpret_cast<TagLib_File *>(new MP4::File(filename));
#endif
-#ifdef WITH_ASF
+#ifdef TAGLIB_WITH_ASF
case TagLib_File_ASF:
return reinterpret_cast<TagLib_File *>(new ASF::File(filename));
#endif
dnl without this order in this file, automake will be confused!
dnl
AM_CONFIG_HEADER(config.h)
+AM_CONFIG_HEADER(taglib/taglib_config.h)
dnl checks for programs.
dnl first check for c/c++ compilers
AC_ARG_ENABLE([mp4],
[AS_HELP_STRING([--enable-mp4], [add MP4 support])],
[
- AC_DEFINE([WITH_MP4], [1],
- [With MP4 support])
+ AC_DEFINE([WITH_MP4], [1], [With MP4 support]),
+ AC_DEFINE([TAGLIB_WITH_MP4], [1], [With MP4 support])
])
AC_ARG_ENABLE([asf],
[AS_HELP_STRING([--enable-asf], [add ASF support])],
[
- AC_DEFINE([WITH_ASF], [1],
- [With ASF support])
+ AC_DEFINE([WITH_ASF], [1], [With ASF support]),
+ AC_DEFINE([TAGLIB_WITH_ASF], [1], [With ASF support])
])
AC_LANG_SAVE
lib_LTLIBRARIES = libtag.la
libtag_la_SOURCES = tag.cpp tagunion.cpp fileref.cpp audioproperties.cpp
-taglib_include_HEADERS = tag.h fileref.h audioproperties.h taglib_export.h
+taglib_include_HEADERS = tag.h fileref.h audioproperties.h taglib_export.h taglib_config.h
taglib_includedir = $(includedir)/taglib
# Here are a set of rules to help you update your library version information:
#include <config.h>
#endif
-#ifdef WITH_ASF
+#ifdef TAGLIB_WITH_ASF
#include <taglib.h>
#include "asfattribute.h"
#include <config.h>
#endif
-#ifdef WITH_ASF
+#ifdef TAGLIB_WITH_ASF
#include <tdebug.h>
#include <tbytevectorlist.h>
#include <config.h>
#endif
-#ifdef WITH_ASF
+#ifdef TAGLIB_WITH_ASF
#include <tdebug.h>
#include <tstring.h>
#include <config.h>
#endif
-#ifdef WITH_ASF
+#ifdef TAGLIB_WITH_ASF
#include "asftag.h"
l.append("wv");
l.append("spx");
l.append("tta");
-#ifdef WITH_MP4
+#ifdef TAGLIB_WITH_MP4
l.append("m4a");
l.append("m4b");
l.append("m4p");
l.append("3g2");
l.append("mp4");
#endif
-#ifdef WITH_ASF
+#ifdef TAGLIB_WITH_ASF
l.append("wma");
l.append("asf");
#endif
return new Ogg::Speex::File(fileName, readAudioProperties, audioPropertiesStyle);
if(ext == "TTA")
return new TrueAudio::File(fileName, readAudioProperties, audioPropertiesStyle);
-#ifdef WITH_MP4
+#ifdef TAGLIB_WITH_MP4
if(ext == "M4A" || ext == "M4B" || ext == "M4P" || ext == "MP4" || ext == "3G2")
return new MP4::File(fileName, readAudioProperties, audioPropertiesStyle);
#endif
-#ifdef WITH_ASF
+#ifdef TAGLIB_WITH_ASF
if(ext == "WMA" || ext == "ASF")
return new ASF::File(fileName, readAudioProperties, audioPropertiesStyle);
#endif
#include <config.h>
#endif
-#ifdef WITH_MP4
+#ifdef TAGLIB_WITH_MP4
#include <tdebug.h>
#include <tstring.h>
#include <config.h>
#endif
-#ifdef WITH_MP4
+#ifdef TAGLIB_WITH_MP4
#include <tdebug.h>
#include <tstring.h>
#include <config.h>
#endif
-#ifdef WITH_MP4
+#ifdef TAGLIB_WITH_MP4
#include <taglib.h>
#include <tdebug.h>
#include <config.h>
#endif
-#ifdef WITH_MP4
+#ifdef TAGLIB_WITH_MP4
#include <tdebug.h>
#include <tstring.h>
#include <config.h>
#endif
-#ifdef WITH_MP4
+#ifdef TAGLIB_WITH_MP4
#include <tdebug.h>
#include <tstring.h>
--- /dev/null
+/* taglib_config.h. Generated by cmake from taglib_config.h.cmake */
+
+#cmakedefine TAGLIB_WITH_ASF 1
+#cmakedefine TAGLIB_WITH_MP4 1
--- /dev/null
+/* With ASF support */
+#undef TAGLIB_WITH_ASF
+
+/* With MP4 support */
+#undef TAGLIB_WITH_MP4
#define TAGLIB_EXPORT
#endif
+#include "taglib_config.h"
+
#endif
class TestFileRef : public CppUnit::TestFixture
{
CPPUNIT_TEST_SUITE(TestFileRef);
-#ifdef WITH_ASF
+#ifdef TAGLIB_WITH_ASF
CPPUNIT_TEST(testASF);
#endif
CPPUNIT_TEST(testMusepack);
CPPUNIT_TEST(testSpeex);
CPPUNIT_TEST(testFLAC);
CPPUNIT_TEST(testMP3);
-#ifdef WITH_MP4
+#ifdef TAGLIB_WITH_MP4
CPPUNIT_TEST(testMP4_1);
CPPUNIT_TEST(testMP4_2);
CPPUNIT_TEST(testMP4_3);
fileRefSave("click", ".mpc");
}
-#ifdef WITH_ASF
+#ifdef TAGLIB_WITH_ASF
void testASF()
{
fileRefSave("silence-1", ".wma");
fileRefSave("empty", ".tta");
}
-#ifdef WITH_MP4
+#ifdef TAGLIB_WITH_MP4
void testMP4_1()
{
fileRefSave("has-tags", ".m4a");