Commit 3ab8fa6a authored by Utkarsh Ayachit's avatar Utkarsh Ayachit

BUG: Fixing FFMPEG install rules to install ffmpeg libs correctly (expanding

symlinks and all).
parent 1f21cf0b
......@@ -87,9 +87,9 @@ install_qt_libs("${qtliblist}" BrandedRuntime)
IF (VTK_USE_FFMPEG_ENCODER)
FOREACH(fmpglib avcodec avformat avutil)
IF (FFMPEG_${fmpglib}_LIBRARY)
INSTALL(FILES ${FFMPEG_${fmpglib}_LIBRARY}
DESTINATION ${PV_INSTALL_LIB_DIR}
COMPONENT BrandedRuntime)
pv_install_library(${FFMPEG_${fmpglib}_LIBRARY}
${PV_INSTALL_LIB_DIR}
BrandedRuntime)
ENDIF(FFMPEG_${fmpglib}_LIBRARY)
ENDFOREACH(fmpglib)
ENDIF (VTK_USE_FFMPEG_ENCODER)
......
......@@ -71,6 +71,24 @@ MACRO(pv_set_if_not_set name value)
ENDIF(NOT DEFINED "${name}")
ENDMACRO(pv_set_if_not_set)
#----------------------------------------------------------------------------
# When installing system libraries, on non-windows machines, the CMake variable
# pointing to the library may be a sym-link, in which case we don't simply want
# to install the symlink, but the actual library. This macro takes care of that.
# Use it for installing system libraries. Call this only on unix boxes.
FUNCTION (pv_install_library libpath dest component)
IF (NOT WIN32)
GET_FILENAME_COMPONENT(dir_tmp ${libpath} PATH)
GET_FILENAME_COMPONENT(name_tmp ${libpath} NAME)
FILE(GLOB lib_list RELATIVE "${QT_LIB_DIR_tmp}" "${libpath}*")
INSTALL(CODE "
MESSAGE(STATUS \"Installing ${name_tmp}\")
EXECUTE_PROCESS (WORKING_DIRECTORY ${dir_tmp}
COMMAND tar c ${lib_list}
COMMAND tar -xC \${CMAKE_INSTALL_PREFIX}/${dest})
" COMPONENT ${component})
ENDIF (NOT WIN32)
ENDFUNCTION (pv_install_library)
#----------------------------------------------------------------------------
# Function for adding an executable with support for shared forwarding.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment