替换成sdl2

This commit is contained in:
xiongziliang
2018-04-17 21:38:13 +08:00
parent 6a9bc8aca5
commit bd04b2e2ab
4 changed files with 219 additions and 101 deletions

View File

@@ -1,10 +1,10 @@
#查找SDL是否安装
find_package(SDL QUIET)
if(SDL_FOUND)
include_directories(${SDL_INCLUDE_DIR})
list(APPEND LINK_LIB_LIST ${SDL_LIBRARY})
message(STATUS " found SDL")
endif()
#查找SDL2是否安装
find_package(SDL2 QUIET)
if (SDL2_FOUND)
include_directories(${SDL2_INCLUDE_DIR})
list(APPEND LINK_LIB_LIST ${SDL2_LIBRARY})
message(STATUS "found SDL2:${SDL2_INCLUDE_DIR},${SDL2_LIBRARY}")
endif (SDL2_FOUND)
#查找ffmpeg/libutil是否安装
find_package(AVUTIL QUIET)
@@ -24,10 +24,10 @@ endif()
aux_source_directory(. TEST_SRC_LIST)
#如果ffmpeg/libavcodec ffmpeg/libavcodec SDL 都安装了则编译 test_player
if(SDL_FOUND AND AVCODEC_FOUND AND AVUTIL_FOUND)
if(SDL2_FOUND AND AVCODEC_FOUND AND AVUTIL_FOUND)
message(STATUS "test_player will be compiled")
else()
message(STATUS "test_player ingored, please install sdl ffmpeg/libavcodec ffmpeg/libavcodec")
message(STATUS "test_player ingored, please install sdl2 ffmpeg/libavcodec ffmpeg/libavutil")
list(REMOVE_ITEM TEST_SRC_LIST ./test_player.cpp)
endif()
@@ -50,4 +50,3 @@ endforeach()