Fix CMakeLists.txt

This commit is contained in:
Lucas Verney 2016-05-19 17:59:33 +02:00
parent b1c2ba9a2a
commit 36357d4423

View File

@ -6,21 +6,12 @@ add_subdirectory (bliss)
file (GLOB COMMON_SRC "src/*.c") file (GLOB COMMON_SRC "src/*.c")
# TODO \/
find_package(PkgConfig REQUIRED) find_package(PkgConfig REQUIRED)
pkg_check_modules(MULTIMEDIA REQUIRED libavformat libavutil libavcodec) pkg_check_modules(MULTIMEDIA REQUIRED libavformat libavutil libavcodec)
pkg_check_modules(RESAMPLE QUIET libswresample) include_directories(${MULTIMEDIA_INCLUDE_DIRS} include/ bliss/include)
if(NOT RESAMPLE_FOUND) link_directories(${MULTIMEDIA_LIBRARY_DIRS})
pkg_check_modules(RESAMPLE REQUIRED libavresample) add_definitions(${MULTIMEDIA_CFLAGS_OTHER})
set(AVRESAMPLE TRUE)
else()
set(AVRESAMPLE FALSE)
endif()
include_directories(${MULTIMEDIA_INCLUDE_DIRS} ${RESAMPLE_INCLUDE_DIRS} include/ bliss/include)
link_directories(${MULTIMEDIA_LIBRARY_DIRS} ${RESAMPLE_LIBRARY_DIRS})
add_definitions(${MULTIMEDIA_CFLAGS_OTHER} ${RESAMPLE_CFLAGS_OTHER})
add_definitions (-Wall -Wno-long-long -pedantic -std=c99) add_definitions (-Wall -Wno-long-long -pedantic -std=c99)
# TODO /\
add_executable (mpdbliss add_executable (mpdbliss
${COMMON_SRC} "main_mpd.c") ${COMMON_SRC} "main_mpd.c")