Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support system distro version of exiv2 0.28 with includes C++17 support #878

Merged
merged 3 commits into from
Mar 22, 2024
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
11 changes: 7 additions & 4 deletions cmake/externallibs/FindOrBuildExiv2.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,16 @@
#
# A comment from 2023-01-18 in a github Exiv issue #2406 discussing releases:
#
# Dear folks, Exiv2 v0.27.6 has been released! I'll start working on the v1.0.0
# major release based on 9ca161d.
# Dear folks, Exiv2 v0.27.6 has been released! I'll start working on the v1.0.0
# major release based on 9ca161d.
#
# However, Exiv2 v0.28 was released with C++17 support included, so we can use
# that version if the distro includes it.
#
function(find_or_build_exiv2)
pkg_check_modules(EXIV2 "exiv2>=1.0" QUIET IMPORTED_TARGET)
pkg_check_modules(EXIV2 "exiv2>=0.28" QUIET IMPORTED_TARGET)
if(NOT EXIV2_FOUND)
pkg_check_modules(EXIV2 "mythexiv2>=0.99" QUIET IMPORTED_TARGET)
pkg_check_modules(EXIV2 "mythexiv2>=0.28" QUIET IMPORTED_TARGET)
endif()
if(TARGET PkgConfig::EXIV2)
message(STATUS "Found Exiv2 ${EXIV2_VERSION} ${EXIV2_LINK_LIBRARIES}")
Expand Down
9 changes: 6 additions & 3 deletions mythtv/cmake/MythFindPackages.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,13 @@ endif()
pkg_check_modules(LIBUDFREAD "libudfread>=1.1.1" REQUIRED IMPORTED_TARGET)

#
# Find an exiv2 that has c++17 support. The current version number is 0.28 and
# the c++17 based version is supposed to be 1.0.
# Find an exiv2 that has c++17 support. The current version number is 0.27 and
# the c++17 based version is supposed to be 1.0 but is included in 0.28
#
pkg_check_modules(EXIV2 "mythexiv2>=0.99" REQUIRED IMPORTED_TARGET)
pkg_check_modules(EXIV2 "exiv2>=0.28" QUIET IMPORTED_TARGET)
if(NOT EXIV2_FOUND)
pkg_check_modules(EXIV2 "mythexiv2>=0.28" REQUIRED IMPORTED_TARGET)
endif()

#
# If not provided by the system, this is currently built as part of mythtv (not
Expand Down
2 changes: 1 addition & 1 deletion mythtv/configure
Original file line number Diff line number Diff line change
Expand Up @@ -5435,7 +5435,7 @@ enabled libudev && check_lib udev libudev.h udev_new -ludev || disable libudev

# libexiv2
if enabled system_libexiv2 ; then
if $(pkg-config --atleast-version="0.99" exiv2); then
if $(pkg-config --atleast-version="0.28" exiv2); then
use_pkg_config exiv2 exiv2 exiv2/exiv2.hpp versionNumber
elif [ $target_os != "android" ] ; then
disable system_libexiv2
Expand Down
2 changes: 1 addition & 1 deletion mythtv/external/external.pro
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ win32-msvc* {

# Libraries without dependencies

!using_system_exiv2: SUBDIRS += libexiv2
!using_system_libexiv2: SUBDIRS += libexiv2
!using_system_libbluray: SUBDIRS += libmythbluray
SUBDIRS += libmythdvdnav
!using_system_libudfread: SUBDIRS += libudfread
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ LIBS += -L../../../../external/FFmpeg/libpostproc -lmythpostproc
LIBS += -L../.. -lmythmetadata-$$LIBVERSION


using_system_exiv2 {
using_system_libexiv2 {
LIBS += -lexiv2
} else {
LIBS += -L../../../../external/libexiv2 -lmythexiv2-0.28
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ LIBS += -L../../../../external/FFmpeg/libpostproc -lmythpostproc
LIBS += -L../.. -lmythmetadata-$$LIBVERSION


using_system_exiv2 {
using_system_libexiv2 {
LIBS += -lexiv2
} else {
LIBS += -L../../../../external/libexiv2 -lmythexiv2-0.28
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ LIBS += -L../../../../external/FFmpeg/libpostproc -lmythpostproc
LIBS += -L../.. -lmythmetadata-$$LIBVERSION


using_system_exiv2 {
using_system_libexiv2 {
LIBS += -lexiv2
} else {
LIBS += -L../../../../external/libexiv2 -lmythexiv2-0.28
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ LIBS += -L../../../../external/FFmpeg/libpostproc -lmythpostproc
LIBS += -L../.. -lmythmetadata-$$LIBVERSION


using_system_exiv2 {
using_system_libexiv2 {
LIBS += -lexiv2
} else {
LIBS += -L../../../../external/libexiv2 -lmythexiv2-0.28
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ QMAKE_LFLAGS += -Wl,$$_RPATH_$(PWD)/../../../libmythservicecontracts
QMAKE_LFLAGS += -Wl,$$_RPATH_$(PWD)/../../../libmythtv
QMAKE_LFLAGS += -Wl,$$_RPATH_$(PWD)/../../../libmythfreemheg

!using_system_libexiv {
!using_system_libexiv2 {
LIBS += -L../../../../external/libexiv2 -lmythexiv2-0.28
QMAKE_LFLAGS += -Wl,$$_RPATH_$(PWD)/../../../../external/libexiv2 -lexpat
freebsd: LIBS += -lprocstat -liconv
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ QMAKE_LFLAGS += -Wl,$$_RPATH_$(PWD)/../../../../external/FFmpeg/libpostproc
QMAKE_LFLAGS += -Wl,$$_RPATH_$(PWD)/../../../../external/FFmpeg/libswresample
QMAKE_LFLAGS += -Wl,$$_RPATH_$(PWD)/../../

!using_system_libexiv {
!using_system_libexiv2 {
LIBS += -L../../../../external/libexiv2 -lmythexiv2-0.28
QMAKE_LFLAGS += -Wl,$$_RPATH_$(PWD)/../../../../external/libexiv2 -lexpat
freebsd: LIBS += -lprocstat -liconv
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ QMAKE_LFLAGS += -Wl,$$_RPATH_$(PWD)/../../../../external/FFmpeg/libpostproc
QMAKE_LFLAGS += -Wl,$$_RPATH_$(PWD)/../../../../external/FFmpeg/libswresample
QMAKE_LFLAGS += -Wl,$$_RPATH_$(PWD)/../../

!using_system_libexiv {
!using_system_libexiv2 {
LIBS += -L../../../../external/libexiv2 -lmythexiv2-0.28
QMAKE_LFLAGS += -Wl,$$_RPATH_$(PWD)/../../../../external/libexiv2 -lexpat
freebsd: LIBS += -lprocstat -liconv
Expand Down