Use the PUBLIC_HEADER property to prepare for building an OS X framework

This commit is contained in:
Lukáš Lalinský 2011-04-18 16:50:18 +02:00
parent 4cda0eeb7b
commit d03ef3c312
23 changed files with 96 additions and 61 deletions

View File

@ -65,7 +65,6 @@ if(WITH_MP4)
endif()
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(bindings)

View File

@ -18,6 +18,8 @@ include_directories(
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/taglib_c.pc.cmake ${CMAKE_CURRENT_BINARY_DIR}/taglib_c.pc)
set(tag_c_HDRS tag_c.h)
if(ENABLE_STATIC)
add_library(tag_c STATIC tag_c.cpp)
set_target_properties(tag_c PROPERTIES COMPILE_DEFINITIONS TAGLIB_STATIC)
@ -26,6 +28,7 @@ else()
endif()
target_link_libraries(tag_c tag)
set_target_properties(tag_c PROPERTIES PUBLIC_HEADER "${tag_c_HDRS}")
# On Solaris we need to explicitly add the C++ standard and runtime
# libraries to the libs used by the C bindings, because those C bindings
@ -58,8 +61,8 @@ install(TARGETS tag_c
LIBRARY DESTINATION ${LIB_INSTALL_DIR}
RUNTIME DESTINATION ${BIN_INSTALL_DIR}
ARCHIVE DESTINATION ${LIB_INSTALL_DIR}
PUBLIC_HEADER DESTINATION ${INCLUDE_INSTALL_DIR}/taglib
)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/taglib_c.pc DESTINATION ${LIB_INSTALL_DIR}/pkgconfig)
install(FILES tag_c.h DESTINATION ${INCLUDE_INSTALL_DIR}/taglib)

View File

@ -25,17 +25,95 @@ if(ZLIB_FOUND)
include_directories(${ZLIB_INCLUDE_DIR})
endif()
add_subdirectory(toolkit)
add_subdirectory(asf)
add_subdirectory(mpeg)
add_subdirectory(ogg)
add_subdirectory(flac)
add_subdirectory(ape)
add_subdirectory(mpc)
add_subdirectory(mp4)
add_subdirectory(wavpack)
add_subdirectory(trueaudio)
add_subdirectory(riff)
set(tag_HDRS
tag.h
fileref.h
audioproperties.h
taglib_export.h
${CMAKE_BINARY_DIR}/taglib_config.h
toolkit/taglib.h
toolkit/tstring.h
toolkit/tlist.h
toolkit/tlist.tcc
toolkit/tstringlist.h
toolkit/tbytevector.h
toolkit/tbytevectorlist.h
toolkit/tfile.h
toolkit/tmap.h
toolkit/tmap.tcc
mpeg/mpegfile.h
mpeg/mpegproperties.h
mpeg/mpegheader.h
mpeg/xingheader.h
mpeg/id3v1/id3v1tag.h
mpeg/id3v1/id3v1genres.h
mpeg/id3v2/id3v2extendedheader.h
mpeg/id3v2/id3v2frame.h
mpeg/id3v2/id3v2header.h
mpeg/id3v2/id3v2synchdata.h
mpeg/id3v2/id3v2footer.h
mpeg/id3v2/id3v2framefactory.h
mpeg/id3v2/id3v2tag.h
mpeg/id3v2/frames/attachedpictureframe.h
mpeg/id3v2/frames/commentsframe.h
mpeg/id3v2/frames/generalencapsulatedobjectframe.h
mpeg/id3v2/frames/popularimeterframe.h
mpeg/id3v2/frames/privateframe.h
mpeg/id3v2/frames/relativevolumeframe.h
mpeg/id3v2/frames/textidentificationframe.h
mpeg/id3v2/frames/uniquefileidentifierframe.h
mpeg/id3v2/frames/unknownframe.h
mpeg/id3v2/frames/unsynchronizedlyricsframe.h
mpeg/id3v2/frames/urllinkframe.h
ogg/oggfile.h
ogg/oggpage.h
ogg/oggpageheader.h
ogg/xiphcomment.h
ogg/vorbis/vorbisfile.h
ogg/vorbis/vorbisproperties.h
ogg/flac/oggflacfile.h
ogg/speex/speexfile.h
ogg/speex/speexproperties.h
flac/flacfile.h
flac/flacpicture.h
flac/flacproperties.h
flac/flacmetadatablock.h
ape/apefile.h
ape/apeproperties.h
ape/apetag.h
ape/apefooter.h
ape/apeitem.h
mpc/mpcfile.h
mpc/mpcproperties.h
wavpack/wavpackfile.h
wavpack/wavpackproperties.h
trueaudio/trueaudiofile.h
trueaudio/trueaudioproperties.h
riff/rifffile.h
riff/aiff/aifffile.h
riff/aiff/aiffproperties.h
riff/wav/wavfile.h
riff/wav/wavproperties.h
)
if(WITH_ASF)
set(tag_HDRS ${tag_HDRS}
asf/asffile.h
asf/asfproperties.h
asf/asftag.h
asf/asfattribute.h
asf/asfpicture.h
)
endif()
if(WITH_MP4)
set(tag_HDRS ${tag_HDRS}
mp4/mp4file.h
mp4/mp4atom.h
mp4/mp4tag.h
mp4/mp4item.h
mp4/mp4properties.h
mp4/mp4coverart.h
)
endif()
set(mpeg_SRCS
mpeg/mpegfile.cpp
@ -199,13 +277,13 @@ set_target_properties(tag PROPERTIES
INSTALL_NAME_DIR ${LIB_INSTALL_DIR}
DEFINE_SYMBOL MAKE_TAGLIB_LIB
LINK_INTERFACE_LIBRARIES ""
PUBLIC_HEADER "${tag_HDRS}"
)
install(TARGETS tag
LIBRARY DESTINATION ${LIB_INSTALL_DIR}
RUNTIME DESTINATION ${BIN_INSTALL_DIR}
ARCHIVE DESTINATION ${LIB_INSTALL_DIR}
PUBLIC_HEADER DESTINATION ${INCLUDE_INSTALL_DIR}/taglib
)
install(FILES tag.h fileref.h audioproperties.h taglib_export.h DESTINATION ${INCLUDE_INSTALL_DIR}/taglib)

View File

@ -1 +0,0 @@
INSTALL( FILES apefile.h apeproperties.h apetag.h apefooter.h apeitem.h DESTINATION ${INCLUDE_INSTALL_DIR}/taglib)

View File

@ -1 +0,0 @@
INSTALL( FILES asffile.h asfproperties.h asftag.h asfattribute.h asfpicture.h DESTINATION ${INCLUDE_INSTALL_DIR}/taglib)

View File

@ -1 +0,0 @@
INSTALL( FILES flacfile.h flacpicture.h flacproperties.h flacmetadatablock.h DESTINATION ${INCLUDE_INSTALL_DIR}/taglib )

View File

@ -1 +0,0 @@
INSTALL( FILES mp4file.h mp4atom.h mp4tag.h mp4item.h mp4properties.h mp4coverart.h DESTINATION ${INCLUDE_INSTALL_DIR}/taglib)

View File

@ -1 +0,0 @@
INSTALL( FILES mpcfile.h mpcproperties.h DESTINATION ${INCLUDE_INSTALL_DIR}/taglib)

View File

@ -1,4 +0,0 @@
ADD_SUBDIRECTORY( id3v1 )
ADD_SUBDIRECTORY( id3v2 )
INSTALL(FILES mpegfile.h mpegproperties.h mpegheader.h xingheader.h DESTINATION ${INCLUDE_INSTALL_DIR}/taglib )

View File

@ -1 +0,0 @@
INSTALL( FILES id3v1tag.h id3v1genres.h DESTINATION ${INCLUDE_INSTALL_DIR}/taglib)

View File

@ -1,4 +0,0 @@
ADD_SUBDIRECTORY( frames )
INSTALL(FILES id3v2extendedheader.h id3v2frame.h id3v2header.h id3v2synchdata.h id3v2footer.h id3v2framefactory.h id3v2tag.h DESTINATION ${INCLUDE_INSTALL_DIR}/taglib)

View File

@ -1,13 +0,0 @@
INSTALL(FILES
attachedpictureframe.h
commentsframe.h
generalencapsulatedobjectframe.h
popularimeterframe.h
privateframe.h
relativevolumeframe.h
textidentificationframe.h
uniquefileidentifierframe.h
unknownframe.h
unsynchronizedlyricsframe.h
urllinkframe.h
DESTINATION ${INCLUDE_INSTALL_DIR}/taglib)

View File

@ -1,6 +0,0 @@
ADD_SUBDIRECTORY( vorbis )
ADD_SUBDIRECTORY( speex )
ADD_SUBDIRECTORY( flac )
INSTALL( FILES oggfile.h oggpage.h oggpageheader.h xiphcomment.h DESTINATION ${INCLUDE_INSTALL_DIR}/taglib )

View File

@ -1,2 +0,0 @@
INSTALL( FILES oggflacfile.h DESTINATION ${INCLUDE_INSTALL_DIR}/taglib)

View File

@ -1 +0,0 @@
INSTALL( FILES speexfile.h speexproperties.h DESTINATION ${INCLUDE_INSTALL_DIR}/taglib)

View File

@ -1 +0,0 @@
INSTALL( FILES vorbisfile.h vorbisproperties.h DESTINATION ${INCLUDE_INSTALL_DIR}/taglib)

View File

@ -1,4 +0,0 @@
ADD_SUBDIRECTORY( aiff )
ADD_SUBDIRECTORY( wav )
INSTALL( FILES rifffile.h DESTINATION ${INCLUDE_INSTALL_DIR}/taglib)

View File

@ -1 +0,0 @@
INSTALL( FILES aifffile.h aiffproperties.h DESTINATION ${INCLUDE_INSTALL_DIR}/taglib)

View File

@ -1 +0,0 @@
INSTALL( FILES wavfile.h wavproperties.h DESTINATION ${INCLUDE_INSTALL_DIR}/taglib)

View File

@ -1 +0,0 @@
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)

View File

@ -564,3 +564,4 @@ TagLib::uint File::bufferSize()
{
return FilePrivate::bufferSize;
}

View File

@ -1 +0,0 @@
INSTALL( FILES trueaudiofile.h trueaudioproperties.h DESTINATION ${INCLUDE_INSTALL_DIR}/taglib)

View File

@ -1 +0,0 @@
INSTALL( FILES wavpackfile.h wavpackproperties.h DESTINATION ${INCLUDE_INSTALL_DIR}/taglib)