blob: 8f80147b01e33a4c20ddc534f80d9635c04e8ee6 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
|
Make build glue accept libpng 1.6.x and don't hardcode suffix
One hunk in src/CMakeLists.txt was added to fix target generation with ninja.
--- CMakeLists.txt.orig 2017-05-27 09:58:05 UTC
+++ CMakeLists.txt
@@ -582,9 +582,10 @@ else()
set(LIBZIP_LIBRARY libzip)
endif()
-# FindPNG does a few things we don't want. So do it ourselves. Fixed to libpng17
-find_path(PNG_PNG_INCLUDE_DIR NAMES "libpng17/png.h")
-find_library(PNG_LIBRARY NAMES png17 libpng17)
+find_package(PkgConfig)
+pkg_check_modules(PNG libpng>=1.6)
+set(PNG_LIBRARY ${PNG_LIBRARIES})
+set(PNG_PNG_INCLUDE_DIR ${PNG_INCLUDE_DIRS})
find_package(PackageHandleStandardArgs)
find_package_handle_standard_args(PNG REQUIRED_VARS PNG_LIBRARY PNG_PNG_INCLUDE_DIR)
if (PNG_FOUND)
@@ -1618,12 +1619,11 @@ endif()
setup_target_project(${CoreLibName} Core)
-# Generate git-version.cpp at build time.
-add_custom_target(GitVersion ALL
- DEPENDS something_that_never_exists)
-add_custom_command(OUTPUT something_that_never_exists
+add_custom_command(OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/git-version.cpp
COMMAND ${CMAKE_COMMAND} -DSOURCE_DIR=${CMAKE_CURRENT_SOURCE_DIR}
-P ${CMAKE_CURRENT_SOURCE_DIR}/git-version.cmake)
+# Generate git-version.cpp at build time.
+add_custom_target(GitVersion DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/git-version.cpp)
set_source_files_properties(${CMAKE_CURRENT_SOURCE_DIR}/git-version.cpp
PROPERTIES GENERATED TRUE)
--- Core/Screenshot.cpp.orig 2017-05-27 09:58:05 UTC
+++ Core/Screenshot.cpp
@@ -21,7 +21,7 @@
#ifdef USING_QT_UI
#include <QtGui/QImage>
#else
-#include <libpng17/png.h>
+#include "png.h"
#include "ext/jpge/jpge.h"
#endif
--- ext/native/image/png_load.cpp.orig 2017-05-27 09:58:05 UTC
+++ ext/native/image/png_load.cpp
@@ -5,7 +5,7 @@
#ifdef USING_QT_UI
#include <QtGui/QImage>
#else
-#include "libpng17/png.h"
+#include "png.h"
#endif
#include "png_load.h"
--- Core/TextureReplacer.cpp.orig 2017-05-27 09:58:05 UTC
+++ Core/TextureReplacer.cpp
@@ -16,7 +16,7 @@
// https://github.com/hrydgard/ppsspp and http://www.ppsspp.org/.
#ifndef USING_QT_UI
-#include <libpng17/png.h>
+#include "png.h"
#endif
#include <algorithm>
|