-
-
Notifications
You must be signed in to change notification settings - Fork 261
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
102 changed files
with
1,756 additions
and
196 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
Checks: '-*,performance-*,modernize-*,-modernize-use-trailing-return-type,-modernize-use-nodiscard,-modernize-avoid-c-arrays,-modernize-use-auto' | ||
Checks: '-*,performance-*,modernize-*,-modernize-use-trailing-return-type,-modernize-use-nodiscard,-modernize-avoid-c-arrays,-modernize-use-auto,-performance-no-int-to-ptr' | ||
WarningsAsErrors: '*' | ||
UseColor: true | ||
FormatStyle: none |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
cmake_minimum_required(VERSION 3.16) | ||
project(imgui CXX) | ||
|
||
add_library(${PROJECT_NAME} STATIC "") | ||
add_library(${PROJECT_NAME}::${PROJECT_NAME} ALIAS ${PROJECT_NAME}) | ||
target_include_directories( | ||
${PROJECT_NAME} | ||
PUBLIC | ||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}> | ||
$<INSTALL_INTERFACE:include> | ||
) | ||
|
||
target_sources( | ||
${PROJECT_NAME} | ||
PRIVATE | ||
${CMAKE_CURRENT_SOURCE_DIR}/imgui.cpp | ||
${CMAKE_CURRENT_SOURCE_DIR}/imgui_demo.cpp | ||
${CMAKE_CURRENT_SOURCE_DIR}/imgui_draw.cpp | ||
${CMAKE_CURRENT_SOURCE_DIR}/imgui_tables.cpp | ||
${CMAKE_CURRENT_SOURCE_DIR}/imgui_widgets.cpp | ||
) | ||
|
||
target_compile_definitions( | ||
${PROJECT_NAME} | ||
PRIVATE | ||
IMGUI_DISABLE_DEMO_WINDOWS | ||
IMGUI_DISABLE_DEBUG_TOOLS | ||
) | ||
|
||
set_target_properties( | ||
${PROJECT_NAME} | ||
PROPERTIES | ||
CXX_STANDARD 11 | ||
POSITION_INDEPENDENT_CODE ON | ||
) | ||
|
||
install( | ||
TARGETS ${PROJECT_NAME} | ||
EXPORT ${PROJECT_NAME}_target | ||
ARCHIVE DESTINATION lib | ||
LIBRARY DESTINATION lib | ||
RUNTIME DESTINATION bin | ||
) | ||
|
||
install(FILES | ||
${CMAKE_CURRENT_SOURCE_DIR}/imgui.h | ||
${CMAKE_CURRENT_SOURCE_DIR}/imconfig.h | ||
${CMAKE_CURRENT_SOURCE_DIR}/imgui_internal.h | ||
${CMAKE_CURRENT_SOURCE_DIR}/imstb_textedit.h | ||
${CMAKE_CURRENT_SOURCE_DIR}/imstb_rectpack.h | ||
${CMAKE_CURRENT_SOURCE_DIR}/imstb_truetype.h | ||
DESTINATION include | ||
) | ||
|
||
include(CMakePackageConfigHelpers) | ||
configure_package_config_file(imgui-config.cmake.in imgui-config.cmake INSTALL_DESTINATION share/imgui) | ||
|
||
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/imgui-config.cmake DESTINATION share/imgui) | ||
|
||
install( | ||
EXPORT ${PROJECT_NAME}_target | ||
NAMESPACE ${PROJECT_NAME}:: | ||
FILE ${PROJECT_NAME}-targets.cmake | ||
DESTINATION share/${PROJECT_NAME} | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
name: 'Install ImGui Dependency' | ||
description: 'Install ImGui Dependency using cache when possible' | ||
inputs: | ||
cpu: | ||
description: 'CPU architecture to build for' | ||
required: false | ||
default: 'x86_64' | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
|
||
- name: Cache ImGui | ||
id: cache-imgui | ||
uses: actions/cache@v4 | ||
with: | ||
path: dependencies/imgui_install | ||
key: imgui-v1.91.5-${{runner.os}}-${{inputs.cpu}}-2 | ||
|
||
- name: Checkout ImGui | ||
if: steps.cache-imgui.outputs.cache-hit != 'true' | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: ocornut/imgui | ||
path: './dependencies/imgui' | ||
ref: v1.91.5 | ||
|
||
- name: Copy CMake files | ||
if: steps.cache-imgui.outputs.cache-hit != 'true' | ||
working-directory: ${{github.workspace}}/dependencies/imgui | ||
shell: bash | ||
run: | | ||
cp $GITHUB_ACTION_PATH/CMakeLists.txt ./ | ||
cp $GITHUB_ACTION_PATH/imgui-config.cmake.in ./ | ||
- name: Setup ImGui | ||
if: steps.cache-imgui.outputs.cache-hit != 'true' | ||
working-directory: ${{github.workspace}}/dependencies | ||
shell: bash | ||
run: | | ||
mkdir imgui_build | ||
mkdir imgui_install | ||
- name: Configure ImGui | ||
if: steps.cache-imgui.outputs.cache-hit != 'true' | ||
working-directory: ${{github.workspace}}/dependencies/imgui_build | ||
shell: bash | ||
run: > | ||
cmake ../imgui | ||
-DCMAKE_BUILD_TYPE=Release | ||
-DCMAKE_INSTALL_PREFIX:PATH=../imgui_install | ||
-DCMAKE_PREFIX_PATH:PATH=../install/ | ||
${{ runner.os == 'macOS' && '-DCMAKE_OSX_DEPLOYMENT_TARGET=10.15 -DCMAKE_MACOSX_RPATH=ON' || null }} | ||
${{ runner.os == 'Windows' && '-Ax64 -DCMAKE_POLICY_DEFAULT_CMP0091=NEW -DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreadedDLL' || null }} | ||
- name: Build ImGui | ||
if: steps.cache-imgui.outputs.cache-hit != 'true' | ||
working-directory: ${{github.workspace}}/dependencies/imgui_build | ||
shell: bash | ||
run: cmake --build . --parallel 2 --target install --config Release | ||
|
||
- name: Copy to install | ||
working-directory: ${{github.workspace}}/dependencies/imgui_install | ||
shell: bash | ||
run: cp -r ./* ../install/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
cmake_policy(SET CMP0012 NEW) | ||
|
||
@PACKAGE_INIT@ | ||
|
||
include(CMakeFindDependencyMacro) | ||
|
||
include("${CMAKE_CURRENT_LIST_DIR}/imgui-targets.cmake") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.