mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-11-18 03:44:32 +01:00
Fix native tools build on mac etc
This commit is contained in:
1 parent
06d70ee435
commit
fb9f1c2d6a
6 files changed
+44
-11
No files matched your search
+2
-1
@@ -4,7 +4,8 @@ set(SRCS
|
||||
../thread/threadutil.cpp
|
||||
error_context.cpp
|
||||
display.cpp
|
||||
buffer.cpp)
|
||||
buffer.cpp
|
||||
backtrace.cpp)
|
||||
|
||||
add_library(base STATIC ${SRCS})
|
||||
|
||||
|
||||
+1
-1
@@ -116,7 +116,7 @@ void OutputDebugStringUTF8(const char *p);
|
||||
|
||||
#undef CHECK
|
||||
|
||||
#define CHECK(a) {if (!(a)) {FLOG("CHECK failed");}}
|
||||
#define CHECK(a) {if (!(a)) {FLOG("%i: CHECK failed on this line", __LINE__);}}
|
||||
#define CHECK_P(a, ...) {if (!(a)) {FLOG("CHECK failed: " __VA_ARGS__);}}
|
||||
#define CHECK_EQ(a, b) CHECK((a) == (b));
|
||||
#define CHECK_NE(a, b) CHECK((a) != (b));
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
cmake_minimum_required(VERSION 2.6)
|
||||
|
||||
add_library(png17
|
||||
pngconf.h
|
||||
pngdebug.h
|
||||
png.c
|
||||
png.h
|
||||
pngerror.c
|
||||
pngget.c
|
||||
pnginfo.h
|
||||
pnglibconf.h
|
||||
pngmem.c
|
||||
pngpread.c
|
||||
pngpriv.h
|
||||
pngread.c
|
||||
pngrio.c
|
||||
pngrtran.c
|
||||
pngrutil.c
|
||||
pngset.c
|
||||
pngstruct.h
|
||||
pngtest.c
|
||||
pngtrans.c
|
||||
pngwio.c
|
||||
pngwrite.c
|
||||
pngwtran.c
|
||||
pngwutil.c)
|
||||
@@ -13,7 +13,7 @@ extern void fast_matrix_mul_4x4_c(float *dest, const float *a, const float *b);
|
||||
extern void fast_matrix_mul_4x4_neon(float *dest, const float *a, const float *b);
|
||||
extern void fast_matrix_mul_4x4_sse(float *dest, const float *a, const float *b);
|
||||
|
||||
#if defined(_M_IX86) || defined(_M_X64) // Hard link to SSE implementations on x86
|
||||
#if 0 // defined(_M_IX86) || defined(_M_X64) // Hard link to SSE implementations on x86
|
||||
#define fast_matrix_mul_4x4 fast_matrix_mul_4x4_sse
|
||||
#else
|
||||
extern fptr_fast_matrix_mul_4x4 fast_matrix_mul_4x4;
|
||||
@@ -22,4 +22,4 @@ extern fptr_fast_matrix_mul_4x4 fast_matrix_mul_4x4;
|
||||
|
||||
#ifdef __cplusplus
|
||||
} // extern "C"
|
||||
#endif
|
||||
#endif
|
||||
@@ -1,7 +1,6 @@
|
||||
cmake_minimum_required(VERSION 2.6)
|
||||
|
||||
project (Tools)
|
||||
find_package(PNG REQUIRED)
|
||||
|
||||
add_definitions(-O2)
|
||||
add_definitions(-Wall)
|
||||
@@ -25,12 +24,13 @@ endif()
|
||||
# add_definitions(-fstrict-aliasing)
|
||||
|
||||
include_directories(..)
|
||||
include_directories(../ext)
|
||||
include_directories(../math/lin)
|
||||
include_directories(../image)
|
||||
include_directories(../ext/libzip)
|
||||
include_directories(../ext/rg_etc1)
|
||||
include_directories(../ext/glew)
|
||||
include_directories(/usr/local/include)
|
||||
include_directories(${PNG_INCLUDE_DIR})
|
||||
|
||||
link_directories(/usr/X11R6/lib)
|
||||
link_directories(/opt/local/lib)
|
||||
@@ -39,6 +39,7 @@ link_directories(/opt/local/lib)
|
||||
include_directories(/usr/include/freetype2)
|
||||
include_directories(/usr/local/include/freetype2)
|
||||
include_directories(/opt/local/include/freetype2)
|
||||
include_directories(/opt/local/include)
|
||||
|
||||
add_subdirectory(../base base)
|
||||
add_subdirectory(../gfx gfx)
|
||||
@@ -49,10 +50,11 @@ add_subdirectory(../util util)
|
||||
add_subdirectory(../ext/libzip libzip)
|
||||
add_subdirectory(../ext/rg_etc1 rg_etc1)
|
||||
add_subdirectory(../ext/stb_image stb_image)
|
||||
add_subdirectory(../ext/libpng17 png17)
|
||||
|
||||
|
||||
add_executable(atlastool atlastool.cpp)
|
||||
target_link_libraries(atlastool ${PNG_LIBRARY} freetype util image z stb_image rg_etc1 file zip)
|
||||
target_link_libraries(atlastool png17 freetype util image z stb_image rg_etc1 file zip base)
|
||||
|
||||
add_executable(zimtool zimtool.cpp)
|
||||
target_link_libraries(zimtool ${PNG_LIBRARY} freetype image z stb_image rg_etc1 file zip)
|
||||
target_link_libraries(zimtool png17 freetype image z stb_image rg_etc1 file zip base)
|
||||
+7
-3
@@ -11,10 +11,10 @@
|
||||
// line height
|
||||
// dist-per-pixel
|
||||
|
||||
#include <png.h>
|
||||
#include <libpng17/png.h>
|
||||
#include <ft2build.h>
|
||||
#include FT_FREETYPE_H
|
||||
#include <ftbitmap.h>
|
||||
#include <freetype/ftbitmap.h>
|
||||
#include <set>
|
||||
#include <map>
|
||||
#include <vector>
|
||||
@@ -22,6 +22,7 @@
|
||||
#include <string>
|
||||
#include <cmath>
|
||||
|
||||
#include "base/logging.h"
|
||||
#include "gfx/texture_atlas.h"
|
||||
|
||||
#include "image/png_load.h"
|
||||
@@ -774,7 +775,10 @@ int main(int argc, char **argv) {
|
||||
// initProgram(&argc, const_cast<const char ***>(&argv));
|
||||
// /usr/share/fonts/truetype/msttcorefonts/Arial_Black.ttf
|
||||
// /usr/share/fonts/truetype/ubuntu-font-family/Ubuntu-R.ttf
|
||||
|
||||
if (argc < 3) {
|
||||
FLOG("Not enough arguments");
|
||||
return 1;
|
||||
}
|
||||
CHECK(argc >= 3);
|
||||
if (argc > 3)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user