Skip to content
This repository has been archived by the owner on Mar 10, 2020. It is now read-only.

Commit

Permalink
Update cmake
Browse files Browse the repository at this point in the history
  • Loading branch information
Pawel Stanek committed Apr 17, 2019
1 parent 1a4b981 commit ce798eb
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 93 deletions.
20 changes: 11 additions & 9 deletions CMakeLists.txt
@@ -1,15 +1,17 @@
cmake_minimum_required(VERSION 3.7)
cmake_minimum_required(VERSION 3.3)

project(Widevine)

find_package(WPEFramework)

include(${CMAKE_SYSROOT}/usr/include/cmake/WPEFramework.cmake)
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")

set(PLUGIN_NAME Widevine)
set(MODULE_NAME ${NAMESPACE}${PLUGIN_NAME})

message("Setting up ${PLUGIN_NAME}")
set(MODULE_NAME WPEFramework${PLUGIN_NAME})

# This contains all kinds of plugins (publicely available, so they all need the plugin support library !!
find_package(Plugins REQUIRED)

find_package(${NAMESPACE}Core REQUIRED)
find_package(WideVine REQUIRED)

set(PLUGIN_SOURCES
Expand All @@ -19,11 +21,11 @@ set(PLUGIN_SOURCES
MediaSystem.cpp)

# add the library
add_library(${PLUGIN_NAME} SHARED ${PLUGIN_SOURCES} ${WIDEVINE_LIBRARIES})
add_library(${PLUGIN_NAME} SHARED ${PLUGIN_SOURCES})
target_compile_definitions(${PLUGIN_NAME} PRIVATE ${WIDEVINE_FLAGS})
target_include_directories(${PLUGIN_NAME} PRIVATE ${PLUGINS_INCLUDE_DIR} ${WIDEVINE_INCLUDE_DIRS})
target_link_libraries(${PLUGIN_NAME} ${PLUGIN_LIBS})
target_link_libraries(${PLUGIN_NAME} PRIVATE ${PLUGIN_LIBS} ${NAMESPACE}Core::${NAMESPACE}Core ${WIDEVINE_LIBRARIES})
set_target_properties(${PLUGIN_NAME} PROPERTIES SUFFIX ".drm")
set_target_properties(${PLUGIN_NAME} PROPERTIES PREFIX "")

install(TARGETS ${PLUGIN_NAME} DESTINATION ${CMAKE_INSTALL_PREFIX}/share/WPEFramework/OCDM)
install(TARGETS ${PLUGIN_NAME} DESTINATION ${CMAKE_INSTALL_PREFIX}/share/${NAMESPACE}/OCDM)
2 changes: 0 additions & 2 deletions MediaSystem.cpp
Expand Up @@ -70,8 +70,6 @@ class WideVine : public IMediaKeys, public widevine::Cdm::IEventListener
}
}
virtual ~WideVine() {
assert (_mediaKeySession == nullptr);

_adminLock.Lock();

SessionMap::iterator index (_sessions.begin());
Expand Down
82 changes: 0 additions & 82 deletions cmake/FindWPEFramework.cmake

This file was deleted.

0 comments on commit ce798eb

Please sign in to comment.