Add Dear ImPlot Library

This commit is contained in:
Sam Belliveau 2022-12-22 14:32:42 -05:00
parent d853da3b0b
commit 5ca438dd97
10 changed files with 115 additions and 3 deletions

3
.gitmodules vendored
View File

@ -45,3 +45,6 @@
url = https://github.com/mozilla/cubeb.git url = https://github.com/mozilla/cubeb.git
branch = master branch = master
shallow = true shallow = true
[submodule "Externals/implot/implot"]
path = Externals/implot/implot
url = https://github.com/epezent/implot.git

View File

@ -693,6 +693,7 @@ else()
add_subdirectory(Externals/fmt EXCLUDE_FROM_ALL) add_subdirectory(Externals/fmt EXCLUDE_FROM_ALL)
endif() endif()
add_subdirectory(Externals/imgui) add_subdirectory(Externals/imgui)
add_subdirectory(Externals/implot)
add_subdirectory(Externals/glslang) add_subdirectory(Externals/glslang)
add_subdirectory(Externals/spirv_cross) add_subdirectory(Externals/spirv_cross)

23
Externals/implot/CMakeLists.txt vendored Normal file
View File

@ -0,0 +1,23 @@
if(NOT MSVC)
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
endif()
set(SRCS
implot/implot.cpp
implot/implot_items.cpp
implot/implot_demo.cpp
)
add_library(implot STATIC ${SRCS})
dolphin_disable_warnings_msvc(implot)
target_include_directories(implot
PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/implot"
PRIVATE imgui
)
target_link_libraries(implot
PRIVATE imgui
PRIVATE fmt::fmt
)

21
Externals/implot/LICENSE vendored Normal file
View File

@ -0,0 +1,21 @@
MIT License
Copyright (c) 2020 Evan Pezent
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

14
Externals/implot/exports.props vendored Normal file
View File

@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<Project>
<ItemDefinitionGroup>
<ClCompile>
<AdditionalIncludeDirectories>$(ExternalsDir)imgui;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>$(ExternalsDir)implot;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
</ItemDefinitionGroup>
<ItemGroup>
<ProjectReference Include="$(ExternalsDir)implot\implot.vcxproj">
<Project>{A608225E-AE0A-4D1A-9B55-97F57C862391}</Project>
</ProjectReference>
</ItemGroup>
</Project>

1
Externals/implot/implot vendored Submodule

@ -0,0 +1 @@
Subproject commit d87512353495e7760e7fda7566a05beef7627d8f

38
Externals/implot/implot.vcxproj vendored Normal file
View File

@ -0,0 +1,38 @@
<?xml version="1.0" encoding="utf-8"?>
<Project>
<Import Project="..\..\Source\VSProps\Base.Macros.props" />
<Import Project="$(VSPropsDir)Base.Targets.props" />
<PropertyGroup Label="Globals">
<ProjectGuid>{A608225E-AE0A-4D1A-9B55-97F57C862391}</ProjectGuid>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<Import Project="$(VSPropsDir)Configuration.StaticLibrary.props" />
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings" />
<ImportGroup Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VSPropsDir)Base.props" />
<Import Project="$(VSPropsDir)ClDisableAllWarnings.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<ItemDefinitionGroup>
<ClCompile>
<!--IM_ASSERT is defined as Dolphin's ASSERT() :( (DolphinLib circular dependency)-->
<AdditionalIncludeDirectories>$(CoreDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="implot/implot.cpp" />
<ClCompile Include="implot/implot_items.cpp" />
<ClCompile Include="implot/implot_demo.cpp" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="implot/implot.h" />
<ClInclude Include="implot/implot_internal.h" />
</ItemGroup>
<Import Project="$(ExternalsDir)imgui\exports.props" />
<Import Project="$(ExternalsDir)fmt\exports.props" />
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

View File

@ -41,6 +41,7 @@
<Import Project="$(ExternalsDir)FreeSurround\exports.props" /> <Import Project="$(ExternalsDir)FreeSurround\exports.props" />
<Import Project="$(ExternalsDir)glslang\exports.props" /> <Import Project="$(ExternalsDir)glslang\exports.props" />
<Import Project="$(ExternalsDir)imgui\exports.props" /> <Import Project="$(ExternalsDir)imgui\exports.props" />
<Import Project="$(ExternalsDir)implot\exports.props" />
<Import Project="$(ExternalsDir)liblzma\exports.props" /> <Import Project="$(ExternalsDir)liblzma\exports.props" />
<Import Project="$(ExternalsDir)libspng\exports.props" /> <Import Project="$(ExternalsDir)libspng\exports.props" />
<Import Project="$(ExternalsDir)libusb\exports.props" /> <Import Project="$(ExternalsDir)libusb\exports.props" />

View File

@ -67,6 +67,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "minizip", "..\Externals\min
EndProject EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "imgui", "..\Externals\imgui\imgui.vcxproj", "{4C3B2264-EA73-4A7B-9CFE-65B0FD635EBB}" Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "imgui", "..\Externals\imgui\imgui.vcxproj", "{4C3B2264-EA73-4A7B-9CFE-65B0FD635EBB}"
EndProject EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "implot", "..\Externals\implot\implot.vcxproj", "{A608225E-AE0A-4D1A-9B55-97F57C862391}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "bzip2", "..\Externals\bzip2\bzip2.vcxproj", "{1D8C51D2-FFA4-418E-B183-9F42B6A6717E}" Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "bzip2", "..\Externals\bzip2\bzip2.vcxproj", "{1D8C51D2-FFA4-418E-B183-9F42B6A6717E}"
EndProject EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "liblzma", "..\Externals\liblzma\liblzma.vcxproj", "{055A775F-B4F5-4970-9240-F6CF7661F37B}" Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "liblzma", "..\Externals\liblzma\liblzma.vcxproj", "{055A775F-B4F5-4970-9240-F6CF7661F37B}"
@ -337,6 +339,14 @@ Global
{4C3B2264-EA73-4A7B-9CFE-65B0FD635EBB}.Release|ARM64.Build.0 = Release|ARM64 {4C3B2264-EA73-4A7B-9CFE-65B0FD635EBB}.Release|ARM64.Build.0 = Release|ARM64
{4C3B2264-EA73-4A7B-9CFE-65B0FD635EBB}.Release|x64.ActiveCfg = Release|x64 {4C3B2264-EA73-4A7B-9CFE-65B0FD635EBB}.Release|x64.ActiveCfg = Release|x64
{4C3B2264-EA73-4A7B-9CFE-65B0FD635EBB}.Release|x64.Build.0 = Release|x64 {4C3B2264-EA73-4A7B-9CFE-65B0FD635EBB}.Release|x64.Build.0 = Release|x64
{A608225E-AE0A-4D1A-9B55-97F57C862391}.Debug|ARM64.ActiveCfg = Debug|ARM64
{A608225E-AE0A-4D1A-9B55-97F57C862391}.Debug|ARM64.Build.0 = Debug|ARM64
{A608225E-AE0A-4D1A-9B55-97F57C862391}.Debug|x64.ActiveCfg = Debug|x64
{A608225E-AE0A-4D1A-9B55-97F57C862391}.Debug|x64.Build.0 = Debug|x64
{A608225E-AE0A-4D1A-9B55-97F57C862391}.Release|ARM64.ActiveCfg = Release|ARM64
{A608225E-AE0A-4D1A-9B55-97F57C862391}.Release|ARM64.Build.0 = Release|ARM64
{A608225E-AE0A-4D1A-9B55-97F57C862391}.Release|x64.ActiveCfg = Release|x64
{A608225E-AE0A-4D1A-9B55-97F57C862391}.Release|x64.Build.0 = Release|x64
{1D8C51D2-FFA4-418E-B183-9F42B6A6717E}.Debug|ARM64.ActiveCfg = Debug|ARM64 {1D8C51D2-FFA4-418E-B183-9F42B6A6717E}.Debug|ARM64.ActiveCfg = Debug|ARM64
{1D8C51D2-FFA4-418E-B183-9F42B6A6717E}.Debug|ARM64.Build.0 = Debug|ARM64 {1D8C51D2-FFA4-418E-B183-9F42B6A6717E}.Debug|ARM64.Build.0 = Debug|ARM64
{1D8C51D2-FFA4-418E-B183-9F42B6A6717E}.Debug|x64.ActiveCfg = Debug|x64 {1D8C51D2-FFA4-418E-B183-9F42B6A6717E}.Debug|x64.ActiveCfg = Debug|x64