[f189ec]: plugins / codec_mp3 / CMakeLists.txt Maximize Restore History

Download this file

CMakeLists.txt    116 lines (94 with data), 4.0 kB

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
#############################################################################
## Kwave - plugins/codec_mp3/CMakeLists.txt
## -------------------
## begin : Sat Jun 02 2007
## copyright : (C) 2007 by Thomas Eschenbacher
## email : Thomas.Eschenbacher@gmx.de
#############################################################################
#
#############################################################################
## #
## This program is free software; you can redistribute it and/or modify #
## it under the terms of the GNU General Public License as published by #
## the Free Software Foundation; either version 2 of the License, or #
## (at your option) any later version. #
## #
#############################################################################
OPTION(WITH_MP3 "enable support for mp3 files [default=off]" OFF)
IF (WITH_MP3)
#############################################################################
### check for id3lib headers and library ###
INCLUDE(CheckIncludeFileCXX)
CHECK_INCLUDE_FILE_CXX(id3/globals.h HAVE_ID3_HEADER_GLOBALS_H)
IF (HAVE_ID3_HEADER_GLOBALS_H)
CHECK_INCLUDE_FILE_CXX(id3/tag.h HAVE_ID3_HEADER_TAG_H)
ENDIF (HAVE_ID3_HEADER_GLOBALS_H)
IF (HAVE_ID3_HEADER_TAG_H)
CHECK_INCLUDE_FILE_CXX(id3/misc_support.h HAVE_ID3_HEADERS)
ENDIF (HAVE_ID3_HEADER_TAG_H)
IF (HAVE_ID3_HEADERS)
SET(_try_src_dir "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp")
SET(_try_id3lib "${_try_src_dir}/cmake_try_id3lib.cpp")
WRITE_FILE("${_try_id3lib}" "
#include <id3/globals.h>
#include <id3/readers.h>
#include <id3/tag.h>
int main()
{
ID3_Tag tag;
ID3_MemoryReader reader;
tag.Link(reader);
return 0;
}
")
TRY_COMPILE(
HAVE_ID3_LIB
${CMAKE_BINARY_DIR}
${_try_id3lib}
CMAKE_FLAGS -DLINK_LIBRARIES:STRING=id3\;stdc++\;z
OUTPUT_VARIABLE _out
)
ENDIF (HAVE_ID3_HEADERS)
IF (NOT HAVE_ID3_LIB)
MESSAGE(FATAL_ERROR "
id3lib seems not to be installed or too old !
You can download id3lib from http://id3lib.sourceforge.net/
and fetch the latest version from there. If you download the
rpm package, please don't forget to fetch id3lib-devel too,
it is needed for compiling Kwave!
Note: at least version 3.8.1 is needed.
")
ENDIF (NOT HAVE_ID3_LIB)
#############################################################################
### check for libmad headers and library ###
CHECK_INCLUDE_FILES(mad.h HAVE_MAD_H)
IF (HAVE_MAD_H)
CHECK_LIBRARY_EXISTS(mad mad_decoder_init "" HAVE_MAD_LIB)
ENDIF (HAVE_MAD_H)
IF (NOT HAVE_MAD_LIB)
MESSAGE(FATAL_ERROR "
the mad package is missing.
please install the mad and the mad-devel package!
")
ENDIF (NOT HAVE_MAD_LIB)
#############################################################################
SET(plugin_codec_mp3_LIB_SRCS
ID3_PropertyMap.cpp
ID3_QIODeviceReader.cpp
ID3_QIODeviceWriter.cpp
MP3CodecPlugin.cpp
MP3Decoder.cpp
MP3Encoder.cpp
MP3EncoderDialog.cpp
MP3EncoderSettings.cpp
)
SET(plugin_codec_mp3_LIB_UI
MP3EncoderDialogBase.ui
)
SET(plugin_codec_mp3_LIBS
mad id3 stdc++ z
)
KWAVE_PLUGIN(codec_mp3)
ENDIF (WITH_MP3)
#############################################################################
#############################################################################