Merge branch 'master' into devel
This commit is contained in:
@@ -29,6 +29,7 @@ OPTION( USE_FERVOR "Add Fervor support" OFF )
|
||||
OPTION( USE_WERROR "Warnings as errors" OFF )
|
||||
OPTION( USE_QT4 "Build with Qt4" OFF )
|
||||
OPTION( USE_QTDBUS "Build with Qt4" OFF )
|
||||
OPTION( USE_DYNLOAD "Use dynamic load of modules" ON )
|
||||
# To be switched on when releasing.
|
||||
OPTION(RELEASE_BUILD "Remove Git revision from program version (use for stable releases)" ON)
|
||||
|
||||
|
||||
@@ -19,6 +19,8 @@ SET(QT_DIR "QT-Dir" CACHE PATH "Where to find QT Lib on Windows")
|
||||
SET(QT_DLL_POSTFIX "" CACHE STRING "Postfix to dll's name for debug" )
|
||||
SET(CMAKE_PREFIX_PATH "${CMAKE_PREFIX_PATH} ${QT_DIR}" )
|
||||
|
||||
SET(WINDLLIB "Dl-location" CACHE PATH "Where to find DL Lib on Windows")
|
||||
|
||||
|
||||
IF( NOT USE_QT4 )
|
||||
INSTALL(FILES ${QT_DIR}/bin/Qt5Core${QT_DLL_POSTFIX}.dll DESTINATION bin )
|
||||
|
||||
@@ -51,6 +51,9 @@
|
||||
/* QtDBus */
|
||||
#cmakedefine USE_QTDBUS
|
||||
|
||||
/* Dynamic Modules Loading */
|
||||
#cmakedefine USE_DYNLOAD
|
||||
|
||||
#cmakedefine PLAYUVER_THREADED_MODULES
|
||||
|
||||
/* Boost support */
|
||||
|
||||
+5
-1
@@ -47,7 +47,11 @@ set(plaYUver_Lib_HEADERS
|
||||
|
||||
CONFIGURE_FILE( PlaYUVerConfig.cmake.in PlaYUVerConfig.cmake @ONLY)
|
||||
|
||||
ADD_LIBRARY( PlaYUVerLib SHARED ${plaYUver_Lib_SRCS} )
|
||||
IF( WIN32 )
|
||||
ADD_LIBRARY( PlaYUVerLib STATIC ${plaYUver_Lib_SRCS} )
|
||||
ELSE()
|
||||
ADD_LIBRARY( PlaYUVerLib SHARED ${plaYUver_Lib_SRCS} )
|
||||
ENDIF()
|
||||
|
||||
INCLUDE_DIRECTORIES( ${FFMPEG_INCLUDE_DIRS} ${OpenCV_INCLUDE_DIRS} )
|
||||
TARGET_LINK_LIBRARIES( PlaYUVerLib ${FFMPEG_LIBRARIES} ${OpenCV_LIBRARIES} )
|
||||
|
||||
@@ -56,4 +56,3 @@ file( APPEND ${CMAKE_CURRENT_BINARY_DIR}/ModulesListHeader.h "#endif // __MODU
|
||||
INCLUDE_DIRECTORIES( ${OpenCV_INCLUDE_DIRS} )
|
||||
ADD_LIBRARY( PlaYUVerModules ${plaYUver_Mod_SRCS} )
|
||||
TARGET_LINK_LIBRARIES( PlaYUVerModules PlaYUVerLib ${OpenCV_LIBRARIES} -ldl )
|
||||
|
||||
|
||||
@@ -25,7 +25,9 @@
|
||||
#include "config.h"
|
||||
#include <functional>
|
||||
#include <cstring>
|
||||
#ifdef USE_DYNLOAD
|
||||
#include <dlfcn.h>
|
||||
#endif
|
||||
#include "PlaYUVerModuleFactory.h"
|
||||
#include "ModulesListHeader.h"
|
||||
|
||||
@@ -63,6 +65,7 @@ Void PlaYUVerModuleFactory::Register( const char* moduleName, CreateModuleFn pfn
|
||||
|
||||
Bool PlaYUVerModuleFactory::RegisterDl( const char* dlName )
|
||||
{
|
||||
#ifdef USE_DYNLOAD
|
||||
void *pHndl = dlopen( dlName, RTLD_NOW );
|
||||
if( pHndl == NULL )
|
||||
{
|
||||
@@ -77,6 +80,9 @@ Bool PlaYUVerModuleFactory::RegisterDl( const char* dlName )
|
||||
}
|
||||
Register( dlName, pfnCreate );
|
||||
return true;
|
||||
#else
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
|
||||
PlaYUVerModuleIf *PlaYUVerModuleFactory::CreateModule( const char* moduleName )
|
||||
|
||||
Reference in New Issue
Block a user