vcpkg/ports/smpeg2/CMakeLists.txt

59 lines
1.4 KiB
CMake
Raw Normal View History

2016-12-20 22:17:24 +08:00
cmake_minimum_required(VERSION 2.6)
2017-07-21 19:01:00 +08:00
project(SMPEG2 CXX)
2016-12-20 22:17:24 +08:00
find_path(SDL_INCLUDE_DIR SDL2/SDL.h)
2017-10-22 09:38:40 +08:00
find_library(SDL_LIBRARY NAMES SDL2d SDL2)
2016-12-20 22:17:24 +08:00
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)
2017-07-21 19:01:00 +08:00
set_target_properties(smpeg2 PROPERTIES DEFINE_SYMBOL SDL2_EXPORTS)
2016-12-20 22:17:24 +08:00
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})