forked from RSATom/ya-libvlc-wrapper
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
29 lines (24 loc) · 910 Bytes
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
cmake_minimum_required( VERSION 2.8.11 )
if( NOT MSVC )
add_definitions( -std=c++11 )
endif()
file( GLOB SOURCE_FILES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
[^.]*.cpp
[^.]*.h
)
add_library( libvlc_wrapper STATIC ${SOURCE_FILES} )
set_target_properties( libvlc_wrapper PROPERTIES POSITION_INDEPENDENT_CODE ON )
target_include_directories( libvlc_wrapper PUBLIC "libvlc-sdk/include" )
if( MSVC AND CMAKE_SIZEOF_VOID_P EQUAL 8 )
find_library( LIBVLC_LIBRARY NAMES libvlc.x64
HINTS "$ENV{LIBVLC_LIBRARY_PATH}"
"${CMAKE_CURRENT_SOURCE_DIR}/libvlc-sdk/lib/msvc/"
)
else()
find_library( LIBVLC_LIBRARY NAMES vlc libvlc
HINTS "$ENV{LIBVLC_LIBRARY_PATH}"
"${CMAKE_CURRENT_SOURCE_DIR}/libvlc-sdk/lib/msvc/"
PATHS "/Applications/VLC.app/Contents/MacOS/lib"
)
endif()
target_link_libraries( libvlc_wrapper ${LIBVLC_LIBRARY} )