Commit Graph

117 Commits

Author SHA1 Message Date
David Korth
bdaa74058a [cmake] CheckPugiXML.cmake: PugiXML 1.10 doesn't define the alias target "pugixml::pugixml".
From Ubuntu Launchpad:

CMake Error at src/libromdata/CMakeLists.txt:488 (ADD_LIBRARY):
  Target "romdata" links to target "pugixml::pugixml" but the target was not
  found.  Perhaps a find_package() call is missing for an IMPORTED target, or
  an ALIAS target is missing?

(cherry picked from commit 5481b385f5)
2025-04-20 04:11:50 -04:00
David Korth
49263c07cc [cmake] CheckPugiXML.cmake: Use FIND_LIBRARY() if FIND_PACKAGE() fails.
Some older versions, e.g. 1.7-2 (Ubuntu 16.04), lack both pkgconfig and
CMake files. Use FIND_LIBRARY() as a fallback.
2025-04-11 18:28:24 -04:00
Cameron Cawley
e361e653bc Link internal libraries statically on Mac OS X 2025-04-03 11:01:51 +01:00
David Korth
5538794477 Missed a few TinyXML2 remnants. Updated for PugiXML. 2025-04-02 00:19:34 -04:00
David Korth
55f86d1158 Add an internal copy of PugiXML and remove TinyXML2 completely.
TODO:
- Add the 'd' postfix to the debug DLL.
- Configure PugiXML options and hide them from the user, since these are
  configured by rom-properties.
2025-04-01 19:19:20 -04:00
David Korth
7960595158 [zstd] Update: 1.5.6 -> 1.5.7 2025-02-19 22:07:44 -05:00
David Korth
eb3109bebb [cmake] CheckLibfmt.cmake: Update Fmt_VERSION: 11.1.2 -> 11.1.3 2025-02-17 20:41:13 -05:00
David Korth
84163ba5d5 [cmake] CheckLibfmt.cmake: Only remove FMT_SHARED if fmt::fmt is a valid target.
If the internal libfmt is used, it might not be a valid target.

This fixes a regression from commit 06f2f46655.
([cmake] CheckLibfmt.cmake: Remove FMT_SHARED from INTERFACE_COMPILE_DEFINITIONS.)
2025-02-17 20:38:47 -05:00
David Korth
06f2f46655 [cmake] CheckLibfmt.cmake: Remove FMT_SHARED from INTERFACE_COMPILE_DEFINITIONS.
This causes parts of `class format_error` to be exported from
libromdata.so, which could result in multiple definitions:

V typeinfo for fmt::v11::format_error
V typeinfo name for fmt::v11::format_error
V vtable for fmt::v11::format_error

NOTE: Not needed for Win32.
2025-02-17 19:37:05 -05:00
David Korth
02a55c2dad [libfmt] Require libfmt-7.1.0 or later in order to use a system-wide version.
- libfmt-6.2.0: Introduced the 'L' format specifier.
  - Previously, 'n' was available.
  - The 'L' specifier matches C++20 std::format().
- libfmt-7.0.x: Has fixes for the 'L' format specifier; removed 'n'.
  - 'n' can be re-enabled with FMT_DEPRECATED_N_SPECIFIER.
- libfmt-7.1.0: Has more fixes for the 'L' format specifier.
- libfmt-8.0.0: Removes the 'n' format specifier entirely.

Since we use the 'L' specifier, we will set a minimum of libfmt-7.1.0.
Ubuntu 20.04 has libfmt-6.1.2; Ubuntu 22.04 has libfmt-8.1.1.
Also, Ubuntu 20.04's libfmt is a static library. It was changed
to a shared library sometime between 20.04 and 22.04.

rp-libfmt.h: Removed macros for compatibility with versions of libfmt
older than 7.1.0.
2025-01-23 23:59:38 -05:00
David Korth
37b0c326d0 [cmake] CheckLibfmt.cmake: Remove trailing newline. 2025-01-23 00:47:20 -05:00
David Korth
b11f9fa4c2 [libfmt] Build as a DLL on Windows and Mac OS X.
This significantly reduces the total size. fmt-11.dll's Release build
size is 128 KiB, and it cuts between 16-64 KiB from binaries that use it.

Total size of EXEs and DLLs, with amiiboc.exe and libgnuintl-8.dll,
but without test executables or PDBs:
[MSVC 2022 v17.6.5, Release build]

- Total size of EXEs and DLLs with header-only: 4,332,032
- Total size of EXEs and DLLs with fmt-11.dll:  4,161,536
- Difference:                                    -170,496

With test executables:

- Total size of EXEs and DLLs with header-only: 9,716,224
- Total size of EXEs and DLLs with fmt-11.dll:  7,907,840
- Difference:                                  -1,808,384

TODO: Add Delay-Load checks for fmt-11.dll to e.g. rpcli and the
Win32 UI frontend. (amiiboc and unit tests don't need it.)
2025-01-23 00:36:34 -05:00
David Korth
fa932de93f [libfmt] Add an internal copy of libfmt-11.1.2.
Currently used as a header-only build. Will eventually be changed to
build a DLL for Windows and Mac OS X.

Other changes needed to get the Windows version to build with libfmt:

Add #include <fmt/xchar.h> to some files for full wchar_t support
in libfmt. Otherwise, errors like this appear:

src\amiibo-data\amiiboc.cpp(175,8): error C2665: 'fmt::v11::print': no overloaded function could convert all the argument types
extlib\libfmt\include\fmt\base.h(2925,17): message : could be 'void fmt::v11::print<TCHAR*&>(FILE *,fmt::v11::fstring<TCHAR *&>,TCHAR *&)'
src\amiibo-data\amiiboc.cpp(175,8): message : 'void fmt::v11::print<TCHAR*&>(FILE *,fmt::v11::fstring<TCHAR *&>,TCHAR *&)': cannot convert argument 2 from 'wmain::<lambda_1>::()::FMT_COMPILE_STRING' to 'fmt::v11::fstring<TCHAR *&>'
src\amiibo-data\amiiboc.cpp(175,22): message : No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called
extlib\libfmt\include\fmt\base.h(2908,17): message : or       'void fmt::v11::print<wmain::<lambda_1>::()::FMT_COMPILE_STRING,TCHAR*&>(fmt::v11::fstring<wmain::<lambda_1>::()::FMT_COMPILE_STRING,TCHAR *&>,wmain::<lambda_1>::()::FMT_COMPILE_STRING &&,TCHAR *&)'
src\amiibo-data\amiiboc.cpp(175,8): message : 'void fmt::v11::print<wmain::<lambda_1>::()::FMT_COMPILE_STRING,TCHAR*&>(fmt::v11::fstring<wmain::<lambda_1>::()::FMT_COMPILE_STRING,TCHAR *&>,wmain::<lambda_1>::()::FMT_COMPILE_STRING &&,TCHAR *&)': cannot convert argument 1 from 'FILE *' to 'fmt::v11::fstring<wmain::<lambda_1>::()::FMT_COMPILE_STRING,TCHAR *&>'
src\amiibo-data\amiiboc.cpp(175,14): message : No constructor could take the source type, or constructor overload resolution was ambiguous
src\amiibo-data\amiiboc.cpp(175,8): message : while trying to match the argument list '(FILE *, wmain::<lambda_1>::()::FMT_COMPILE_STRING, TCHAR *)' [build.vc17_64\src\amiibo-data\amiiboc.vcxproj]

Files modified for xchar.h:
- amiibo-data/amiiboc.cpp
- libromdata/stdafx.h (needed by WiiUPackage)
- libromdata/tests/RomHeaderTest.cpp

NOTE: Only included on Windows. xchar.h was added in libfmt-8.0.0,
which was first added (in Ubuntu LTS releases) in Ubuntu 20.04.
It's not needed on Linux, anyway.

New option USE_INTERNAL_FMT to force the use of the internal copy of
libfmt on Linux, for testing purposes. (...and also for Ubuntu 16.04)
- TODO: Maybe use it on 18.04, etc. for improved performance?
2025-01-21 23:59:20 -05:00
David Korth
64e860f545 [librpbase] Initial switch to libfmt for string formatting.
This will replace printf()-style functions in most cases, and will
replace all uses of rp_sprintf() and related.

NOTE: We need to use FMT_STRING() [which we're abbreviating FSTR] if
compiling without C++20 support; otherwise, string format checking won't
be done. We're not targetting C++20 at the moment.

Also, string format checking can't be done when using gettext. This also
applied to printf(), so it's not a big deal per se.

NOTE: Support for C++-style format strings (std::print) was added in
gettext-0.22, so gettext-0.22 will be required in order to update the
.pot and .po files.

FIXME: libfmt has its own "PACKED" definition, which conflicts with our
own. We should rename our "PACKED" to "RP_PACKED".

TODO: Add an internal copy of libfmt for Windows.
2025-01-21 00:55:40 -05:00
David Korth
22753b9cf5 Clean up some Qt4/KDE4 warnings.
- Enable the "new" automoc policy for KDE4.
  Otherwise, CMake complains because the old policy doesn't run
  automoc on generated sources, e.g. from uic or rcc.
  NOTE: Only on Qt4; CMake doesn't show this for Qt5/Qt6.

- Unset KDE4 variables that are marked "deprecatd" in KF5/KF6.
  Otherwise, if building for both KDE4 and KF5, a lot of deprecated
  variable warnings appear.

- Copy SERVICES_INSTALL_DIR to KDE4_SERVICES_INSTALL_DIR, since it's
  used by the KDE4 UI frontend.
2025-01-18 11:18:39 -05:00
David Korth
6b20b688a8 [cmake] CheckPNG.cmake: Check if the system libpng supports APNG.
If it doesn't, a warning message is displayed.

A CMake variable HAVE_PNG_APNG is set, but it isn't used for anything yet.
2025-01-10 23:46:09 -05:00
David Korth
27833cc8b0 [cmake] RP_FindQt[56]andKF[56].cmake: Revert the KDEInstallDirs change.
It broke the CodeCov and CodeQL builds for some reason.

Also, check for KDEInstallDirs6 for KF6.
KDEInstallDirs is a synonym for KDEInstallDirs5.
2025-01-07 19:55:01 -05:00
David Korth
29ce1c8393 [cmake] RP_FindQt[56]andKF[56].cmake: Use EXECUTE_PROCESS() instead of EXEC_PROGRAM(); comment out KDEInstallDirs.cmake.
EXEC_PROGRAM() is deprecated as of CMake 3.0.

KDEInstallDirs.cmake isn't actually needed and prints warnings due to
some KDE-specific variables not being consistent.

Also remove the "-fpic -fPIC" CFLAGS/CXXFLAGS addition, since we're
handling this using the POSITION_INDEPENDENT_CODE property now.

Warnings from the KF5 version:

CMake Warning (dev) at cmake/libs/RP_FindQt5andKF5.cmake:65 (EXEC_PROGRAM):
  Policy CMP0153 is not set: The exec_program command should not be called.
  Run "cmake --help-policy CMP0153" for policy details.  Use the cmake_policy
  command to set the policy and suppress this warning.

  Use execute_process() instead.
Call Stack (most recent call first):
  src/kde/kf5/CMakeLists.txt:6 (FIND_QT5_AND_KF5)
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning at /usr/share/ECM/kde-modules/KDEInstallDirsCommon.cmake:385 (message):
  KDE_INSTALL_BINDIR, KDE_INSTALL_LIBDIR and KDE_INSTALL_INCLUDEDIR should
  either all be absolute paths or all be relative paths.
Call Stack (most recent call first):
  /usr/share/ECM/kde-modules/KDEInstallDirs5.cmake:230 (include)
  /usr/share/ECM/kde-modules/KDEInstallDirs.cmake:15 (include)
  cmake/libs/RP_FindQt5andKF5.cmake:26 (INCLUDE)
  src/kde/kf5/CMakeLists.txt:6 (FIND_QT5_AND_KF5)
2025-01-06 23:37:46 -05:00
David Korth
9d5fb091d1 [cmake] RP_FindQt4andKDE4.cmake: Preserve the config-specific CFLAGS/CXXFLAGS variables.
KDE4's CMake files overwrite these variables with its own flags, which
breaks the debug build due to the use of GLIBCXX debug iterators:

[ 52%] Linking CXX shared module ../../../lib/rom-properties-kde4.so
CMakeFiles/rom-properties-kde4.dir/__/rp_create_thumbnail.cpp.o: In function `rp_create_thumbnail2':
src/kde/rp_create_thumbnail.cpp:194: undefined reference to `LibRpBase::RpPngWriter::write_tEXt(std::vector<std::pair<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > > const&)'
CMakeFiles/rom-properties-kde4.dir/__/RomDataView.cpp.o: In function `RomDataViewPrivate::updateMulti(unsigned int)':
src/kde/RomDataView.cpp:793: undefined reference to `LibRpBase::RomFields::getFromStringMulti(std::map<unsigned int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::less<unsigned int>, std::allocator<std::pair<unsigned int const, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > > const*, unsigned int, unsigned int)'
CMakeFiles/rom-properties-kde4.dir/__/RomDataView.cpp.o: In function `RomDataViewPrivate::initAgeRatings(QLabel*, LibRpBase::RomFields::Field const&)':
src/kde/RomDataView.cpp:719: undefined reference to `LibRpBase::RomFields::ageRatingsDecode[abi:cxx11](std::array<unsigned short, 16u> const*, bool)'
CMakeFiles/rom-properties-kde4.dir/__/config/CacheCleaner.cpp.o: In function `CacheCleaner::run()':
src/kde/config/CacheCleaner.cpp:98: undefined reference to `LibRpFile::recursiveScan(char const*, std::forward_list<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, unsigned char>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, unsigned char> > >&)'
collect2: error: ld returned 1 exit status
src/kde/kde4/CMakeFiles/rom-properties-kde4.dir/build.make:1357: recipe for target 'lib/rom-properties-kde4.so' failed

The debug build now uses std::debug:: variants of the containers, so we
need to preserve the GLIBCXX defines properly.
2025-01-05 14:21:39 -05:00
David Korth
e264415bcc [cmake] Fix Qt6 CMake build system issues on Ubuntu 24.10.
- Set QT_NO_CREATE_VERSIONLESS_TARGETS to disable Qt::Core. Otherwise,
  CMake ends up trying to create Qt::Core twice, even when building for
  KF6 only and not KF5+KF6:

CMake Error at /usr/lib/x86_64-linux-gnu/cmake/Qt6Core/Qt6CoreVersionlessTargets.cmake:42 (message):
  Some (but not all) targets in this export set were already defined.

  Targets Defined: Qt::Core

  Targets not yet defined: Qt::CorePrivate

Call Stack (most recent call first):
  /usr/lib/x86_64-linux-gnu/cmake/Qt6Core/Qt6CoreConfig.cmake:68 (include)
  /usr/lib/x86_64-linux-gnu/cmake/Qt6/Qt6Config.cmake:174 (find_package)
  cmake/libs/RP_FindQt6andKF6.cmake:34 (FIND_PACKAGE)
  src/kde/kf6/CMakeLists.txt:6 (FIND_QT6_AND_KF6)

- Don't specify the minimum KF6 version, because that's breaking for
  some reason.

-- Could NOT find KF65.248.0 (missing: KF65.248.0_DIR)
-- Could NOT find KF65.248.0: found neither KF65.248.0Config.cmake nor kf65.248.0-config.cmake
CMake Error at /usr/share/cmake-3.30/Modules/FindPackageHandleStandardArgs.cmake:233 (message):
  Could NOT find KF6 (missing: 5.248.0) (found version "6.6.0")
Call Stack (most recent call first):
  /usr/share/cmake-3.30/Modules/FindPackageHandleStandardArgs.cmake:603 (_FPHSA_FAILURE_MESSAGE)
  /usr/share/ECM/find-modules/FindKF6.cmake:93 (find_package_handle_standard_args)
  cmake/libs/RP_FindQt6andKF6.cmake:78 (FIND_PACKAGE)
  src/kde/kf6/CMakeLists.txt:6 (FIND_QT6_AND_KF6)

(cherry picked from commit cb507652cb)

Conflicts:
	debian/changelog
2024-11-12 21:08:21 -05:00
David Korth
e263b35b07 [kde] stub-export.cpp: Set up KAboutData.
TODO: Setting up KCrash would be useful, but DrKonqi shows a button to
report bugs to bugs.kde.org, which doesn't help us.

FIXME: Fix up the KLocalizedString versions for KDE4. (Or remove KDE4...)

[cmake/libs] RP_FindQt?andKF?.cmake: Find KCrash.
2024-11-01 20:42:32 -04:00
kesefon
fe19747bbc
[cmake] Fix qtpaths6 on Arch 2024-11-01 19:47:04 +01:00
David Korth
ee2bcb1ba4 [gtk3] Add a Caja extension description file.
Nemo uses a GObject interface for this, whereas Caja uses a file.

FIXME: Caja shows the same description for both the property page and the
menu extensions. Either figure out a way to disambiguate them, or combine
the two plugins into a single plugin with multiple interfaces.
2024-09-26 21:30:04 -04:00
David Korth
6b01883f1a [cmake] CheckNettle2or3.cmake: Also export NETTLE_FOUND in the PARENT_SCOPE.
NETTLE_FOUND may be used to determine if libnettle should be
linked to other libraries and/or executables.

This fixes a regression from commit 22189ea4db.
([cmake] CheckNettle2or3.cmake: Convert the macro to a function.)
2024-05-17 22:41:47 -04:00
David Korth
1b6d9ad1c6 [cmake] CheckNettle2or3.cmake: Set HAVE_NETTLE locally *and* in PARENT_SCOPE.
Otherwise, encryption will be disabled, even if Nettle is available.

This fixes a regression from commit 22189ea4db.
([cmake] CheckNettle2or3.cmake: Convert the macro to a function.)
2024-05-17 22:36:17 -04:00
David Korth
22189ea4db [cmake] CheckNettle2or3.cmake: Convert the macro to a function.
Set HAVE_NETTLE in PARENT_SCOPE.

(copied over from rvthtool)
2024-04-26 21:28:20 -04:00
David Korth
288375ab44 [zstd] Update: 1.5.5 -> 1.5.6
CheckZSTD.cmake: Update the version number here, too.
2024-03-30 12:16:26 -04:00
David Korth
de43b12882 [tracker] Add support for tracker-3.0.
Besides the filename and path changes, these changes were needed:

- Tracker 3.3.0-alpha added a function tracker_file_get_content_identifier(),
  which is used for the content identifier. I'm only calling this function
  if we're using API version 3. (TODO: Only for 3.3.0 or later, maybe.)

- tracker_file_get_content_identifier() is part of libtracker-miners-common,
  which is statically linked into every extractor. As such, we can't simply
  dlsym() the function from libtracker_extract. (We *could* get it from one
  of the existing extractors, since they're exporting all of the symbols,
  but that's an implementation detail that could change later.)

- tracker-file-utils.c implements tracker_file_get_content_identifier().
  This file requires libblkid and (optionally) BTRFS_IOC_INO_LOOKUP.
  CMakeLists.txt now checks for those and links in libblkid.

- Add libblkid to other relevant files, plus FindBlkid.cmake.

- Rename the .rule files to 14- so they take precedence over tracker-3's
  own 15-executable.rule and 15-games.rule.
2024-03-29 22:53:45 -04:00
David Korth
f40455435a [cmake] RP_FindQt?andKF?.cmake: Preserve CMAKE_INSTALL_LIBDIR.
On my system, which has Thunar GTK3 but not GTK2, this was causing
libunixcommon's default GTK2 plugin search to look at:

/usr//usr/lib/thunarx-2/rom-properties-xfce.so

The correct path on here is:

/usr/lib64/thunarx-2/rom-properties-xfce.so

For some reason, something in KF5 and/or KF6's CMake modules (or maybe
part of ECM?) is setting CMAKE_INSTALL_LIBDIR=/usr/lib, which results
in the full path being /usr//usr/lib. That's obviously wrong.

Preserve CMAKE_INSTALL_LIBDIR before and after to ensure that it isn't
messed up by the KF5/KF6 CMake modules.

TODO: Convert RP_FindQt?andKF?.cmake into functions?
2024-03-16 12:36:07 -04:00
David Korth
2c048e39dd [cmake] FindIconv.cmake: Add return 0; to the test code.
gcc.cmake sets `-Werror=return-type`, which breaks FindIconv.cmake's
test code. Strangely, this is only causing problems when testing with
my Debian 8 PowerPC VM...

Performing C SOURCE FILE Test Iconv_IS_BUILT_IN failed with the following output:
Change Dir: build/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/ninja" "cmTC_3ad47"
[1/2] Building C object CMakeFiles/cmTC_3ad47.dir/src.c.o
FAILED: /usr/bin/cc    -Wall -Wextra -Wno-multichar -Werror=return-type
	-Werror=format -fstrict-aliasing -Werror=strict-aliasing -fno-common
	-fno-math-errno -Werror=implicit-function-declaration -fstack-protector-strong
	-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE
	-include build/src/config.libc.h -include src/compiler-compat.h
	-DIconv_IS_BUILT_IN -o CMakeFiles/cmTC_3ad47.dir/src.c.o   -c src.c
src.c: In function ‘main’:
src.c:11:7: error: control reaches end of non-void function [-Werror=return-type]
       }
       ^
cc1: some warnings being treated as errors
ninja: build stopped: subcommand failed.

Source file was:

.     #include <stddef.h>
.     #include <iconv.h>
      int main() {
        char *a, *b;
        size_t i, j;
        iconv_t ic;
        ic = iconv_open("to", "from");
        iconv(ic, &a, &i, &b, &j);
        iconv_close(ic);
      }
2024-03-10 01:14:13 -05:00
David Korth
baa576f932 [kf5] Install KDE service menus in ${SERVICES_INSTALL_DIR} if older than KF5 5.85.
The path was changed to a common KIO directory in 5.85.

rom-properties-kf5.install: Add the ${SERVICES_INSTALL_DIR} entry, and
also remove the KIO install entry, since that was split out into the
rom-properties-kio-servicemenus package.

TODO: Don't install rom-properties-kio-servicemenus if KF5 is earlier
than 5.85, or install it anyway for forward compatibility?

[kf5] On Ubuntu 16.04, ${SERVICES_INSTALL_DIR} is incorrectly set to
the KDE4 directory. Not usre if it's because kdelibs5 for KDE4 is also
installed... As a workaround, if ${SERVICES_INSTALL_DIR} contains kde4,
change it to "share/kservices5".
2024-03-01 01:37:59 -05:00
David Korth
e9381ceba5 [cmake] RP_FindQt6andKF6.cmake: FIXME: KF6 is overwriting CMAKE_LIBRARY_OUTPUT_DIRECTORY.
This resulted in the KF6 libraries being installed in bin/ instead
of lib/. I'm not sure why, or what commit introduced this...
(Possibly a KF6 6.0 RC1 to RC2 change?)

Add a workaround by saving CMAKE_LIBRARY_OUTPUT_DIRECTORY before checking
for Qt6/KF6 and restoring it afterwards.

TODO: Change these macros to functions?
2024-02-18 18:19:23 -05:00
David Korth
ab536b23b7 [cmake] RP_FindQt6andKF6.cmake: Also require 5.248.0 (KF6 6.0 RC1) for other KF6 components. 2024-02-04 17:50:32 -05:00
David Korth
40c7cd1d1e [cmake] RP_FindQt6andKF6.cmake: Require ECM 5.248.0 (KF6 6.0 RC1).
0.0.11 is an early KF5 version. That's still the minimum requested
when building for KF5 in RP_FindQt5andKF5.cmake.
2024-02-04 12:20:42 -05:00
David Korth
fc42131c8c [kf6] Fix build with KF6 5.248. (KF6 6.0-rc1)
rp-config has been tested and appears to work correctly.

Not able to test other parts yet. I was able to install the KF6 packages,
but my installed copy of Dolphin is still using KF5.

RP_FindQt6andKF6.cmake: Set QT_DEFAULT_MAJOR_VERSION to 6.
Otherwise, Qt6QmlMacros.cmake throws an error: (Qt 6.6.1)

CMake Error at /usr/lib64/cmake/Qt6Qml/Qt6QmlMacros.cmake:2415 (message):
  qt_generate_foreign_qml_types() is only available in Qt 6.
Call Stack (most recent call first):
  /usr/lib64/cmake/Qt6Qml/Qt6QmlConfig.cmake:132 (include)
  /usr/share/cmake/Modules/CMakeFindDependencyMacro.cmake:76 (find_package)
  /usr/lib64/cmake/KF6Config/KF6ConfigConfig.cmake:53 (find_dependency)
  /usr/share/cmake/Modules/CMakeFindDependencyMacro.cmake:76 (find_package)
  /usr/lib64/cmake/KF6KIO/KF6KIOConfig.cmake:41 (find_dependency)
  /usr/share/ECM/find-modules/FindKF6.cmake:52 (find_package)
  cmake/libs/RP_FindQt6andKF6.cmake:69 (FIND_PACKAGE)
  src/kde/kf6/CMakeLists.txt:12 (FIND_QT6_AND_KF6)

Added the same in the Qt4 and Qt5 versions for consistency.

RomPropertiesDialogPlugin, XAttrViewPropertiesDialogPlugin:
- KPropertiesDialogPlugin is now declared in kpropertiesdialogplugin.h.

ProxyForUrl.cpp:
- KProtocolManager::proxyForUrl() was removed in favor of QNetworkProxyFactory.
- FIXME: Not sure if this is correct, especially if the proxy uses https.
- TODO: Verify this!

Link to Qt6::Network for QNetworkProxyFactory.
2024-01-31 22:10:30 -05:00
David Korth
8180488563 [cmake] Add .cmake macros for finding Qt[456] and KDE4/KF5/KF6.
This is now used for the KDE UI frontends, libunixcommon, and the
initial KDE test suite.

This will make it easier to support KDE test suites for all supported
versions of KDE.
2024-01-08 20:12:46 -05:00
David Korth
c479fe2b35 [libi18n,libromdata] ${Intl_LIBRARIES} -> ${Intl_LIBRARY}
FindIntl.cmake sets the singular Intl_LIBRARY variable,
not the plural Intl_LIBRARIES variable.

This didn't cause a problem on Linux, since glibc has libintl built in
and hence doesn't have a separate libintl, but it broke on FreeBSD,
which does *not* have libintl built in.

Windows wasn't affected because CheckGettext.cmake set Intl_LIBRARIES
for the included Windows DLLs. Oopsies.
2023-08-04 23:57:31 -04:00
David Korth
9c583ce628 [cmake] CheckGettext.cmake: ${arch} -> ${TARGET_CPU_ARCH}
The previous commit broke this.

Also, always use i386 executables regardless of target architecture.
Current Windows builds for non-x86 systems have i386 emulation.

Older non-x86 Windows builds, e.g. PowerPC and Alpha, will probably
not be supported anytime soon due to lack of other essential Windows
functionality.
2023-07-16 13:51:34 -04:00
David Korth
dd87260759 [libpng] Update: v1.6.39 -> v1.6.40 2023-06-26 18:01:52 -04:00
David Korth
089d692cc0 [zstd] Update: 1.5.4 -> 1.5.5
CheckZSTD.cmake: Update the version number here, too.
2023-04-23 11:08:39 -04:00
David Korth
eeebb80f93 [gtk] LibNautilusExtension for GTK4 installs its pkgconfig file as libnautilus-extension-4.pc.
Need to explicitly check for v4. Otherwise, the v3 check will fail,
and it'll just use defaults.

[cmake] FindLibNautilusExtension4.cmake: Add a v4 check file.
2022-10-03 01:07:29 -04:00
David Korth
b68e576275 [cmake] FindGTKx.cmake: Remove -pthread from GTKx_DEFINITIONS.
This sometimes causes -D-pthread to be added, resulting in build failures.

librpthreads depends on pthreads on Linux, so removing -pthread from
FindGTKx.cmake shouldn't cause any problems.
2022-09-17 16:33:19 -04:00
David Korth
cac47ba6ed [cmake] FindGTK4.cmake: GTK4 version of CMake's FindGTK2.cmake.
No `gdk` target since libgdk was merged into libgtk.

Added libgraphene-1.0, a dependency of libgtk-4.

Removed FindPango.cmake since it's no longer needed.

[gtk4] CMakeLists.txt: Use the new GTK4 targets and get rid of the
now-unnecessary FIND_PACKAGE() calls.
2022-09-17 13:32:48 -04:00
David Korth
1d5e92bf1f [cmake] FindGTK3.cmake: s/_gtk2_arch_dir/_gtk3_arch_dir/ 2022-09-17 13:32:48 -04:00
David Korth
5430fef250 [cmake] FindGTK3.cmake: Remove even *more* _append_version remnants. 2022-09-17 13:32:48 -04:00
David Korth
646b5d326e [cmake] FindGTK3.cmake: Remove some more _append_version remnants. 2022-09-17 13:32:48 -04:00
David Korth
df707c8061 [cmake] FindGTK3.cmake: Remove some debugging code. 2022-09-17 13:32:48 -04:00
David Korth
95dafeed24 [cmake] FindGTK3.cmake: Fix _GTK3_FIND_LIBRARY() call for libsigc++. 2022-09-17 13:32:48 -04:00
David Korth
fe5b201dbd [cmake] FindGTK3: glibmm/gtkmm versions should be 2.4, not 3.0. 2022-09-17 13:32:48 -04:00
David Korth
a9ad63691e [cmake] FindGTK3.cmake: It's a modified version of FindGTK2.cmake.
Search/replace error...
2022-09-17 13:32:48 -04:00