add static linking options for ffmpeg and wxwidgets to cmake

This commit is contained in:
Palana
2013-12-30 03:01:57 +01:00
parent 534ed54cf1
commit c093f04c58
4 changed files with 218 additions and 20 deletions

View File

@@ -22,11 +22,18 @@ elseif(UNIX)
else()
endif()
find_package(Libavutil REQUIRED)
include_directories(${LIBAVUTIL_INCLUDE_DIRS})
option(USE_STATIC_FFMPEG "Link ffmpeg statically (if possible)" false)
if(USE_STATIC_FFMPEG)
set(FFMPEG_STATIC "static")
endif()
find_package(Libswresample REQUIRED)
find_package(Libavutil REQUIRED ${FFMPEG_STATIC})
include_directories(${LIBAVUTIL_INCLUDE_DIRS})
add_definitions(${LIBAVUTIL_DEFINITIONS})
find_package(Libswresample REQUIRED ${FFMPEG_STATIC})
include_directories(${LIBSWRESAMPLE_INCLUDE_DIRS})
add_definitions(${LIBSWRESAMPLE_DEFINITIONS})
add_library(libobs SHARED
obs.c