Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -187,4 +187,5 @@ src/python/setup.py
src/python/pyproject.toml
src/python/README.md
src/python/librir/libs
install
install
src/cpp/rir_config.h
5 changes: 4 additions & 1 deletion extra/ffmpeg/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,9 @@ set(FFMPEG_CONFIGURE_CMD
export LD_LIBRARY_PATH=${3RD_64_INSTALL_DIR}/lib:$ENV{LD_LIBRARY_PATH} &&
export PKG_CONFIG_PATH=${3RD_64_INSTALL_DIR}/lib/pkgconfig:$ENV{PKG_CONFIG_PATH} &&
export OPENSSL_LIBS="-L/usr/lib64 -llibeay32 -lssleay32 -llibcrypto -luser32 -lgdi32 -lwsock32 -lws2_32" &&
./configure --arch=native --enable-asm --disable-libvpx --disable-libaom --disable-static --enable-shared --enable-libx264 --enable-libkvazaar --extra-cflags=-DKVZ_STATIC_LIB --enable-gpl --enable-rpath --enable-pic --disable-debug)
export LDSOFLAGS="-Wl,-rpath,\\\$$\\$$$$ORIGIN" && # This monstruosity is due to makefile substitions in ffmpeg configure
# export LDEXEFLAGS=-Wl,-rpath,\''$$ORIGIN/../lib'\' &&
./configure --arch=native --enable-asm --disable-libvpx --disable-libaom --disable-static --enable-shared --enable-libx264 --enable-libkvazaar --extra-cflags=-DKVZ_STATIC_LIB --enable-gpl --enable-pic --disable-debug)

ExternalProject_Add(ffmpeg
SOURCE_DIR ${CMAKE_BINARY_DIR}/_deps/ffmpeg-src
Expand Down Expand Up @@ -200,6 +202,7 @@ set(FFMPEG_SHARED_LIBRARIES)

foreach(component version IN ZIP_LISTS REQUIRED_FFMPEG_COMPONENTS FFMPEG_SHARED_LIBRARIES_VERSIONS)
add_library("FFMPEG::lib${component}" SHARED IMPORTED GLOBAL)
set_target_properties("FFMPEG::lib${component}" PROPERTIES INSTALL_RPATH "$ORIGIN")
add_dependencies("FFMPEG::lib${component}" ffmpeg)

set(${component}_LIBRARY_NAME lib${component}.so)
Expand Down
9 changes: 8 additions & 1 deletion src/python/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -110,4 +110,11 @@ if(PIP_EXECUTABLE AND BUILD_WHEEL)
install(CODE "execute_process(COMMAND ${PIP_EXECUTABLE} wheel ${CMAKE_CURRENT_SOURCE_DIR} -w ${CMAKE_INSTALL_PREFIX}/dist --no-deps)")
endif()

# add_custom_command()
# On Linux plateforms:
# Copy west shared libs to python/librir_west/libs with links, at it is not properly done by cmake install
if(UNIX AND NOT APPLE)
install(CODE "execute_process(COMMAND cp --verbose -a ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}/libtools.so.${CMAKE_PROJECT_VERSION} ${CMAKE_INSTALL_PREFIX}/python/librir/libs/)")
install(CODE "execute_process(COMMAND cp --verbose -a ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}/libgeometry.so.${CMAKE_PROJECT_VERSION} ${CMAKE_INSTALL_PREFIX}/python/librir/libs/)")
install(CODE "execute_process(COMMAND cp --verbose -a ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}/libsignal_processing.so.${CMAKE_PROJECT_VERSION} ${CMAKE_INSTALL_PREFIX}/python/librir/libs/)")
install(CODE "execute_process(COMMAND cp --verbose -a ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}/libvideo_io.so.${CMAKE_PROJECT_VERSION} ${CMAKE_INSTALL_PREFIX}/python/librir/libs/)")
endif()