-
Notifications
You must be signed in to change notification settings - Fork 76
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
83 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,61 +1,36 @@ | ||
cmake_minimum_required(VERSION 2.8) | ||
cmake_minimum_required(VERSION 2.8.9) | ||
project(libebur128 C) | ||
|
||
project(ebur128-loudness-tools) | ||
set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake) | ||
set(EXECUTABLE_OUTPUT_PATH ${CMAKE_BINARY_DIR}) | ||
set(LIBRARY_OUTPUT_PATH ${CMAKE_BINARY_DIR}) | ||
|
||
add_subdirectory(ebur128) | ||
add_subdirectory(scanner) | ||
|
||
include(utils) | ||
|
||
add_subdirectory(ebur128) | ||
add_subdirectory(test) | ||
|
||
|
||
set(ENABLE_INTERNAL_QUEUE_H OFF CACHE BOOL "Use own queue.h") | ||
set(DISABLE_SPEEXDSP OFF CACHE BOOL "Don't build with speexdsp") | ||
set(DISABLE_GLIB20 OFF CACHE BOOL "Don't build with glib") | ||
set(DISABLE_SNDFILE OFF CACHE BOOL "Don't build with sndfile") | ||
set(DISABLE_TAGLIB OFF CACHE BOOL "Don't build with taglib") | ||
set(DISABLE_MPG123 OFF CACHE BOOL "Don't build with mpg123") | ||
set(DISABLE_MPCDEC OFF CACHE BOOL "Don't build with mpcdec") | ||
set(DISABLE_GSTREAMER OFF CACHE BOOL "Don't build with gstreamer") | ||
set(DISABLE_FFMPEG OFF CACHE BOOL "Don't build with ffmpeg") | ||
set(DISABLE_RSVG2 OFF CACHE BOOL "Don't build with rsvg2") | ||
set(DISABLE_GTK2 OFF CACHE BOOL "Don't build with gtk2") | ||
set(DISABLE_QT4 OFF CACHE BOOL "Don't build with qt4") | ||
|
||
to_yes_no(SUMMARY_HAS_QUEUE SUMMARY_SPEEXDSP_FOUND SUMMARY_GLIB20_FOUND | ||
SUMMARY_GTHREAD20_FOUND SUMMARY_SNDFILE_FOUND SUMMARY_TAGLIB_FOUND | ||
SUMMARY_MPG123_FOUND SUMMARY_MPCDEC_FOUND SUMMARY_GSTREAMER_FOUND | ||
SUMMARY_FFMPEG_FOUND SUMMARY_RSVG2_FOUND SUMMARY_GTK2_FOUND | ||
SUMMARY_QT4_FOUND) | ||
to_yes_no(DISABLE_SPEEXDSP DISABLE_GLIB20 DISABLE_SNDFILE DISABLE_TAGLIB | ||
DISABLE_MPG123 DISABLE_MPCDEC DISABLE_GSTREAMER DISABLE_FFMPEG | ||
DISABLE_RSVG2 DISABLE_GTK2 DISABLE_QT4) | ||
to_yes_no(SUMMARY_HAS_QUEUE SUMMARY_SPEEXDSP_FOUND) | ||
to_yes_no(DISABLE_SPEEXDSP) | ||
|
||
if(ENABLE_INTERNAL_QUEUE_H) | ||
set(USE_QUEUE "using own copy of queue.h") | ||
set(USE_QUEUE "using own copy of queue.h") | ||
else() | ||
set(USE_QUEUE "using system copy of queue.h") | ||
set(USE_QUEUE "using system copy of queue.h") | ||
endif() | ||
|
||
##### Print status | ||
message(STATUS "status found / disabled --") | ||
message(STATUS "queue.h: ${SUMMARY_HAS_QUEUE}" " ${USE_QUEUE}") | ||
message(STATUS "speexdsp: ${SUMMARY_SPEEXDSP_FOUND}" " ${DISABLE_SPEEXDSP}") | ||
message(STATUS "glib-2.0: ${SUMMARY_GLIB20_FOUND}" " ${DISABLE_GLIB20}") | ||
message(STATUS "gthread-2.0: ${SUMMARY_GTHREAD20_FOUND}" " ${DISABLE_GLIB20}") | ||
message(STATUS "sndfile: ${SUMMARY_SNDFILE_FOUND}" " ${DISABLE_SNDFILE}") | ||
message(STATUS "taglib: ${SUMMARY_TAGLIB_FOUND}" " ${DISABLE_TAGLIB}") | ||
message(STATUS "mpg123: ${SUMMARY_MPG123_FOUND}" " ${DISABLE_MPG123}") | ||
message(STATUS "mpcdec: ${SUMMARY_MPCDEC_FOUND}" " ${DISABLE_MPCDEC}") | ||
message(STATUS "gstreamer: ${SUMMARY_GSTREAMER_FOUND}" " ${DISABLE_GSTREAMER}") | ||
message(STATUS "ffmpeg: ${SUMMARY_FFMPEG_FOUND}" " ${DISABLE_FFMPEG}") | ||
message(STATUS "rsvg2: ${SUMMARY_RSVG2_FOUND}" " ${DISABLE_RSVG2}") | ||
message(STATUS "gtk2: ${SUMMARY_GTK2_FOUND}" " ${DISABLE_GTK2}") | ||
message(STATUS "qt4: ${SUMMARY_QT4_FOUND}" " ${DISABLE_QT4}") | ||
|
||
|
||
if(NOT SUMMARY_HAS_QUEUE AND NOT ENABLE_INTERNAL_QUEUE_H) | ||
message(FATAL_ERROR "queue.h not found, please set ENABLE_INTERNAL_QUEUE_H to ON") | ||
message(FATAL_ERROR "queue.h not found, please set ENABLE_INTERNAL_QUEUE_H to ON") | ||
endif() | ||
|
||
if(ENABLE_TESTS) | ||
message(STATUS "building tests!") | ||
else() | ||
message(STATUS "not building tests, set ENABLE_TESTS to ON to enable") | ||
endif() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,18 @@ | ||
if(SNDFILE_FOUND) | ||
cmake_minimum_required(VERSION 2.8.9) | ||
|
||
set(ENABLE_TESTS OFF CACHE BOOL "Build test binaries, needs libsndfile") | ||
|
||
if(ENABLE_TESTS) | ||
find_pkg_config(SNDFILE sndfile REQUIRED) | ||
|
||
include_directories(${EBUR128_INCLUDE_DIR}) | ||
include_directories(SYSTEM ${SNDFILE_INCLUDE_DIRS}) | ||
add_executable(r128-test-library tests.c) | ||
add_executable(r128-test-library tests) | ||
add_executable(minimal-example minimal-example) | ||
set_property(TARGET r128-test-library APPEND_STRING PROPERTY | ||
COMPILE_FLAGS " ${SNDFILE_CFLAGS}") | ||
set_property(TARGET minimal-example APPEND_STRING PROPERTY | ||
COMPILE_FLAGS " ${SNDFILE_CFLAGS}") | ||
target_link_libraries(r128-test-library ebur128 ${SNDFILE_LIBRARIES}) | ||
add_test(test1 ${EXECUTABLE_OUTPUT_PATH}/r128-test-library) | ||
target_link_libraries(minimal-example ebur128 ${SNDFILE_LIBRARIES}) | ||
endif() |