diff options
author | Chris Robinson <[email protected]> | 2015-09-30 18:45:19 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2015-09-30 18:45:19 -0700 |
commit | da3b9568dd3d2e2c0bddd0c4b90c33d41687fd69 (patch) | |
tree | c31683307bfbbd51682a02ebf98d6ee976090491 /CMakeLists.txt | |
parent | 904cdfda32d11f5c3376a20363051b98bc1d3033 (diff) |
Revert "Only use SDL1 with SDL_sound"
This reverts commit 8883ce1cef86c07d6eaa7e0eff2e132e181184f0.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 41 |
1 files changed, 18 insertions, 23 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 7c8f66b7..39fdd44e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1006,15 +1006,12 @@ IF(ALSOFT_UTILS AND NOT ALSOFT_NO_CONFIG_UTIL) add_subdirectory(utils/alsoft-config) ENDIF() IF(ALSOFT_EXAMPLES) - FIND_PACKAGE(SDL) - IF(SDL_FOUND) + FIND_PACKAGE(SDL2) + IF(SDL2_FOUND) FIND_PACKAGE(SDL_sound) IF(SDL_SOUND_FOUND AND CMAKE_VERSION VERSION_LESS "2.8.8") - INCLUDE_DIRECTORIES(${SDL_INCLUDE_DIR} ${SDL_SOUND_INCLUDE_DIR}) + INCLUDE_DIRECTORIES(${SDL2_INCLUDE_DIR} ${SDL_SOUND_INCLUDE_DIR}) ENDIF() - ENDIF() - FIND_PACKAGE(SDL2) - IF(SDL2_FOUND) FIND_PACKAGE(FFmpeg COMPONENTS AVFORMAT AVCODEC AVUTIL SWSCALE SWRESAMPLE) IF(FFMPEG_FOUND AND CMAKE_VERSION VERSION_LESS "2.8.8") INCLUDE_DIRECTORIES(${FFMPEG_INCLUDE_DIRS}) @@ -1205,30 +1202,30 @@ IF(ALSOFT_UTILS) ENDIF() IF(ALSOFT_EXAMPLES) - IF(SDL_FOUND AND SDL_SOUND_FOUND) + IF(SDL2_FOUND AND SDL_SOUND_FOUND) ADD_LIBRARY(ex-common STATIC examples/common/alhelpers.c examples/common/sdl_sound.c) - SET_PROPERTY(TARGET ex-common APPEND PROPERTY INCLUDE_DIRECTORIES ${SDL_INCLUDE_DIR} + SET_PROPERTY(TARGET ex-common APPEND PROPERTY INCLUDE_DIRECTORIES ${SDL2_INCLUDE_DIR} ${SDL_SOUND_INCLUDE_DIR}) ADD_EXECUTABLE(alstream examples/alstream.c) - TARGET_LINK_LIBRARIES(alstream ex-common ${SDL_SOUND_LIBRARIES} ${SDL_LIBRARY} ${LIBNAME}) - SET_PROPERTY(TARGET alstream APPEND PROPERTY INCLUDE_DIRECTORIES ${SDL_INCLUDE_DIR} + TARGET_LINK_LIBRARIES(alstream ex-common ${SDL_SOUND_LIBRARIES} ${SDL2_LIBRARY} ${LIBNAME}) + SET_PROPERTY(TARGET alstream APPEND PROPERTY INCLUDE_DIRECTORIES ${SDL2_INCLUDE_DIR} ${SDL_SOUND_INCLUDE_DIR}) ADD_EXECUTABLE(alreverb examples/alreverb.c) - TARGET_LINK_LIBRARIES(alreverb ex-common ${SDL_SOUND_LIBRARIES} ${SDL_LIBRARY} ${LIBNAME}) - SET_PROPERTY(TARGET alreverb APPEND PROPERTY INCLUDE_DIRECTORIES ${SDL_INCLUDE_DIR} + TARGET_LINK_LIBRARIES(alreverb ex-common ${SDL_SOUND_LIBRARIES} ${SDL2_LIBRARY} ${LIBNAME}) + SET_PROPERTY(TARGET alreverb APPEND PROPERTY INCLUDE_DIRECTORIES ${SDL2_INCLUDE_DIR} ${SDL_SOUND_INCLUDE_DIR}) ADD_EXECUTABLE(allatency examples/allatency.c) - TARGET_LINK_LIBRARIES(allatency ex-common ${SDL_SOUND_LIBRARIES} ${SDL_LIBRARY} ${LIBNAME}) - SET_PROPERTY(TARGET allatency APPEND PROPERTY INCLUDE_DIRECTORIES ${SDL_INCLUDE_DIR} + TARGET_LINK_LIBRARIES(allatency ex-common ${SDL_SOUND_LIBRARIES} ${SDL2_LIBRARY} ${LIBNAME}) + SET_PROPERTY(TARGET allatency APPEND PROPERTY INCLUDE_DIRECTORIES ${SDL2_INCLUDE_DIR} ${SDL_SOUND_INCLUDE_DIR}) ADD_EXECUTABLE(alloopback examples/alloopback.c) - TARGET_LINK_LIBRARIES(alloopback ex-common ${SDL_SOUND_LIBRARIES} ${SDL_LIBRARY} ${LIBNAME}) - SET_PROPERTY(TARGET alloopback APPEND PROPERTY INCLUDE_DIRECTORIES ${SDL_INCLUDE_DIR} + TARGET_LINK_LIBRARIES(alloopback ex-common ${SDL_SOUND_LIBRARIES} ${SDL2_LIBRARY} ${LIBNAME}) + SET_PROPERTY(TARGET alloopback APPEND PROPERTY INCLUDE_DIRECTORIES ${SDL2_INCLUDE_DIR} ${SDL_SOUND_INCLUDE_DIR}) IF(ALSOFT_INSTALL) @@ -1239,10 +1236,6 @@ IF(ALSOFT_EXAMPLES) ) ENDIF() - MESSAGE(STATUS "Building SDL example programs") - ENDIF() - - IF(SDL2_FOUND) SET(FFVER_OK FALSE) IF(FFMPEG_FOUND) SET(FFVER_OK TRUE) @@ -1269,7 +1262,7 @@ IF(ALSOFT_EXAMPLES) ENDIF() IF(FFVER_OK AND NOT MSVC) ADD_EXECUTABLE(alffplay examples/alffplay.c) - TARGET_LINK_LIBRARIES(alffplay common ${SDL2_LIBRARY} ${LIBNAME} ${FFMPEG_LIBRARIES}) + TARGET_LINK_LIBRARIES(alffplay common ex-common ${SDL2_LIBRARY} ${LIBNAME} ${FFMPEG_LIBRARIES}) SET_PROPERTY(TARGET alffplay APPEND PROPERTY INCLUDE_DIRECTORIES ${SDL2_INCLUDE_DIR} ${FFMPEG_INCLUDE_DIRS}) @@ -1280,8 +1273,10 @@ IF(ALSOFT_EXAMPLES) ARCHIVE DESTINATION "lib${LIB_SUFFIX}" ) ENDIF() - MESSAGE(STATUS "Building FFmpeg example programs") + MESSAGE(STATUS "Building SDL and FFmpeg example programs") + ELSE() + MESSAGE(STATUS "Building SDL example programs") ENDIF() + MESSAGE(STATUS "") ENDIF() - MESSAGE(STATUS "") ENDIF() |