From e3cf99c87a6109186daabba3640d67a08f4fab02 Mon Sep 17 00:00:00 2001 From: Laurent Montel Date: Wed, 20 Sep 2006 12:52:28 +0000 Subject: [PATCH] Add cmake support All compile need to test now git-svn-id: svn://anonsvn.kde.org/home/kde/trunk/kdesupport/taglib@586714 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- CMakeLists.txt | 128 +++++++++++++++++++++++++++++++ ConfigureChecks.cmake | 20 +++++ ape/CMakeLists.txt | 1 + bindings/CMakeLists.txt | 11 +++ bindings/c/CMakeLists.txt | 53 +++++++++++++ bindings/c/taglib_c.pc.cmake | 12 +++ config-taglib.h.cmake | 7 ++ examples/CMakeLists.txt | 99 ++++++++++++++++++++++++ flac/CMakeLists.txt | 1 + mpc/CMakeLists.txt | 1 + mpeg/CMakeLists.txt | 4 + mpeg/id3v1/CMakeLists.txt | 1 + mpeg/id3v2/CMakeLists.txt | 4 + mpeg/id3v2/frames/CMakeLists.txt | 35 +++++++++ mpeg/id3v2/id3v2frame.cpp | 2 +- mpeg/id3v2/id3v2framefactory.cpp | 2 +- ogg/CMakeLists.txt | 5 ++ ogg/flac/CMakeLists.txt | 2 + ogg/vorbis/CMakeLists.txt | 1 + taglib-config.cmake | 55 +++++++++++++ taglib.pc.cmake | 11 +++ tests/CMakeLists.txt | 32 ++++++++ toolkit/CMakeLists.txt | 1 + 23 files changed, 486 insertions(+), 2 deletions(-) create mode 100644 CMakeLists.txt create mode 100644 ConfigureChecks.cmake create mode 100644 ape/CMakeLists.txt create mode 100644 bindings/CMakeLists.txt create mode 100644 bindings/c/CMakeLists.txt create mode 100644 bindings/c/taglib_c.pc.cmake create mode 100644 config-taglib.h.cmake create mode 100644 examples/CMakeLists.txt create mode 100644 flac/CMakeLists.txt create mode 100644 mpc/CMakeLists.txt create mode 100644 mpeg/CMakeLists.txt create mode 100644 mpeg/id3v1/CMakeLists.txt create mode 100644 mpeg/id3v2/CMakeLists.txt create mode 100644 mpeg/id3v2/frames/CMakeLists.txt create mode 100644 ogg/CMakeLists.txt create mode 100644 ogg/flac/CMakeLists.txt create mode 100644 ogg/vorbis/CMakeLists.txt create mode 100644 taglib-config.cmake create mode 100644 taglib.pc.cmake create mode 100644 tests/CMakeLists.txt create mode 100644 toolkit/CMakeLists.txt diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 00000000..8cfc3438 --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,128 @@ +project(taglib) + +find_package(ZLIB) + +#add some KDE specific stuff +set(LIB_SUFFIX "" CACHE STRING "Define suffix of directory name (32/64)" ) +set(EXEC_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX} CACHE PATH "Base directory for executables and libraries" FORCE) +# +## the following are directories where stuff will be installed to +set(BIN_INSTALL_DIR "${EXEC_INSTALL_PREFIX}/bin" CACHE PATH "The kde info install dir (default prefix/info)" FORCE) +set(LIB_INSTALL_DIR "${EXEC_INSTALL_PREFIX}/lib${LIB_SUFFIX}" CACHE PATH "The subdirectory relative to the install prefix where libraries will be installed (default is /lib${LIB_SUFFIX})" FORCE) +set(INCLUDE_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/include" CACHE PATH "The subdirectory to the header prefix" FORCE) + +include(ConfigureChecks.cmake) + +INCLUDE_DIRECTORIES( ${CMAKE_SOURCE_DIR}/toolkit ${CMAKE_SOURCE_DIR}//mpeg ${CMAKE_SOURCE_DIR}/ogg ${CMAKE_SOURCE_DIR}/flac ${CMAKE_SOURCE_DIR}/mpc ${CMAKE_SOURCE_DIR}/ogg/vorbis ${CMAKE_SOURCE_DIR}/mpeg/id3v2/ ${CMAKE_SOURCE_DIR}/mpeg/id3v1 ${CMAKE_SOURCE_DIR}/ ${CMAKE_SOURCE_DIR}/ape ${CMAKE_CURRENT_BINARY_DIR}) +configure_file(${CMAKE_CURRENT_SOURCE_DIR}/taglib-config.cmake ${CMAKE_CURRENT_BINARY_DIR}/taglib-config @ONLY) +configure_file(${CMAKE_CURRENT_SOURCE_DIR}/taglib.pc.cmake ${CMAKE_CURRENT_BINARY_DIR}/taglib.pc @ONLY) +configure_file(config-taglib.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-taglib.h ) + +ADD_SUBDIRECTORY( toolkit ) +ADD_SUBDIRECTORY( mpeg ) +ADD_SUBDIRECTORY( ogg ) +ADD_SUBDIRECTORY( flac ) +ADD_SUBDIRECTORY( ape ) +ADD_SUBDIRECTORY( mpc ) + + + +########### next target ############### + +SET(mpeg_SRCS +mpeg/mpegfile.cpp +mpeg/mpegproperties.cpp +mpeg/mpegheader.cpp +mpeg/xingheader.cpp +) + +SET(id3v1_SRCS +mpeg/id3v1/id3v1tag.cpp +mpeg/id3v1/id3v1genres.cpp +) + + +SET(id3v2_SRCS +mpeg/id3v2/id3v2framefactory.cpp +mpeg/id3v2/id3v2synchdata.cpp +mpeg/id3v2/id3v2tag.cpp +mpeg/id3v2/id3v2header.cpp +mpeg/id3v2/id3v2frame.cpp +mpeg/id3v2/id3v2footer.cpp +mpeg/id3v2/id3v2extendedheader.cpp +) + + +SET(frames_SRCS +mpeg/id3v2/frames/attachedpictureframe.cpp +mpeg/id3v2/frames/commentsframe.cpp +mpeg/id3v2/frames/generalencapsulatedobjectframe.cpp +mpeg/id3v2/frames/relativevolumeframe.cpp +mpeg/id3v2/frames/textidentificationframe.cpp +mpeg/id3v2/frames/uniquefileidentifierframe.cpp +mpeg/id3v2/frames/unknownframe.cpp +) + +SET(ogg_SRCS +ogg/oggfile.cpp +ogg/oggpage.cpp +ogg/oggpageheader.cpp +ogg/xiphcomment.cpp +) + +SET(vorbis_SRCS +ogg/vorbis/vorbisfile.cpp +ogg/vorbis/vorbisproperties.cpp +) + +SET(oggflac_SRCS +ogg/flac/oggflacfile.cpp +) + +SET(mpc_SRCS +mpc/mpcfile.cpp +mpc/mpcproperties.cpp +) + +SET(ape_SRCS +ape/apetag.cpp +ape/apefooter.cpp +ape/apeitem.cpp +) + +SET(toolkit_SRCS +toolkit/tstring.cpp +toolkit/tstringlist.cpp +toolkit/tbytevector.cpp +toolkit/tbytevectorlist.cpp +toolkit/tfile.cpp +toolkit/tdebug.cpp +toolkit/unicode.cpp +) + +SET(tag_LIB_SRCS ${mpeg_SRCS} ${id3v1_SRCS} ${id3v2_SRCS} ${frames_SRCS} ${ogg_SRCS} + ${vorbis_SRCS} ${oggflacs_SRCS} ${mpc_SRCS} ${ape_SRCS} ${toolkit_SRCS} + tag.cpp + fileref.cpp + audioproperties.cpp +) + + +ADD_LIBRARY(tag SHARED ${tag_LIB_SRCS}) + +TARGET_LINK_LIBRARIES(tag ) +if(ZLIB_FOUND) + TARGET_LINK_LIBRARIES(tag z) +endif(ZLIB_FOUND) + +SET_TARGET_PROPERTIES(tag PROPERTIES VERSION 1.4.0 SOVERSION 1 ) +INSTALL(TARGETS tag DESTINATION ${LIB_INSTALL_DIR} ) + + +########### install files ############### + +INSTALL( FILES taglib.pc DESTINATION ${LIB_INSTALL_DIR}/pkgconfig ) +INSTALL( FILES taglib-config DESTINATION ${BIN_INSTALL_DIR}) +INSTALL( FILES tag.h fileref.h audioproperties.h DESTINATION ${INCLUDE_INSTALL_DIR}/taglib) + + diff --git a/ConfigureChecks.cmake b/ConfigureChecks.cmake new file mode 100644 index 00000000..5a8d9f1d --- /dev/null +++ b/ConfigureChecks.cmake @@ -0,0 +1,20 @@ +# NOTE: only add something here if it is really needed by all of kdelibs. +# Otherwise please prefer adding to the relevant config-foo.h.cmake file, +# and the CMakeLists.txt that generates it (or a separate ConfigureChecks.make file if you prefer) +# to minimize recompilations and increase modularity. + +include(CheckIncludeFile) +include(CheckIncludeFiles) +include(CheckSymbolExists) +include(CheckFunctionExists) +include(CheckLibraryExists) +include(CheckTypeSize) +include(CheckCXXSourceCompiles) + +#check for libz using the cmake supplied FindZLIB.cmake + +IF(ZLIB_FOUND) + SET(HAVE_LIBZ 1) +ELSE(ZLIB_FOUND) + SET(HAVE_LIBZ 0) +ENDIF(ZLIB_FOUND) diff --git a/ape/CMakeLists.txt b/ape/CMakeLists.txt new file mode 100644 index 00000000..ce7d1c35 --- /dev/null +++ b/ape/CMakeLists.txt @@ -0,0 +1 @@ +INSTALL( FILES apetag.h apefooter.h apeitem.h DESTINATION ${INCLUDE_INSTALL_DIR}/taglib) diff --git a/bindings/CMakeLists.txt b/bindings/CMakeLists.txt new file mode 100644 index 00000000..31d907af --- /dev/null +++ b/bindings/CMakeLists.txt @@ -0,0 +1,11 @@ +ADD_SUBDIRECTORY( c ) + + +########### install files ############### + + + + +#original Makefile.am contents follow: + +#SUBDIRS = c diff --git a/bindings/c/CMakeLists.txt b/bindings/c/CMakeLists.txt new file mode 100644 index 00000000..e93948df --- /dev/null +++ b/bindings/c/CMakeLists.txt @@ -0,0 +1,53 @@ +INCLUDE_DIRECTORIES( ${CMAKE_SOURCE_DIR}/taglib ${CMAKE_SOURCE_DIR}/taglib/toolkit ${CMAKE_SOURCE_DIR}/taglib/mpeg ${CMAKE_SOURCE_DIR}/taglib/ogg ${CMAKE_SOURCE_DIR}/taglib/ogg/vorbis ${CMAKE_SOURCE_DIR}/taglib/ogg/flac ${CMAKE_SOURCE_DIR}/taglib/flac ${CMAKE_SOURCE_DIR}/taglib/mpc ${CMAKE_SOURCE_DIR}/taglib/mpeg/id3v2 ) + + +configure_file(${CMAKE_CURRENT_SOURCE_DIR}/taglib_c.pc.cmake ${CMAKE_CURRENT_BINARY_DIR}/taglib_c.pc @ONLY) +########### next target ############### + +SET(tag_c_LIB_SRCS +tag_c.cpp +) + + +ADD_LIBRARY(tag_c SHARED ${tag_c_LIB_SRCS}) + +TARGET_LINK_LIBRARIES(tag_c tag ) + +SET_TARGET_PROPERTIES(tag_c PROPERTIES VERSION 4.2.0 SOVERSION 4 ) +INSTALL(TARGETS tag_c DESTINATION ${LIB_INSTALL_DIR} ) + + +########### install files ############### + +INSTALL( FILES taglib_c.pc DESTINATION ${LIB_INSTALL_DIR}/pkgconfig) +INSTALL( FILES tag_c.h DESTINATION ${INCLUDE_INSTALL_DIR}/taglib) + + + +#original Makefile.am contents follow: + +#INCLUDES = \ +# -I$(top_srcdir)/taglib \ +# -I$(top_srcdir)/taglib/toolkit \ +# -I$(top_srcdir)/taglib/mpeg \ +# -I$(top_srcdir)/taglib/ogg \ +# -I$(top_srcdir)/taglib/ogg/vorbis \ +# -I$(top_srcdir)/taglib/ogg/flac \ +# -I$(top_srcdir)/taglib/flac \ +# -I$(top_srcdir)/taglib/mpc \ +# -I$(top_srcdir)/taglib/mpeg/id3v2 \ +# $(all_includes) +# +#lib_LTLIBRARIES = libtag_c.la +# +#libtag_c_la_SOURCES = tag_c.cpp +#taglib_include_HEADERS = tag_c.h +#taglib_includedir = $(includedir)/taglib +# +#libtag_c_la_LDFLAGS = $(all_libraries) -no-undefined -version-info 0:0 +#libtag_c_la_LIBADD = ../../libtag.la +# +#pkgconfigdir = $(libdir)/pkgconfig +#pkgconfig_DATA = taglib_c.pc +# +#EXTRA_DIST = $(libtag_c_la_SOURCES) $(taglib_include_HEADERS) diff --git a/bindings/c/taglib_c.pc.cmake b/bindings/c/taglib_c.pc.cmake new file mode 100644 index 00000000..b9531778 --- /dev/null +++ b/bindings/c/taglib_c.pc.cmake @@ -0,0 +1,12 @@ +prefix=${CMAKE_INSTALL_PREFIX} +exec_prefix=${CMAKE_INSTALL_PREFIX} +libdir=${LIB_INSTALL_DIR} +includedir=${INCLUDE_INSTALL_DIR} + + +Name: TagLib C Bindings +Description: Audio meta-data library (C bindings) +Requires: taglib +Version: 1.4 +Libs: -L${libdir} -ltag_c +Cflags: -I${includedir}/taglib diff --git a/config-taglib.h.cmake b/config-taglib.h.cmake new file mode 100644 index 00000000..a3439996 --- /dev/null +++ b/config-taglib.h.cmake @@ -0,0 +1,7 @@ +/* config-taglib.h. Generated by cmake from config-taglib.h.cmake */ + +/* NOTE: only add something here if it is really needed by all of kdelibs. + Otherwise please prefer adding to the relevant config-foo.h.cmake file, + to minimize recompilations and increase modularity. */ +/* Define if you have libz */ +#cmakedefine HAVE_LIBZ 1 diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt new file mode 100644 index 00000000..9b8f7c7e --- /dev/null +++ b/examples/CMakeLists.txt @@ -0,0 +1,99 @@ +INCLUDE_DIRECTORIES( ${CMAKE_SOURCE_DIR}/taglib ${CMAKE_SOURCE_DIR}/taglib/toolkit ${CMAKE_SOURCE_DIR}/taglib/mpeg ${CMAKE_SOURCE_DIR}/taglib/mpeg/id3v1 ${CMAKE_SOURCE_DIR}/taglib/mpeg/id3v2 ${CMAKE_SOURCE_DIR}/taglib/bindings/c ) + + +########### next target ############### + +SET(tagreader_SRCS +tagreader.cpp +) + + +ADD_EXECUTABLE(tagreader ${tagreader_SRCS}) + +TARGET_LINK_LIBRARIES(tagreader ${QT_AND_KDECORE_LIBS} ) + +INSTALL_TARGETS(/bin tagreader ) + + +########### next target ############### + +SET(tagreader_c_SRCS +tagreader_c.c +) + + +ADD_EXECUTABLE(tagreader_c ${tagreader_c_SRCS}) + +TARGET_LINK_LIBRARIES(tagreader_c ${QT_AND_KDECORE_LIBS} tag_c ) + +INSTALL_TARGETS(/bin tagreader_c ) + + +########### next target ############### + +SET(tagwriter_SRCS +tagwriter.cpp +) + + +ADD_EXECUTABLE(tagwriter ${tagwriter_SRCS}) + +TARGET_LINK_LIBRARIES(tagwriter ${QT_AND_KDECORE_LIBS} ) + +INSTALL_TARGETS(/bin tagwriter ) + + +########### next target ############### + +SET(framelist_SRCS +framelist.cpp +) + + +ADD_EXECUTABLE(framelist ${framelist_SRCS}) + +TARGET_LINK_LIBRARIES(framelist ${QT_AND_KDECORE_LIBS} ) + +INSTALL_TARGETS(/bin framelist ) + + +########### next target ############### + +SET(strip-id3v1_SRCS +dummy.cpp +) + +KDE3_AUTOMOC(${strip-id3v1_SRCS}) + +FILE(WRITE dummy.cpp "//autogenerated file by cmake\n") +ADD_EXECUTABLE(strip-id3v1 ${strip-id3v1_SRCS}) + +TARGET_LINK_LIBRARIES(strip-id3v1 ${QT_AND_KDECORE_LIBS} ) + +INSTALL_TARGETS(/bin strip-id3v1 ) + + +########### install files ############### + + + + +#original Makefile.am contents follow: + +#bin_PROGRAMS = tagreader tagreader_c tagwriter framelist strip-id3v1 +#tagreader_SOURCES = tagreader.cpp +#tagreader_c_SOURCES = tagreader_c.c +#tagwriter_SOURCES = tagwriter.cpp +#framelist_SOURCES = framelist.cpp +#strip_id3v1_SOURCES = strip-id3v1.cpp +# +#INCLUDES = \ +# -I$(top_srcdir)/taglib \ +# -I$(top_srcdir)/taglib/toolkit \ +# -I$(top_srcdir)/taglib/mpeg \ +# -I$(top_srcdir)/taglib/mpeg/id3v1 \ +# -I$(top_srcdir)/taglib/mpeg/id3v2 \ +# -I$(top_srcdir)/taglib/bindings/c +# +#LDADD = ../libtag.la +#tagreader_c_LDADD = ../bindings/c/libtag_c.la diff --git a/flac/CMakeLists.txt b/flac/CMakeLists.txt new file mode 100644 index 00000000..8c983151 --- /dev/null +++ b/flac/CMakeLists.txt @@ -0,0 +1 @@ +INSTALL( FILES flacfile.h flacproperties.h DESTINATION ${INCLUDE_INSTALL_DIR}/taglib ) diff --git a/mpc/CMakeLists.txt b/mpc/CMakeLists.txt new file mode 100644 index 00000000..238c9cb1 --- /dev/null +++ b/mpc/CMakeLists.txt @@ -0,0 +1 @@ +INSTALL( FILES mpcfile.h mpcproperties.h DESTINATION ${INCLUDE_INSTALL_DIR}/taglib) diff --git a/mpeg/CMakeLists.txt b/mpeg/CMakeLists.txt new file mode 100644 index 00000000..9b0e3086 --- /dev/null +++ b/mpeg/CMakeLists.txt @@ -0,0 +1,4 @@ +ADD_SUBDIRECTORY( id3v1 ) +ADD_SUBDIRECTORY( id3v2 ) + +INSTALL(FILES mpegfile.h mpegproperties.h mpegheader.h xingheader.h DESTINATION ${INCLUDE_INSTALL_DIR}/taglib ) diff --git a/mpeg/id3v1/CMakeLists.txt b/mpeg/id3v1/CMakeLists.txt new file mode 100644 index 00000000..64b21ec8 --- /dev/null +++ b/mpeg/id3v1/CMakeLists.txt @@ -0,0 +1 @@ +INSTALL( FILES id3v1tag.h id3v1genres.h DESTINATION ${INCLUDE_INSTALL_DIR}/taglib) diff --git a/mpeg/id3v2/CMakeLists.txt b/mpeg/id3v2/CMakeLists.txt new file mode 100644 index 00000000..f6e1ef13 --- /dev/null +++ b/mpeg/id3v2/CMakeLists.txt @@ -0,0 +1,4 @@ +ADD_SUBDIRECTORY( frames ) + +INSTALL(FILES id3v2extendedheader.h id3v2frame.h id3v2header.h id3v2synchdata.h id3v2footer.h id3v2framefactory.h id3v2tag.h DESTINATION ${INCLUDE_INSTALL_DIR}/taglib) + diff --git a/mpeg/id3v2/frames/CMakeLists.txt b/mpeg/id3v2/frames/CMakeLists.txt new file mode 100644 index 00000000..e076918b --- /dev/null +++ b/mpeg/id3v2/frames/CMakeLists.txt @@ -0,0 +1,35 @@ +INSTALL( FILES attachedpictureframe.h commentsframe.h generalencapsulatedobjectframe.h relativevolumeframe.h textidentificationframe.h uniquefileidentifierframe.h unknownframe.h DESTINATION ${INCLUDE_INSTALL_DIR}/taglib) + + + +#original Makefile.am contents follow: + +#INCLUDES = \ +# -I$(top_srcdir)/taglib \ +# -I$(top_srcdir)/taglib/toolkit \ +# -I$(top_srcdir)/taglib/mpeg/id3v2 \ +# $(all_includes) +# +#noinst_LTLIBRARIES = libframes.la +# +#libframes_la_SOURCES = \ +# attachedpictureframe.cpp \ +# commentsframe.cpp \ +# generalencapsulatedobjectframe.cpp \ +# relativevolumeframe.cpp \ +# textidentificationframe.cpp \ +# uniquefileidentifierframe.cpp \ +# unknownframe.cpp +# +#taglib_include_HEADERS = \ +# attachedpictureframe.h \ +# commentsframe.h \ +# generalencapsulatedobjectframe.h \ +# relativevolumeframe.h \ +# textidentificationframe.h \ +# uniquefileidentifierframe.h \ +# unknownframe.h +# +#taglib_includedir = $(includedir)/taglib +# +#EXTRA_DIST = $(libframes_la_SOURCES) $(taglib_include_HEADERS) diff --git a/mpeg/id3v2/id3v2frame.cpp b/mpeg/id3v2/id3v2frame.cpp index fc090fef..9b5827c5 100644 --- a/mpeg/id3v2/id3v2frame.cpp +++ b/mpeg/id3v2/id3v2frame.cpp @@ -19,7 +19,7 @@ * USA * ***************************************************************************/ -#include +#include #include diff --git a/mpeg/id3v2/id3v2framefactory.cpp b/mpeg/id3v2/id3v2framefactory.cpp index 91e365fd..aebf8417 100644 --- a/mpeg/id3v2/id3v2framefactory.cpp +++ b/mpeg/id3v2/id3v2framefactory.cpp @@ -19,7 +19,7 @@ * USA * ***************************************************************************/ -#include +#include #include diff --git a/ogg/CMakeLists.txt b/ogg/CMakeLists.txt new file mode 100644 index 00000000..9fb99f5a --- /dev/null +++ b/ogg/CMakeLists.txt @@ -0,0 +1,5 @@ +ADD_SUBDIRECTORY( vorbis ) +ADD_SUBDIRECTORY( flac ) + +INSTALL( FILES oggfile.h oggpage.h oggpageheader.h xiphcomment.h DESTINATION ${INCLUDE_INSTALL_DIR}/taglib ) + diff --git a/ogg/flac/CMakeLists.txt b/ogg/flac/CMakeLists.txt new file mode 100644 index 00000000..6e7d9a81 --- /dev/null +++ b/ogg/flac/CMakeLists.txt @@ -0,0 +1,2 @@ +INSTALL( FILES oggflacfile.h DESTINATION ${INCLUDE_INSTALL_DIR}/taglib) + diff --git a/ogg/vorbis/CMakeLists.txt b/ogg/vorbis/CMakeLists.txt new file mode 100644 index 00000000..7033e132 --- /dev/null +++ b/ogg/vorbis/CMakeLists.txt @@ -0,0 +1 @@ +INSTALL( FILES vorbisfile.h vorbisproperties.h DESTINATION ${INCLUDE_INSTALL_DIR}/taglib) diff --git a/taglib-config.cmake b/taglib-config.cmake new file mode 100644 index 00000000..00401243 --- /dev/null +++ b/taglib-config.cmake @@ -0,0 +1,55 @@ +#!/bin/sh + +usage() +{ + echo "usage: $0 [OPTIONS]" +cat << EOH + +options: + [--libs] + [--cflags] + [--version] + [--prefix] +EOH + exit 1; +} + +prefix=${CMAKE_INSTALL_PREFIX} +exec_prefix=${CMAKE_INSTALL_PREFIX} +libdir=${LIB_INSTALL_DIR} +includedir=${INCLUDE_INSTALL_DIR} + +flags="" + +if test $# -eq 0 ; then + usage +fi + +while test $# -gt 0 +do + case $1 in + --libs) + flags="$flags -L$libdir -ltag" + ;; + --cflags) + flags="$flags -I$includedir/taglib" + ;; + --version) + echo 1.4 + ;; + --prefix) + echo $prefix + ;; + *) + echo "$0: unknown option $1" + echo + usage + ;; + esac + shift +done + +if test -n "$flags" +then + echo $flags +fi diff --git a/taglib.pc.cmake b/taglib.pc.cmake new file mode 100644 index 00000000..35ff6366 --- /dev/null +++ b/taglib.pc.cmake @@ -0,0 +1,11 @@ +prefix=${CMAKE_INSTALL_PREFIX} +exec_prefix=${CMAKE_INSTALL_PREFIX} +libdir=${LIB_INSTALL_DIR} +includedir=${INCLUDE_INSTALL_DIR} + +Name: TagLib +Description: Audio meta-data library +Requires: +Version: 1.4 +Libs: -L${libdir} -ltag +Cflags: -I${includedir}/taglib diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt new file mode 100644 index 00000000..e212a900 --- /dev/null +++ b/tests/CMakeLists.txt @@ -0,0 +1,32 @@ +INCLUDE_DIRECTORIES( ${CMAKE_SOURCE_DIR}/taglib ${CMAKE_SOURCE_DIR}/taglib/toolkit ${CMAKE_SOURCE_DIR}/taglib/mpeg/id3v2 ) + + +########### next target ############### + +SET(toolkit-test_SRCS +dummy.cpp +) + +FILE(WRITE dummy.cpp "//autogenerated file by cmake\n") +ADD_EXECUTABLE(toolkit-test ${toolkit-test_SRCS}) + +TARGET_LINK_LIBRARIES(toolkit-test ${QT_AND_KDECORE_LIBS} ) + + +########### install files ############### + + + + +#original Makefile.am contents follow: + +#INCLUDES = \ +# -I$(top_srcdir)/taglib\ +# -I$(top_srcdir)/taglib/toolkit \ +# -I$(top_srcdir)/taglib/mpeg/id3v2 +# +#LDADD = ../libtag.la +# +#check_PROGRAMS = toolkit-test +# +#toolkit_test_SOURCES = toolkit-test.cpp diff --git a/toolkit/CMakeLists.txt b/toolkit/CMakeLists.txt new file mode 100644 index 00000000..2e39d31f --- /dev/null +++ b/toolkit/CMakeLists.txt @@ -0,0 +1 @@ +INSTALL( FILES taglib.h tstring.h tlist.h tlist.tcc tstringlist.h tbytevector.h tbytevectorlist.h tfile.h tmap.h tmap.tcc DESTINATION ${INCLUDE_INSTALL_DIR}/taglib)