mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-25 06:59:01 +08:00
58 lines
1.3 KiB
CMake
58 lines
1.3 KiB
CMake
cmake_minimum_required(VERSION 2.6)
|
|
project(SMPEG2)
|
|
|
|
find_path(SDL_INCLUDE_DIR SDL2/SDL.h)
|
|
find_library(SDL_LIBRARY SDL2)
|
|
|
|
include_directories(${SDL_INCLUDE_DIR})
|
|
include_directories(${SDL_INCLUDE_DIR}/SDL2)
|
|
include_directories(${CMAKE_SOURCE_DIR})
|
|
|
|
add_definitions(-DNOCONTROLS -DTHREADED_AUDIO)
|
|
|
|
# some c++ code just assumes memset is available
|
|
file(WRITE ${CMAKE_SOURCE_DIR}/declare_memset.h "#include <string.h>\n")
|
|
add_definitions(-FIdeclare_memset.h)
|
|
|
|
add_library(smpeg2
|
|
audio/bitwindow.cpp
|
|
audio/filter.cpp
|
|
audio/filter_2.cpp
|
|
audio/hufftable.cpp
|
|
audio/mpeglayer1.cpp
|
|
audio/mpeglayer2.cpp
|
|
audio/mpeglayer3.cpp
|
|
audio/mpegtable.cpp
|
|
audio/mpegtoraw.cpp
|
|
audio/MPEGaudio.cpp
|
|
video/decoders.cpp
|
|
video/floatdct.cpp
|
|
video/gdith.cpp
|
|
video/jrevdct.cpp
|
|
video/motionvec.cpp
|
|
video/parseblock.cpp
|
|
video/readfile.cpp
|
|
video/util.cpp
|
|
video/video.cpp
|
|
video/MPEGvideo.cpp
|
|
MPEG.cpp
|
|
MPEGlist.cpp
|
|
MPEGring.cpp
|
|
MPEGstream.cpp
|
|
MPEGsystem.cpp
|
|
smpeg.cpp)
|
|
|
|
target_link_libraries(smpeg2 ${SDL_LIBRARY})
|
|
|
|
install(TARGETS smpeg2
|
|
RUNTIME DESTINATION bin
|
|
ARCHIVE DESTINATION lib
|
|
LIBRARY DESTINATION lib)
|
|
|
|
if(NOT DEFINED SMPEG_SKIP_HEADERS)
|
|
install(FILES smpeg.h MPEGframe.h DESTINATION include)
|
|
endif()
|
|
|
|
message(STATUS "Link-time dependencies:")
|
|
message(STATUS " " ${SDL_LIBRARY})
|