2015-12-05 22:53:30 +01:00
|
|
|
cmake_minimum_required(VERSION 3.1.0 FATAL_ERROR)
|
|
|
|
|
2015-12-08 08:38:26 +01:00
|
|
|
# add project files
|
|
|
|
set(HEADER_FILES
|
|
|
|
exceptions.h
|
|
|
|
mp4/mp4atom.h
|
|
|
|
mp4/mp4container.h
|
|
|
|
mp4/mp4ids.h
|
|
|
|
mp4/mp4tag.h
|
|
|
|
mp4/mp4tagfield.h
|
|
|
|
mp4/mp4track.h
|
|
|
|
mp4/mpeg4descriptor.h
|
|
|
|
# aac/aaccodebook.h
|
|
|
|
# aac/aacframe.h
|
|
|
|
abstractattachment.h
|
|
|
|
abstractchapter.h
|
|
|
|
abstractcontainer.h
|
|
|
|
abstracttrack.h
|
|
|
|
adts/adtsframe.h
|
|
|
|
adts/adtsstream.h
|
2016-02-17 20:19:05 +01:00
|
|
|
aspectratio.h
|
|
|
|
avc/avcconfiguration.h
|
|
|
|
avc/avcinfo.h
|
2015-12-08 08:38:26 +01:00
|
|
|
avi/bitmapinfoheader.h
|
|
|
|
backuphelper.h
|
|
|
|
basicfileinfo.h
|
|
|
|
caseinsensitivecomparer.h
|
|
|
|
mpegaudio/mpegaudioframe.h
|
|
|
|
mpegaudio/mpegaudioframestream.h
|
|
|
|
notification.h
|
|
|
|
ogg/oggcontainer.h
|
|
|
|
ogg/oggiterator.h
|
|
|
|
ogg/oggpage.h
|
|
|
|
ogg/oggstream.h
|
2016-01-17 19:32:58 +01:00
|
|
|
opus/opusidentificationheader.h
|
2016-05-14 00:24:01 +02:00
|
|
|
flac/flactooggmappingheader.h
|
|
|
|
flac/flacmetadata.h
|
2016-05-16 20:56:53 +02:00
|
|
|
flac/flacstream.h
|
2015-12-08 08:38:26 +01:00
|
|
|
positioninset.h
|
|
|
|
signature.h
|
|
|
|
size.h
|
|
|
|
statusprovider.h
|
|
|
|
tag.h
|
|
|
|
tagtarget.h
|
|
|
|
tagvalue.h
|
|
|
|
vorbis/vorbiscomment.h
|
|
|
|
vorbis/vorbiscommentfield.h
|
|
|
|
vorbis/vorbiscommentids.h
|
|
|
|
vorbis/vorbisidentificationheader.h
|
|
|
|
vorbis/vorbispackagetypes.h
|
|
|
|
wav/waveaudiostream.h
|
|
|
|
fieldbasedtag.h
|
|
|
|
genericcontainer.h
|
|
|
|
genericfileelement.h
|
|
|
|
generictagfield.h
|
|
|
|
id3/id3genres.h
|
|
|
|
id3/id3v1tag.h
|
|
|
|
id3/id3v2frame.h
|
|
|
|
id3/id3v2frameids.h
|
|
|
|
id3/id3v2tag.h
|
|
|
|
localeawarestring.h
|
|
|
|
margin.h
|
|
|
|
matroska/matroskaid.h
|
|
|
|
matroska/ebmlelement.h
|
|
|
|
matroska/ebmlid.h
|
|
|
|
matroska/matroskaattachment.h
|
|
|
|
matroska/matroskachapter.h
|
|
|
|
matroska/matroskacontainer.h
|
|
|
|
matroska/matroskacues.h
|
|
|
|
matroska/matroskaeditionentry.h
|
|
|
|
matroska/matroskaseekinfo.h
|
|
|
|
matroska/matroskatag.h
|
|
|
|
matroska/matroskatagfield.h
|
|
|
|
matroska/matroskatagid.h
|
|
|
|
matroska/matroskatrack.h
|
|
|
|
mediafileinfo.h
|
|
|
|
mediaformat.h
|
|
|
|
)
|
|
|
|
set(SRC_FILES
|
|
|
|
mp4/mp4atom.cpp
|
|
|
|
mp4/mp4container.cpp
|
|
|
|
mp4/mp4ids.cpp
|
|
|
|
mp4/mp4tag.cpp
|
|
|
|
mp4/mp4tagfield.cpp
|
|
|
|
mp4/mp4track.cpp
|
|
|
|
mp4/mpeg4descriptor.cpp
|
|
|
|
# aac/aaccodebook.cpp
|
|
|
|
# aac/aacframe.cpp
|
|
|
|
abstractattachment.cpp
|
|
|
|
abstractchapter.cpp
|
|
|
|
abstractcontainer.cpp
|
|
|
|
abstracttrack.cpp
|
|
|
|
adts/adtsframe.cpp
|
|
|
|
adts/adtsstream.cpp
|
2016-02-17 20:19:05 +01:00
|
|
|
aspectratio.cpp
|
|
|
|
avc/avcconfiguration.cpp
|
|
|
|
avc/avcinfo.cpp
|
2015-12-08 08:38:26 +01:00
|
|
|
avi/bitmapinfoheader.cpp
|
|
|
|
backuphelper.cpp
|
|
|
|
basicfileinfo.cpp
|
|
|
|
exceptions.cpp
|
|
|
|
mpegaudio/mpegaudioframe.cpp
|
|
|
|
mpegaudio/mpegaudioframestream.cpp
|
|
|
|
notification.cpp
|
|
|
|
ogg/oggcontainer.cpp
|
|
|
|
ogg/oggiterator.cpp
|
|
|
|
ogg/oggpage.cpp
|
|
|
|
ogg/oggstream.cpp
|
2016-01-17 19:32:58 +01:00
|
|
|
opus/opusidentificationheader.cpp
|
2016-05-14 00:24:01 +02:00
|
|
|
flac/flactooggmappingheader.cpp
|
|
|
|
flac/flacmetadata.cpp
|
2016-05-16 20:56:53 +02:00
|
|
|
flac/flacstream.cpp
|
2015-12-08 08:38:26 +01:00
|
|
|
signature.cpp
|
|
|
|
statusprovider.cpp
|
|
|
|
tag.cpp
|
|
|
|
tagtarget.cpp
|
|
|
|
tagvalue.cpp
|
|
|
|
vorbis/vorbiscomment.cpp
|
|
|
|
vorbis/vorbiscommentfield.cpp
|
|
|
|
vorbis/vorbisidentificationheader.cpp
|
|
|
|
wav/waveaudiostream.cpp
|
|
|
|
id3/id3genres.cpp
|
|
|
|
id3/id3v1tag.cpp
|
|
|
|
id3/id3v2frame.cpp
|
|
|
|
id3/id3v2frameids.cpp
|
|
|
|
id3/id3v2tag.cpp
|
|
|
|
localeawarestring.cpp
|
|
|
|
matroska/ebmlelement.cpp
|
|
|
|
matroska/matroskaattachment.cpp
|
|
|
|
matroska/matroskachapter.cpp
|
|
|
|
matroska/matroskacontainer.cpp
|
|
|
|
matroska/matroskacues.cpp
|
|
|
|
matroska/matroskaeditionentry.cpp
|
|
|
|
matroska/matroskaid.cpp
|
|
|
|
matroska/matroskaseekinfo.cpp
|
|
|
|
matroska/matroskatag.cpp
|
|
|
|
matroska/matroskatagfield.cpp
|
|
|
|
matroska/matroskatagid.cpp
|
|
|
|
matroska/matroskatrack.cpp
|
|
|
|
mediafileinfo.cpp
|
|
|
|
mediaformat.cpp
|
|
|
|
)
|
2016-02-17 20:19:05 +01:00
|
|
|
set(TEST_HEADER_FILES
|
2017-05-20 21:15:48 +02:00
|
|
|
tests/overall.h
|
2017-05-20 23:34:45 +02:00
|
|
|
tests/helper.h
|
2016-02-17 20:19:05 +01:00
|
|
|
)
|
|
|
|
set(TEST_SRC_FILES
|
|
|
|
tests/cppunit.cpp
|
2017-05-24 19:33:11 +02:00
|
|
|
tests/helper.cpp
|
2017-04-08 18:40:27 +02:00
|
|
|
tests/testfilecheck.cpp
|
2017-05-20 21:15:48 +02:00
|
|
|
tests/overallgeneral.cpp
|
|
|
|
tests/overallmkv.cpp
|
|
|
|
tests/overallmp4.cpp
|
|
|
|
tests/overallmp3.cpp
|
|
|
|
tests/overallogg.cpp
|
|
|
|
tests/overallflac.cpp
|
2016-02-17 20:19:05 +01:00
|
|
|
)
|
2015-12-08 08:38:26 +01:00
|
|
|
|
2016-06-10 23:08:01 +02:00
|
|
|
set(DOC_FILES
|
|
|
|
README.md
|
|
|
|
)
|
|
|
|
|
2015-12-05 22:53:30 +01:00
|
|
|
# meta data
|
|
|
|
set(META_PROJECT_NAME tagparser)
|
2016-04-16 00:50:46 +02:00
|
|
|
set(META_PROJECT_VARNAME TAG_PARSER)
|
2015-12-05 22:53:30 +01:00
|
|
|
set(META_APP_NAME "Tag Parser")
|
|
|
|
set(META_APP_AUTHOR "Martchus")
|
|
|
|
set(META_APP_URL "https://github.com/${META_APP_AUTHOR}/${META_PROJECT_NAME}")
|
2016-07-22 01:36:54 +02:00
|
|
|
set(META_APP_DESCRIPTION "C++ library for reading and writing MP4 (iTunes), ID3, Vorbis, Opus, FLAC and Matroska tags")
|
2016-05-01 20:02:44 +02:00
|
|
|
set(META_VERSION_MAJOR 6)
|
2017-05-25 23:33:32 +02:00
|
|
|
set(META_VERSION_MINOR 3)
|
|
|
|
set(META_VERSION_PATCH 0)
|
2016-11-08 20:01:28 +01:00
|
|
|
set(META_PUBLIC_SHARED_LIB_DEPENDS c++utilities)
|
|
|
|
set(META_PUBLIC_STATIC_LIB_DEPENDS c++utilities_static)
|
2016-11-14 22:59:19 +01:00
|
|
|
set(META_PRIVATE_COMPILE_DEFINITIONS LEGACY_API)
|
2017-05-01 03:19:44 +02:00
|
|
|
set(META_NO_TIDY ON)
|
2017-05-23 00:52:56 +02:00
|
|
|
set(META_REQUIRED_CPP_UNIT_VERSION 1.14.0)
|
2015-12-05 22:53:30 +01:00
|
|
|
|
2016-04-16 00:50:46 +02:00
|
|
|
# find c++utilities
|
2017-04-08 18:40:27 +02:00
|
|
|
find_package(c++utilities 4.7.0 REQUIRED)
|
2016-04-16 00:50:46 +02:00
|
|
|
use_cpp_utilities()
|
2015-12-08 08:38:26 +01:00
|
|
|
|
2016-07-22 01:36:54 +02:00
|
|
|
# find 3rd party libraries
|
|
|
|
include(3rdParty)
|
2016-08-19 16:18:27 +02:00
|
|
|
# zlib
|
|
|
|
use_external_library_from_package(
|
|
|
|
z
|
|
|
|
ZLIB ANY_VERSION
|
|
|
|
ZLIB_INCLUDE_DIRS
|
|
|
|
ZLIB_LIBRARIES
|
|
|
|
AUTO_LINKAGE
|
|
|
|
REQUIRED
|
|
|
|
)
|
2017-04-15 23:21:16 +02:00
|
|
|
# crypto (optional for testing integrity of testfiles)
|
2017-04-08 18:40:27 +02:00
|
|
|
find_external_library_from_package(
|
|
|
|
crypto
|
|
|
|
OpenSSL ANY_VERSION
|
|
|
|
OPENSSL_INCLUDE_DIR
|
|
|
|
OPENSSL_CRYPTO_LIBRARY
|
|
|
|
AUTO_LINKAGE
|
2017-04-15 23:21:16 +02:00
|
|
|
OPTIONAL
|
2017-04-08 18:40:27 +02:00
|
|
|
)
|
|
|
|
link_tests_against_library(
|
2017-04-15 23:21:16 +02:00
|
|
|
crypto AUTO_LINKAGE OPTIONAL
|
2017-04-08 18:40:27 +02:00
|
|
|
)
|
2017-04-15 23:21:16 +02:00
|
|
|
if(NOT USE_crypto)
|
|
|
|
list(REMOVE_ITEM TEST_SRC_FILES tests/testfilecheck.cpp)
|
|
|
|
message(WARNING "Unable to check testfile integrity because OpenSSL is not available.")
|
|
|
|
endif()
|
2015-12-05 22:53:30 +01:00
|
|
|
|
2016-04-16 00:50:46 +02:00
|
|
|
# include modules to apply configuration
|
|
|
|
include(BasicConfig)
|
|
|
|
include(WindowsResources)
|
|
|
|
include(LibraryTarget)
|
|
|
|
include(TestTarget)
|
2016-06-10 23:08:01 +02:00
|
|
|
include(Doxygen)
|
2016-07-27 21:39:21 +02:00
|
|
|
include(ConfigHeader)
|