Fix Qt build by simply moving the offending file to the native project. No idea why Qt include paths only work there.
This commit is contained in:
parent
c42e9278b3
commit
7d43ca5125
5 changed files with 38 additions and 52 deletions
|
@ -164,8 +164,6 @@ else()
|
|||
set(CoreLinkType STATIC)
|
||||
endif()
|
||||
|
||||
include_directories(ext/native)
|
||||
|
||||
# Work around for some misfeature of the current glslang build system
|
||||
include_directories(ext/glslang)
|
||||
|
||||
|
@ -302,12 +300,7 @@ if(NOT MSVC)
|
|||
|
||||
if(IOS)
|
||||
elseif(APPLE AND NOT CMAKE_CROSSCOMPILING)
|
||||
# We want C++11, so target 10.7+
|
||||
if(USING_QT_UI)
|
||||
set(MACOSX_VERSION_MIN "10.8")
|
||||
else()
|
||||
set(MACOSX_VERSION_MIN "10.7")
|
||||
endif()
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mmacosx-version-min=${MACOSX_VERSION_MIN}")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mmacosx-version-min=${MACOSX_VERSION_MIN} -stdlib=libc++ -U__STRICT_ANSI__")
|
||||
set(CMAKE_XCODE_ATTRIBUTE_CLANG_CXX_LIBRARY "libc++")
|
||||
|
@ -357,6 +350,14 @@ macro(setup_target_project TargetName ProjectDir)
|
|||
endforeach()
|
||||
endmacro()
|
||||
|
||||
add_subdirectory(ext)
|
||||
|
||||
if(WIN32)
|
||||
include_directories(dx9sdk/Include)
|
||||
include_directories(dx9sdk/Include/DX11)
|
||||
endif()
|
||||
|
||||
|
||||
set(CommonX86
|
||||
Common/ABI.cpp
|
||||
Common/ABI.h
|
||||
|
@ -423,7 +424,6 @@ add_library(Common STATIC
|
|||
${CommonARM64}
|
||||
${CommonMIPS}
|
||||
${CommonFake}
|
||||
${CommonVulkan}
|
||||
${CommonD3D}
|
||||
Common/Serialize/Serializer.cpp
|
||||
Common/Serialize/Serializer.h
|
||||
|
@ -567,8 +567,6 @@ add_library(Common STATIC
|
|||
Common/Render/Text/draw_text.h
|
||||
Common/Render/Text/draw_text_android.cpp
|
||||
Common/Render/Text/draw_text_android.h
|
||||
Common/Render/Text/draw_text_qt.cpp
|
||||
Common/Render/Text/draw_text_qt.h
|
||||
Common/Render/Text/draw_text_win.cpp
|
||||
Common/Render/Text/draw_text_win.h
|
||||
Common/Render/Text/draw_text_uwp.cpp
|
||||
|
@ -644,30 +642,11 @@ add_library(Common STATIC
|
|||
Common/TimeUtil.h
|
||||
)
|
||||
|
||||
add_subdirectory(ext)
|
||||
|
||||
include_directories(Common)
|
||||
setup_target_project(Common Common)
|
||||
|
||||
target_link_libraries(Common Ext::Snappy)
|
||||
|
||||
if(WIN32)
|
||||
include_directories(dx9sdk/Include)
|
||||
include_directories(dx9sdk/Include/DX11)
|
||||
if(MINGW)
|
||||
set(CMAKE_RC_COMPILE_OBJECT "<CMAKE_RC_COMPILER> -O coff <INCLUDES> <SOURCE> <OBJECT>")
|
||||
# required when using the dx9sdk include paths
|
||||
add_definitions(-include ${CMAKE_CURRENT_SOURCE_DIR}/Windows/mingw_defines.h)
|
||||
else()
|
||||
target_link_libraries(Common dxguid)
|
||||
endif()
|
||||
target_link_libraries(Common winmm d3d9 dsound)
|
||||
endif()
|
||||
|
||||
if(TARGET SDL2::SDL2)
|
||||
target_link_libraries(Common SDL2::SDL2)
|
||||
endif()
|
||||
|
||||
if(USING_GLES2 OR (USING_EGL AND NOT USING_FBDEV))
|
||||
find_package(X11)
|
||||
endif()
|
||||
|
@ -677,6 +656,7 @@ add_library(gason STATIC
|
|||
ext/gason/gason.h
|
||||
)
|
||||
|
||||
|
||||
if(USE_FFMPEG)
|
||||
if(NOT FFMPEG_DIR)
|
||||
if(NOT USE_SYSTEM_FFMPEG)
|
||||
|
@ -981,11 +961,13 @@ elseif(USING_QT_UI)
|
|||
if(USING_GLES2)
|
||||
add_definitions(-DQT_OPENGL_ES -DQT_OPENGL_ES_2)
|
||||
endif()
|
||||
include_directories(${CMAKE_CURRENT_BINARY_DIR} Qt)
|
||||
|
||||
include_directories(Qt)
|
||||
include_directories(${CMAKE_CURRENT_BINARY_DIR})
|
||||
set(nativeExtraLibs ${nativeExtraLibs} Qt5::OpenGL Qt5::Gui Qt5::Core Qt5::Multimedia)
|
||||
set(TargetBin PPSSPPQt)
|
||||
|
||||
# Enable SDL if found
|
||||
# Enable SDL joystick if SDL is found
|
||||
if(SDL2_FOUND)
|
||||
add_definitions(-DSDL)
|
||||
set(nativeExtra ${nativeExtra}
|
||||
|
@ -1026,6 +1008,22 @@ elseif(NOT LIBRETRO)
|
|||
message(FATAL_ERROR "Could not find SDL2. Failing.")
|
||||
endif()
|
||||
|
||||
if(WIN32)
|
||||
if(MINGW)
|
||||
set(CMAKE_RC_COMPILE_OBJECT "<CMAKE_RC_COMPILER> -O coff <INCLUDES> <SOURCE> <OBJECT>")
|
||||
# required when using the dx9sdk include paths
|
||||
add_definitions(-include ${CMAKE_CURRENT_SOURCE_DIR}/Windows/mingw_defines.h)
|
||||
else()
|
||||
target_link_libraries(Common dxguid)
|
||||
endif()
|
||||
target_link_libraries(Common winmm d3d9 dsound)
|
||||
endif()
|
||||
|
||||
if(TARGET SDL2::SDL2)
|
||||
target_link_libraries(Common SDL2::SDL2)
|
||||
endif()
|
||||
|
||||
|
||||
list(APPEND NativeAppSource
|
||||
android/jni/TestRunner.cpp
|
||||
UI/DiscordIntegration.cpp
|
||||
|
@ -1075,12 +1073,13 @@ endif()
|
|||
|
||||
add_library(native STATIC
|
||||
${nativeExtra}
|
||||
Common/Render/Text/draw_text_qt.cpp
|
||||
Common/Render/Text/draw_text_qt.h
|
||||
ext/jpge/jpgd.cpp
|
||||
ext/jpge/jpgd.h
|
||||
ext/jpge/jpge.cpp
|
||||
ext/jpge/jpge.h
|
||||
)
|
||||
include_directories(ext/native)
|
||||
|
||||
if(LINUX AND NOT ANDROID)
|
||||
set(RT_LIB rt)
|
||||
|
@ -1103,7 +1102,6 @@ elseif(WIN32)
|
|||
elseif(${CMAKE_SYSTEM_NAME} MATCHES "^(DragonFly|FreeBSD|NetBSD)$")
|
||||
target_link_libraries(native execinfo)
|
||||
endif()
|
||||
setup_target_project(native native)
|
||||
|
||||
add_library(kirk STATIC
|
||||
ext/libkirk/AES.c
|
||||
|
@ -1809,7 +1807,6 @@ set(CoreExtraLibs ${CoreExtraLibs} armips)
|
|||
# target_link_libraries(native X11-xcb X11)
|
||||
#endif()
|
||||
|
||||
|
||||
set(GlslangLibs glslang OGLCompiler OSDependent SPIRV SPVRemapper spirv-cross-glsl)
|
||||
|
||||
if(WIN32)
|
||||
|
|
|
@ -6,7 +6,6 @@
|
|||
#include "Common/GPU/thin3d.h"
|
||||
#include "Common/Log.h"
|
||||
#include "Common/ColorConv.h"
|
||||
#include "Core/Reporting.h"
|
||||
|
||||
namespace Draw {
|
||||
|
||||
|
@ -450,7 +449,7 @@ void ConvertFromRGBA8888(uint8_t *dst, const uint8_t *src, uint32_t dstStride, u
|
|||
case Draw::DataFormat::R8G8B8A8_UNORM:
|
||||
case Draw::DataFormat::UNDEFINED:
|
||||
default:
|
||||
WARN_LOG_REPORT_ONCE(convFromRGBA, G3D, "Unable to convert from format: %d", (int)format);
|
||||
WARN_LOG(G3D, "Unable to convert from format: %d", (int)format);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -492,7 +491,7 @@ void ConvertFromBGRA8888(uint8_t *dst, const uint8_t *src, uint32_t dstStride, u
|
|||
dst += dstStride * 3;
|
||||
}
|
||||
} else {
|
||||
WARN_LOG_REPORT_ONCE(convFromBGRA, G3D, "Unable to convert from format to BGRA: %d", (int)format);
|
||||
WARN_LOG(G3D, "Unable to convert from format to BGRA: %d", (int)format);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
|
||||
#if defined(USING_QT_UI)
|
||||
|
||||
#include <QtGui/QFont>
|
||||
#include <QtGui/QImage>
|
||||
#include <QtGui/QPainter>
|
||||
#include <QtGui/QFontMetrics>
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
#if defined(USING_QT_UI)
|
||||
|
||||
#include <QtGui/QFont>
|
||||
class QFont;
|
||||
|
||||
class TextDrawerQt : public TextDrawer {
|
||||
public:
|
||||
|
|
|
@ -1,11 +0,0 @@
|
|||
# AWFUL way to make the shaders macosx compatible!
|
||||
|
||||
cd assets/shaders
|
||||
for i in *.vs *.fs
|
||||
do
|
||||
sed -i '' s/lowp\ //g $i
|
||||
sed -i '' s/highp\ //g $i
|
||||
sed -i '' s/mediump\ //g $i
|
||||
sed -i '' s/#version\ 140//g $i
|
||||
done
|
||||
cd ../..
|
Loading…
Add table
Add a link
Reference in a new issue