mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-23 16:27:51 +08:00
8641dfd9dd
* some libraries export <PackageName>LibraryDepends.cmake instead of <PackageName>Targets.cmake. Those file also need the fix of #1044 should close #4753 * prefered the general solution #4622. hopefully solved the issue within #4150 replaced the regex with something more readable (also ident is lost) should close: #4753 #4633 #4150 and maybe more * Hash vcpkg_fixup_cmake_targets.cmake * [boost] Fix use of find_package(Boost) with cache variables [socket-io-client] Fix install * reversed change back to use regex replace * [glbinding] Fix _IMPORT_PREFIX depth in *-export.cmake files * [tinyspline] Ignore warnings treated as errors * [libevent, liblemon, libpng, smpeg2, zlib] Fix apply patches * [libsodium] Fix apply patches * [folly] Link correct libraries in debug and release * [vtk] Remove unset of _IMPORT_PREFIX * [tinyspline] Do not treat warnings as errors * [smpeg2] Fix double* to int comparison * [nvtt] Define value for HAVE_UNISTD_H in MacOS * [libui] Fix MacOS X build * [zlib] Fix download URL * [qhull] Update to v7.2.1 * [podofo] Set value for HAVE_UNISTD_H in MacOS * [mongo-cxx-driver,ogre,podofo,qhull] Bump CONTROL version * [mongo-c-driver] Set _IMPORT_PREFIX * [tmxparser] Bump CONTROL version * [qhull,vxl] Bump CONTROL version
62 lines
1.5 KiB
CMake
62 lines
1.5 KiB
CMake
cmake_minimum_required(VERSION 2.6)
|
|
project(SMPEG2 CXX)
|
|
|
|
find_path(SDL_INCLUDE_DIR SDL2/SDL.h)
|
|
find_library(SDL_LIBRARY NAMES SDL2d SDL2)
|
|
|
|
include_directories(${SDL_INCLUDE_DIR})
|
|
include_directories(${SDL_INCLUDE_DIR}/SDL2)
|
|
include_directories(${CMAKE_SOURCE_DIR})
|
|
|
|
if(MSVC)
|
|
add_definitions(-D_CRT_SECURE_NO_WARNINGS)
|
|
endif()
|
|
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)
|
|
|
|
set_target_properties(smpeg2 PROPERTIES DEFINE_SYMBOL SDL2_EXPORTS)
|
|
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})
|