mirror of
https://github.com/RetroDECK/Duckstation.git
synced 2024-11-22 05:45:38 +00:00
dep/imgui: Use FreeType rasterizer
This commit is contained in:
parent
69588bf7a6
commit
ffbb14f508
|
@ -15,6 +15,7 @@ if(NOT WIN32 AND NOT ANDROID)
|
|||
find_package(PNG 1.6.40 REQUIRED)
|
||||
find_package(JPEG REQUIRED) # No version because flatpak uses libjpeg-turbo.
|
||||
find_package(CURL REQUIRED)
|
||||
find_package(Freetype 2.13.1 REQUIRED)
|
||||
if(APPLE)
|
||||
set(CMAKE_FIND_FRAMEWORK ${FIND_FRAMEWORK_BACKUP})
|
||||
endif()
|
||||
|
|
|
@ -1,12 +1,14 @@
|
|||
set(SRCS
|
||||
include/imconfig.h
|
||||
include/imgui.h
|
||||
include/imgui_freetype.h
|
||||
include/imgui_internal.h
|
||||
include/imgui_stdlib.h
|
||||
include/imstb_textedit.h
|
||||
src/imgui.cpp
|
||||
src/imgui_demo.cpp
|
||||
src/imgui_draw.cpp
|
||||
src/imgui_freetype.cpp
|
||||
src/imgui_stdlib.cpp
|
||||
src/imgui_tables.cpp
|
||||
src/imgui_widgets.cpp
|
||||
|
@ -17,4 +19,4 @@ set(SRCS
|
|||
add_library(imgui ${SRCS})
|
||||
target_include_directories(imgui PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/include" "${CMAKE_CURRENT_SOURCE_DIR}/src")
|
||||
target_include_directories(imgui INTERFACE "${CMAKE_CURRENT_SOURCE_DIR}/include")
|
||||
|
||||
target_link_libraries(imgui PUBLIC Freetype::Freetype)
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
<ItemGroup>
|
||||
<ClInclude Include="include\imconfig.h" />
|
||||
<ClInclude Include="include\imgui.h" />
|
||||
<ClInclude Include="include\imgui_freetype.h" />
|
||||
<ClInclude Include="include\imgui_stdlib.h" />
|
||||
<ClInclude Include="src\imgui_internal.h" />
|
||||
<ClInclude Include="src\imstb_rectpack.h" />
|
||||
|
@ -13,6 +14,7 @@
|
|||
<ItemGroup>
|
||||
<ClCompile Include="src\imgui.cpp" />
|
||||
<ClCompile Include="src\imgui_draw.cpp" />
|
||||
<ClCompile Include="src\imgui_freetype.cpp" />
|
||||
<ClCompile Include="src\imgui_stdlib.cpp" />
|
||||
<ClCompile Include="src\imgui_tables.cpp" />
|
||||
<ClCompile Include="src\imgui_widgets.cpp" />
|
||||
|
@ -27,7 +29,7 @@
|
|||
<ItemDefinitionGroup>
|
||||
<ClCompile>
|
||||
<WarningLevel>TurnOffAllWarnings</WarningLevel>
|
||||
<AdditionalIncludeDirectories>$(ProjectDir)include;$(ProjectDir)src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>$(ProjectDir)include;$(ProjectDir)src;$(DepsIncludeDir)freetype2;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<Import Project="..\msvc\vsprops\Targets.props" />
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
<ClInclude Include="src\imstb_textedit.h" />
|
||||
<ClInclude Include="src\imstb_truetype.h" />
|
||||
<ClInclude Include="include\imgui_stdlib.h" />
|
||||
<ClInclude Include="include\imgui_freetype.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="src\imgui_widgets.cpp" />
|
||||
|
@ -15,6 +16,7 @@
|
|||
<ClCompile Include="src\imgui_draw.cpp" />
|
||||
<ClCompile Include="src\imgui_stdlib.cpp" />
|
||||
<ClCompile Include="src\imgui_tables.cpp" />
|
||||
<ClCompile Include="src\imgui_freetype.cpp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Natvis Include="imgui.natvis" />
|
||||
|
|
|
@ -76,7 +76,7 @@
|
|||
//---- Use FreeType to build and rasterize the font atlas (instead of stb_truetype which is embedded by default in Dear ImGui)
|
||||
// Requires FreeType headers to be available in the include path. Requires program to be compiled with 'misc/freetype/imgui_freetype.cpp' (in this repository) + the FreeType library (not provided).
|
||||
// On Windows you may use vcpkg with 'vcpkg install freetype --triplet=x64-windows' + 'vcpkg integrate install'.
|
||||
//#define IMGUI_ENABLE_FREETYPE
|
||||
#define IMGUI_ENABLE_FREETYPE
|
||||
|
||||
//---- Use FreeType+lunasvg library to render OpenType SVG fonts (SVGinOT)
|
||||
// Requires lunasvg headers to be available in the include path + program to be linked with the lunasvg library (not provided).
|
||||
|
|
|
@ -34,7 +34,7 @@ Index of this file:
|
|||
#ifndef IMGUI_DISABLE
|
||||
#include "imgui_internal.h"
|
||||
#ifdef IMGUI_ENABLE_FREETYPE
|
||||
#include "misc/freetype/imgui_freetype.h"
|
||||
#include "imgui_freetype.h"
|
||||
#endif
|
||||
|
||||
#include <stdio.h> // vsnprintf, sscanf, printf
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DepsIncludeDir)SDL2</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>%(AdditionalDependencies);libjpeg.lib;libpng16.lib;libwebp.lib;SDL2.lib;zlib.lib;zstd.lib</AdditionalDependencies>
|
||||
<AdditionalDependencies>%(AdditionalDependencies);freetype.lib;libjpeg.lib;libpng16.lib;libwebp.lib;SDL2.lib;zlib.lib;zstd.lib</AdditionalDependencies>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
|
|
Loading…
Reference in a new issue