Commit Graph

139 Commits

Author SHA1 Message Date
David Korth
97a2b61e8c CMakeLists.txt: Check for the existence of the CMAKE_PROJECT variables instead of the CMake version. 2020-06-25 23:04:45 -04:00
David Korth
8ab753d230 CMakeLists.txt: CMAKE_PROJECT_VERSION was introduced in 3.12.
Set the variables manually for older versions.
2020-06-25 23:00:27 -04:00
David Korth
fb61cafd1e [gtk] Updated the XFCE (GTK+ 2.x) plugin to use the gtk3 source directory.
The variables have been (mostly) renamed to GTK2, though the user-facing
variable is still BUILD_XFCE, and it shows "XFCE" in the UI_FRONTENDS
status message.

I don't know if I'll be adding support for old GTK+ 2.x Nautilus
versions...
2020-06-23 22:55:24 -04:00
David Korth
3a8f19bbb9 CMakeLists.txt: GNOME and XFCE3 are now GTK3. 2020-06-23 22:38:50 -04:00
David Korth
b868f8d457 CMakeLists.txt: Fix VERSION_STRING in cases where the patch version is 0. 2020-06-20 13:46:59 -04:00
David Korth
149d852dbb CMakeLists.txt: The base project doesn't have any source files, so remove LANGUAGES. 2020-06-20 13:25:34 -04:00
David Korth
4364e9a838 Fix CMake project version usage.
The variables are CMAKE_PROJECT_VERSION* for the top-level version
PROJECT_VERSION_* is set if a subproject sets a version number.

- CMP0048 is needed in order to use VERSION. This might be implied by
  using CMAKE_MINIMUM_REQUIRED(), but we'll explicitly specify it anyway.

- Set policies before calling PROJECT().

- Update the Win32 DO_SPLIT_DEBUG() code to use PROJECT_VERSION_*
  variables if set, or CMAKE_PROJECT_VERSION* if not.

This should fix the Win32 build.

This fixes a regression from commit a1a2e0895c.
(Set all projects to require CMake 3.0.)
2020-06-19 21:01:55 -04:00
David Korth
a1a2e0895c Set all projects to require CMake 3.0.
- Added language specifications.
- Set the top-level project version in the PROJECT() call.
- Set CMP0063 to NEW if it's available. This enables the symbol
  visibility presets on *all* target types, not just shared libraries,
  module libraries, and executables with ENABLE_EXPORTS set.
2020-06-19 18:02:04 -04:00
David Korth
6dd716bd1d [gnome] Combine the MATE and Cinnamon plugins into the GNOME plugin.
The only differences are symbol names, which we can resolve at runtime.

Export all three plugin symbols. Depending on which initialization
function is called, we'll dlopen() the appropriate library and load
the symbols.

TODO:
- Create symlinks for the MATE and Cinnamon plugins.
- Update Debian packages to install symlinks.
- Other testing.
2020-04-19 18:01:50 -04:00
David Korth
516c0df383 Version bump for development. (v1.5+) 2020-03-14 00:59:54 -04:00
David Korth
0eadbd84cc rom-properties 1.5 2020-03-13 20:45:11 -04:00
David Korth
1ea2ad7088 [cmake] PrecompiledHeader.cmake: Use ${CMAKE_${_lang}_FLAGS}.
This should ensure better utilization of precompiled headers in gcc builds.

Note that ${CMAKE_BUILD_TYPE} is not necessarily all uppercase, so
convert it to uppercase before using it.

CMakeLists.txt: Make sure CMAKE_BUILD_TYPE gets cached as "Release" if it
isn't specified on the command line.

TODO: Do we need to ensure that ADD_COMPILED_HEADER() is added *after* all
flags/definitions are set, or does the ordering not matter?
2020-02-23 12:51:14 -05:00
David Korth
440586830d CMakeLists.txt: s/KDE5/KF5/
I forgot to change this, so it ended up not printing anything if building
the KF5 UI frontend.
2020-02-18 23:13:55 -05:00
David Korth
d251edf572 [gtk] Added flags resources using glib-compile-resources.
Using GCR_Cmake macros from: https://github.com/Makman2/GCR_CMake

Currently loading the full 16x16 sprite sheet as the icon for each
dropdown entry. This is obviously wrong, but it works as a basic
test for now.

PIMGTYPE.cpp: New function PIMGTYPE_load_png_from_gresource(). This
function loads a PNG image from the glibresources and returns it as
PIMGTYPE. This does *not* use rp_image at all; it uses Cairo's
built-in PNG loading functionality.

TODO: GdkPixbuf version.
2020-01-20 00:00:00 -05:00
David Korth
7d263748c2 CMakeLists.txt: Changed the KTX message to PVRTC.
ENABLE_GL was removed a while ago, but we now have an option for PVRTC.
2019-12-21 16:20:04 -05:00
David Korth
0e1af27d94 [gtk] cinnamon: Implementation for Cinnamon desktop with the Nemo file browser.
Nemo is yet another Nautilus fork. Nemo was initially forked from
Nautilus 3.x, so we don't have to worry about GTK+ 2.x versions.

Everything's basically the same as the Caja version, except the
files are named "nemo" instead of "caja".
2019-12-15 15:48:53 -05:00
David Korth
b94c98c0fe CMakeLists.txt: Only INCLUDE(Win32ImageVersionLinkerFlags) on Windows. 2019-12-07 22:58:15 -05:00
David Korth
eaeec38416 CMakeLists.txt: Don't split debugging symbols from static libraries.
When using thin libraries, this causes an error on Linux:

/usr/bin/objcopy:lib/libtinyxml2.a: sorry: copying thin archives is not currently supported: invalid operation

Also, changed the macro to a function.

TODO: Move the macro to SplitDebugInformation.cmake?
2019-12-07 22:52:36 -05:00
David Korth
5633e56161 NEWS.md: Added v1.4.2 and v1.4.3 release notes.
- Removed corresponding notes from the v1.5 section.

- CMakeLists.txt: Bump to v1.4.3+.
2019-09-17 00:04:02 -04:00
David Korth
70926d91c1 NEWS.md: Added v1.4.1 release notes.
- Fixed the release date for v1.4.1. (2019/09/07, not 2019/09/02.)

- Removed corresponding notes from the v1.5 section.

- CMakeLists.txt: Bump to v1.4.1+.
2019-09-07 15:01:25 -04:00
David Korth
b7c8a04966 Version bump for development. (v1.4+) 2019-08-07 23:12:38 -04:00
David Korth
55ead2290f rom-properties 1.4 2019-08-04 18:14:15 -04:00
David Korth
d857f8f409 [xdg] Install rom-properties.xml into /usr/share/mime/packages/.
debian/: Added a rom-properties-xdg package. This includes postinst and
postrm files to update the system MIME database.
2019-08-04 15:50:37 -04:00
David Korth
de85a062ec Removed S2TC decoding and test images.
S2TC was originally implemented because the S3TC patents were still in
effect. The patents expired in October 2017, which was *before* the
release of v1.2 (the first version with S3TC decoding), but I didn't want
to remove it so close to release.

Pretty much no one used the S2TC version, so it was just wasting space.

Code size reduction: (64-bit Gentoo Linux, gcc-9.1.0, release build)

   text    data     bss     dec     hex filename
  17058       9       0   17067    42ab ImageDecoder_S3TC.cpp.o [before]
  13138       8       0   13146    335a ImageDecoder_S3TC.cpp.o [after]
  -3920      -1       0   -3921    -f51 Difference
2019-06-09 15:06:40 -04:00
David Korth
19a0394951 [gtk] mate: Initial implementation for MATE Desktop with the Caja file browser.
Caja is a fork of Nautilus 2.x, so everything's basically the same
as the GNOME extension, but with a different prefix.

Note that as of MATE 1.18.0, GTK+ 3.x is used, not 2.x. We're only
supporting GTK+ 3.x for MATE Desktop.

N.B.: Caja is a fork of Nautilus *2.x*, not *3.x*. The extension
interface doesn't seem to have changed, though.

Since the only real changes are names, the mate extension is handled
similarly to xfce3. The subdirectory has a CMakeLists file and defines
an RP_UI_GTK3_MATE macro, but it references the files in the gnome
directory.

gnome: Define RP_UI_GTK3_GNOME to distinguish between the two.

RomDataView: MATE uses the same settings as GNOME.

NOTE: We can't set up the MATE Debian configuration right now, since
Ubuntu 16.04 has a GTK+ 2.x version of MATE. I might set up a separate
"later-debian" directory with the updated files, though.

TODO:
- Both GNOME and MATE use /usr/share/thumbnailers, so the thumbnailer
  file needs to be moved to a common package.
- Caja has an "About Extension" button. Implement this.
- Check Nautilus and other file browsers?
- Make sure all relevant MIME types are added to the XDG service files.
  Caja *requires* the proper MIME types to be added, or else it won't
  thumbnail the files.
2019-06-08 17:12:06 -04:00
David Korth
7bb445d816 CMakeLists.txt: Print if KTX texture support is enabled. (OpenGL) 2018-12-18 21:44:47 -05:00
Cameron Cawley
aeceb4fab6 Make building with OpenGL optional. 2018-12-18 23:54:42 +00:00
David Korth
2a9deddddd CMakeLists.txt: Indicate if XML support is enabled or not. 2018-09-08 15:20:41 -04:00
David Korth
d643bb5d82 Merge branch 'release/1.3'
* GameCube: Fixed a crash when downloading external images for Disc 2
  from multi-disc games. Thanks to @Nomelas for reporting this bug.

Conflicts:
	CMakeLists.txt
	NEWS.md
2018-08-25 11:26:27 -04:00
David Korth
3143ba1207 rom-properties 1.3.3 2018-08-25 10:05:42 -04:00
David Korth
b60d8cbc14 Merge branch 'release/1.3'
* Linux: Fixed a crash on GNOME and XFCE when using Ubuntu 16.04.
  IFUNC was not being disabled on gcc5 in the GTK+ directory.

* XFCE: The Specialized Thumbnailer file has a MimeTypes key, not MimeType.

Conflicts:
	CMakeLists.txt
	NEWS.md
2018-06-30 14:42:05 -04:00
David Korth
d9b5192141 rom-properties 1.3.2 2018-06-30 13:52:38 -04:00
David Korth
7c7f3f81dc Merge branch 'release/1.3'
* Windows: Fixed a bug that caused Explorer to crash if a supported file had
  an internal image whose width was not a multiple of 8.

Conflicts:
	CMakeLists.txt
	NEWS.md
2018-06-12 21:33:26 -04:00
David Korth
cfa689292d rom-properties 1.3.1 2018-06-12 20:58:17 -04:00
David Korth
81261614a3 [gtk] xfce3: Build a plugin for Thunar 1.8.0 (GTK+ 3.x).
All of the code is basically the same as xfce2, but the library
dependencies have changed.

- FindThunarX3.cmake: Find the GTK+ 3.x version of ThunarX.

- xfce3/CMakeLists.txt is a clone of xfce/CMakeLists.txt. It references
  all of the sources from the xfce/ directory.

- Thunar 1.8.0 doesn't change the formatting in the properties dialog,
  so RP_DFT_XFCE is kept as-is.

- #undef GTK_DISABLE_DEPRECATED in a few places because thunar-renamer.h
  uses GtkVBox, which is deprecated in GTK+ 3.x.

- doc/COMPILING.md: Added rom-properties-xfce3.

TODO: Add a Debian package once it's added to the repository.
2018-06-07 22:02:50 -04:00
David Korth
749ed38c61 Version bump for development. (v1.3+) 2018-06-03 00:35:18 -04:00
David Korth
d55c1ddfa6 rom-properties 1.3 2018-06-02 18:38:17 -04:00
David Korth
13c8fc9bc7 Revert "CMakeLists.txt: Removed CPack."
CPack settings are still needed for packaging on Windows.

This reverts commit 336c02686b.
2018-06-02 18:09:15 -04:00
David Korth
4182111a77 CMakeLists.txt: Display decryption and S3TC status in the build summary. 2018-06-02 13:02:33 -04:00
David Korth
314a8b7f81 Initial build of gettext for Win32.
The gettext libraries and executables were built on Ubuntu 18.04 using
MinGW-w64 with gcc-7.3.0.

iconv support has been disabled for the runtime, but it's still needed
for some of the build executables. For that, we're using win-iconv, which
is an iconv wrapper that uses the Windows API. [1]

In addition, several patches from the official MinGW package repository
were applied to gettext-0.19.8.1 in order to get it to build correctly
for Windows. [2]

TODO:
- Test packaging to ensure the correct DLL is packaged.
- Test bindtextdomain() to determine if it supports Unicode. If it
  doesn't, then another patch will be needed.

[1] https://github.com/win-iconv/win-iconv
[2] https://github.com/Alexpux/MINGW-packages/tree/master/mingw-w64-gettext
2018-04-29 13:32:20 -04:00
David Korth
336c02686b CMakeLists.txt: Removed CPack.
We're using Debian's own `debuild` tool to build Debian packages now,
and it's automated by use of Ubuntu's PPA system.
2018-04-15 23:33:01 -04:00
David Korth
dcb623b7e9 CMakeLists.txt: Added a dummy git_version target if sh could not be found. 2018-04-15 23:24:36 -04:00
David Korth
7781a3461f CMakeLists.txt: s/the following/these/g 2018-03-25 12:50:41 -04:00
David Korth
70cfa4addd CMakeLists.txt: Basic build summary.
If no UI frontends are being built, and CLI is disabled, the build
process will stop immediately, since there's nothing to do.

TODO: Allow test-only builds with no frontends?
2018-03-25 12:48:06 -04:00
David Korth
4744b4064a CMakeLists.txt: Set up the uninstall target before adding any subdirectories.
For some reason, CMake in a new directory was complaining about a conflict
in the KDE5 directory, even though we tell KDE5 to skip uninstall targets.
It might be caused by the 5.41 frameworks update.

Moving the uninstall target before adding any subdirectories fixes this.
2017-12-16 13:16:46 -05:00
David Korth
5ac223b8f4 [locale] Install the .mo files.
Tested on Linux. Not tested on Windows, but should work.

TODO: Still need to build gettext on Windows. Probably won't include
it as extlib, since it's a large package.
2017-11-25 16:21:27 -05:00
David Korth
02946ab837 CMakeLists.txt: Added an uninstall target.
[kde4, kde5] Disable KDE's own uninstall target.
2017-11-25 15:50:21 -05:00
David Korth
3fb371d3be [locale] CMakeLists.txt: Initial support for converting .po files to .mo files at build time.
`make translations` to generate the .mo files.

Added an initial it.po file for Italian.
2017-11-21 21:59:16 -05:00
David Korth
79a14dd0a3 Initial support for translations using GNU gettext.
TODO: Initialize in the DLL and/or EXE entry point.
TODO: Search the DLL directories on Windows.

Added ENABLE_NLS. (defaults to OFF on Windows for now)
2017-11-18 13:22:13 -05:00
David Korth
41d981b05f Version bump for development. (v1.2+) 2017-11-12 16:46:08 -05:00
David Korth
0c316c87cb CMakeLists.txt: Actually bump the package version. 2017-11-12 13:58:52 -05:00
David Korth
729795ba69 Version bump for development. (v1.1.0+) 2017-07-04 18:42:59 -04:00
David Korth
fd175b0f29 rom-properties 1.1 2017-07-04 13:43:43 -04:00
David Korth
ad85263e92 CMakeLists.txt: Set the default build type to Release. 2017-07-04 13:26:49 -04:00
David Korth
c336f20015 Version bump for development. (v1.0.0+)
Turns out I forgot to bump rpcli's manifest version. I should
probably use MT.exe to handle auto-generation of the version
number and architecture.
2017-05-21 12:25:06 -04:00
David Korth
553266e3c1 rom-properties 1.0 2017-05-20 12:59:14 -04:00
David Korth
d36a5ce973 Install svrplus as install.exe in the ZIP file.
The 32-bit version is moved to the root directory.
The 64-bit version is still kept in the amd64/ directory
for reference purposes.

Removed install.cmd and uninstall.cmd.
2017-05-18 21:59:23 -04:00
David Korth
093da371d5 Use the system TinyXML2 on Linux if it's present.
USE_INTERNAL_XML can be used to force usage of the internal TinyXML2.

TODO: Build TinyXML2 as a DLL on Windows.
2017-05-08 23:45:20 -04:00
David Korth
c52df506cb Miscellaneous build system changes.
CMakeLists.txt: Use the top-level CMake directories.

cmake/platform/win32*.cmake: Define the Windows SDK version in
win32.cmake. Use the same version (Windows XP) regardless of
the target operating system in order to keep everything consistent.

[libpng] CMakeLists.txt: Fix MSVC debug paths for png_static.
2017-05-04 01:16:17 -04:00
David Korth
db65c984e1 [libromdata] RpJpeg: Initial JPEG image loader.
Currently supports RGB, YCbCr, and grayscale images. (YCbCr is handled
using libjpeg's built-in colorspace conversion.)

NOTE: libjpeg's RGB support outputs 24-bit RGB, so we have to manually
expand it to 32-bit ARGB with an opaque alpha channel.

Tested with Nintendo DS cover art and it works:
- ASME (Super Mario 64 DS) (RGB)
- BXSE (Sonic Colors) (YCbCr)

I manually converted the images to grayscale and those worked as well.

TODO: CMYK/YCCK. (libjpeg has automatic YCCK->CMYK colorspace conversion,
but not CMYK->RGB.)

[cmake] Added libjpeg detection and options.

TODO:
- Add an internal copy of libjpeg-turbo.
- Make libjpeg support optional?
2017-02-26 17:34:27 -05:00
David Korth
a7f6283f74 Version bump for development. (v0.9.0+) 2017-02-07 23:27:20 -05:00
David Korth
3c16ec70cf rom-properties 0.9 (Beta 2) 2017-02-07 22:01:42 -05:00
David Korth
1441226090 [rpcli] Install rpcli.
rpcli is a program, so it's in a new component called "program".

[debian] New package rom-properties-cli. This package contains rp-cli.
2017-01-07 18:48:04 -05:00
David Korth
21194fcd20 DO_SPLIT_DEBUG(): Handle SET_MSVC_DEBUG_PATH() here.
[extlib] CMakeLists.txt: Remove SET_MSVC_DEBUG_PATH() from the
SET_EXTLIB_PROPERTIES() macro.

[minizip] Removed EXCLUDE_FROM_ALL, since this is handled by the
extlib/CMakeLists.txt file.

NOTE: We can't move DO_SPLIT_DEBUG() out of the individual extlib
directories, since CMake complains if we attempt to use it on targets
created in a different directory.
2016-12-26 14:50:35 -05:00
David Korth
edcdd8e15d CMakeLists.txt: This is a development build.
Should always set this after releases.
2016-11-03 21:21:38 -04:00
David Korth
02315a1c1b Compile zlib and libpng as DLLs on Windows.
I'll eventually make them delayload so they won't be loaded unless they're
actually needed.

Rearranged the build directory layout such that all binaries are located
in the top-level bin/ directory. This is needed in order for the test
suites to work, since they might depend on zlib and/or libpng.

NOTE: We have to use CACHE INTERNAL; otherwise, the KDE5 build ignores
the directory options. (Maybe this is why the KDE4 build always used
this directory layout in the first place?)

NOTE 2: On Windows, DLLs are copied to ${CMAKE_RUNTIME_OUTPUT_DIRECTORY},
whereas on Linux, SOs are copied to ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}.

Test images are now copied using a custom command, since the output
directory isn't easily determined at generate time. (It could be
the same as ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}, but msbuild uses
configuration-specific subdirectories.

TODO: Keep test images in a subdirectory. This will need adjustments in
the test suites to look in img/ first, then the current directory.
2016-11-02 23:50:04 -04:00
David Korth
842d020bde [libpng] Initial import of libpng-1.6.23 from GCN MemCard Recover.
I've decided to get rid of the GDI+ PNG handling. It doesn't improve
anything performance-wise, adds coding overhead, and probably isn't
any faster than libpng.

GDI+ also doesn't support APNG. This version does.

NOTE: If I add APNG export, I'll need to use the included libpng
in Ubuntu builds, since Ubuntu still has libpng-1.2, and it's a
version that doesn't support APNG.

Reworked the bundled library system to be similar to the one in
mcrecover, but improved.

Added "-fpic -fPIC" to all extlib static libraries when building
for Linux systems. This is needed for libpng, but might not be
needed for other libraries; nevertheless, it should be set.

TODO: Use libpng in the Windows build. It's being linked in,
but it isn't actually being used for anything yet.
2016-11-02 21:45:51 -04:00
David Korth
2ee5cb37d1 Version bump to 0.8.1.
This is a Windows-only release.
2016-10-24 01:17:55 -04:00
David Korth
d16debffa6 Version bump to 0.8. (Beta 1) 2016-10-23 22:38:40 -04:00
David Korth
145af759b9 CMakeLists.txt: Removed DEB generator rules.
Removed xdg-mime; added display name for doc.

TODO: Add the xdg/ MIME rules and install it in the Debian packages.
2016-10-20 23:09:21 -04:00
David Korth
6ea991c358 CMakeLists.txt: Handle CMAKE_BUILD_TYPE=None as the default build type.
debuild sets CMAKE_BUILD_TYPE to None.

TODO: Change the default build type to Release?
2016-10-20 20:53:07 -04:00
David Korth
b3ad0ef659 Added support for code coverage testing when using gcc or clang.
Set ENABLE_COVERAGE=ON to enable code coverage testing.

After the build is finished, run 'make coverage' to run the unit tests
and generate a code coverage page in the ${CMAKE_BINARY_DIR}/coverage
directory.

Reference: https://github.com/bilke/cmake-modules/blob/master/CodeCoverage.cmake
(commit 59f8ab8dded56b490dec388ac6ad449318de8779)

CMakeLists.txt:
- Moved the CMAKE_BUILD_TYPE check to before INCLUDE(CTest),
  and capitalized the 'D' in "Debug", since CodeCoverage.cmake
  checks for that.

gcc.cmake:
- Set the required CFLAGS. (These aren't checked for explicitly, since
  they're basically present on all gcc since forever.)
- Link all targets to -lgcov.
- Create a 'coverage' target for automatically running tests and
  generating HTML output using lcov/genhtml.

options.cmake:
- Added ENABLE_COVERAGE.

scripts/lcov.sh:
- Shell script used by the 'coverage' target to generate the lcov/genhtml
  output from the gcov profiling data.
2016-10-18 22:55:21 -04:00
David Korth
9e5eb74634 Added git version checking.
CMakeLists.txt: Run git_version.sh. This requires a POSIX shell and
git, and both must be present in PATH. If the script can't be run,
a dummy git.h will be generated in the top-level binary directory.

libromdata, win32: Added the top-level binary directory to the
private include directory list.

[win32] resource.rc: #include "libromdata/git.h"
Removed the version string from FileDescription, since it's redundant,
and it gets cut off on Windows 7.

TODO: The git version gets cut off on Windows 7, since it uses a
ListView instead of separate ListBox and Edit controls that were
used on Windows XP.
2016-10-17 02:26:59 -04:00
David Korth
2dd4c66695 CMakeLists.txt: Actually commit the CPack changes.
I thought I committed this before, but apparently I didn't.

This should have been committed in commit 2013307dab.
(Initial CPack setup for Windows (and some Linux changes).)
2016-10-17 02:00:39 -04:00
David Korth
ac29a9b35c CMakeLists.txt: Actually install doc/ and scripts/.
scripts/ is currently installed only on Windows, since it only has
batch files for REGSVR32.
2016-10-17 01:46:18 -04:00
David Korth
be427f28ca Merge branch 'feature/decryption'
This fixes #7.

Five days of work, two encryption libraries, and a ton of custom formats,
all for a single field in the GameCube properties page. \o/

[libromdata/tests] CMakeLists.txt: Change ${GTEST_LIBRARY} to gtest.
This was done upstream, but AesCipherTest was still using the variable,
which no longer exists.

Conflicts:
	src/libromdata/GameCube.cpp
	src/libromdata/tests/CMakeLists.txt
2016-09-15 23:47:59 -04:00
David Korth
eb79270be1 CMakeLists.txt: Use ENABLE_TESTING() instead of INCLUDE(CTest).
INCLUDE(CTest) adds a ton of extra stuff for test dashboards that we
don't need right now.

Reference: https://cmake.org/Wiki/CMake/Testing_With_CTest
2016-09-14 23:21:03 -04:00
David Korth
45491b4661 Simplify the Google Test build infrastructure a bit.
libromdata/tests/CMakeLists.txt:
- Link to gtest directly instead of ${GTEST_LIBRARY}.
- Removed INCLUDE_DIRECTORIES() for googletest, since it's added to
  TARGET_INCLUDE_DIRECTORIES() by googletest's CMakeLists.txt.

extlib/googletest/googletest/CMakeLists.txt:
- Uncommented gtest_hide_internal_symbols.

Removed cmake/gtest.cmake, since it doesn't have anything useful other
than INCLUDE(CTest), which is now present in the top-level CMakeLists.txt.
2016-09-14 23:18:20 -04:00
David Korth
77d3aa397d [libromdata] AesCipher_nettle.cpp: Added an AesCipher implementation using nettle-3.x.
FIXME: Add support for the older nettle-2.x API, since Ubuntu 14.04
still has nettle-2.7.1.

cmake/modules/FindNettle.cmake: CMake module to find Nettle.
Reference: 9fe71b1d77/cmake/FindNettle.cmake

FIXME: If ENABLE_DECRYPTION is enabled, and Nettle can't be found,
the build will fail. Maybe show a message advising the user to
set -DENABLE_DECRYPTION=0?
2016-09-11 14:55:01 -04:00
David Korth
001893e88b Merge branch 'feature/RpImage-rework'
This fixes issue #2.

In addition to reworking RpImage to use libpng and/or GDI+ directly,
this branch adds AppVeyor support for Windows CI. This required
fixing the build system to work with CMake's Visual Studio project
generator, which uses msbuild instead of nmake.

Conflicts:
	.travis.yml
	CMakeLists.txt
2016-09-05 22:58:52 -04:00
David Korth
19cd21ddb6 CMakeLists.txt: Append cmake/macros/ before including platform.cmake.
This completely broke the Linux build, but the Windows build was
still working...
2016-09-04 02:41:59 -04:00
David Korth
0dee38d5ea Reworked Win32 subsystem settings to work correctly with msbuild.
With nmake, CMake's default /SUBSYSTEM is added after our linker flags.
With msbuild, it's added before, which caused console programs like
RpImageLoaderTest to be linked as /SUBSYSTEM:WINDOWS, which failed
due to no WinMain() function.

AppVeyor, a Windows-based CI service, mostly (only?) works with
msbuild instead of nmake, so I need to get everything working.

TODO: /MANIFEST:NO is causing problems with programs that don't have
a manifest resource (RpImageLoaderTest), and RC isn't accepting the
-nologo option for some reason.

Notable changes:
- win32-msvc.cmake: Set RP_LINKER_FLAGS_${_subsystem}_EXE. This variable
  is used by a new function to add to target-specific LINK_FLAGS.
- platform.cmake: New function SET_WINDOWS_SUBSYSTEM. This adds the
  relevant linker flags. Note that it's only used for MSVC.
- Added SET_WINDOWS_SUBSYSTEM() to all EXE and DLL projects. Note that
  the WIN32 flag is not available in ADD_LIBRARY(), so we're not setting
  it for the Win32 rom-properties.dll.
- [win32] Append to the target LINK_FLAGS instead of resetting it.
  Otherwise, we lose the /SUBSYSTEM flag.
2016-09-04 02:05:20 -04:00
David Korth
ddbfadd715 [gtest] Initial import of Google Test 1.8.0.
Google Test will be used for implementing unit tests. The first set of
unit tests will be for testing RpPng with various PNG image formats.

The Google Test code is currently identical to the release archive,
except for the removal of .travis.yml and appveyor.xml.

CMakeLists.txt: Added CTest support. (see cmake/gtest.cmake)

extlibs/CMakeLists.txt: Only build googletest libraries if testing is
enabled and some project depends on them.
2016-09-02 21:01:52 -04:00
David Korth
1dfe1e4a44 [cmake] platform.cmake: Use CMake's built-in visibility functions.
Removed the manual CFLAG testing from platform/gcc.cmake.

Other required changes:
- Removed CMAKE_MINIMUM_REQUIRED() from everything except the
  top-level CMakeLists.txt. This interfered with setting the
  CMake policy, since each invocation reset the policies to
  match the specified minimum version.
- Added NO_POLICY_SCOPE to the cmake/platform.cmake include
  in order to allow policy changes within platform.cmake to
  propagate to the rest of the project.
2016-09-02 20:10:49 -04:00
David Korth
dedc1ea01e CMakeLists.txt: Build the Debug build by default.
On my ThinkPad T60p, it's defaulting to Release. On a Kubuntu 16.04 VM,
it was defaulting to "none", so it didn't add debug flags, and it didn't
add release flags, either.

TODO: Switch the default to Release later?
2016-07-21 20:41:18 -04:00
David Korth
4c5122d7de Added preliminary KDE5 support.
Split RomPropertiesDialogPluginFactory into separate files. Note that
separate files are needed for KDE4 and KDE5 due to changes in automoc.
automoc4 complains if it has an #include for .moc, whereas automoc5
doesn't recognize that K_PLUGIN_FACTORY() has a Q_OBJECT macro, so it
fails to link due to undefined references to a vtable.

cmake/options.cmake: Added BUILD_KDE4 and BUILD_KDE5 options.
Both default to ON, but if the dependencies are missing, then their
respective plugins won't be built.
2016-07-20 22:53:31 -04:00
David Korth
f351549a94 Enable split debug symbols.
Minor change in SplitDebugInformation to handle CMake linking the
shared library in build/lib/ instead of build/src/kde/.

Added options for SPLIT_DEBUG and INSTALL_DEBUG, though INSTALL_DEBUG
isn't currently used.
2016-07-20 02:16:38 -04:00
David Korth
5b8fb8e945 Added CMake macros and C++ 2011 compatibility files from Gens/GS.
Some stuff was stripped out, including support for ANSI Windows.
The minimum version I'm officially going to support once I add
Windows support is XP, though 2000 might "just work".
2016-07-19 23:47:51 -04:00
David Korth
3f9a02b05b Initial commit of the ROM Properties Page shell extension.
The initial version adds a blank "ROM Properties" tab to the
file properties dialog in KDE4.

NOTE: KDE4 on my system doesn't seem to look in /usr/local, so the
plugin must be installed in /usr in order to work.
2016-07-19 22:17:36 -04:00