-
Notifications
You must be signed in to change notification settings - Fork 2
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
24 changed files
with
160 additions
and
33 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
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,7 @@ | ||
superbuild_add_project(imgui | ||
BUILD_SHARED_LIBS_INDEPENDENT | ||
LICENSE_FILES | ||
LICENSE.txt | ||
) | ||
|
||
superbuild_apply_patch(imgui cmake-build "Add CMake build system") |
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,109 @@ | ||
commit cab05d14c0ef97e286971f388df2f656642e6835 | ||
Author: Michael Migliore <[email protected]> | ||
Date: Thu Nov 28 09:20:46 2024 +0100 | ||
|
||
Add CMake build system | ||
|
||
diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
new file mode 100644 | ||
index 00000000..dbb79cd0 | ||
--- /dev/null | ||
+++ b/CMakeLists.txt | ||
@@ -0,0 +1,71 @@ | ||
+cmake_minimum_required(VERSION 3.16) | ||
+project(imgui CXX) | ||
+ | ||
+add_library(${PROJECT_NAME} "") | ||
+ | ||
+include(GenerateExportHeader) | ||
+generate_export_header(${PROJECT_NAME} | ||
+ EXPORT_FILE_NAME imgui_export.h | ||
+ EXPORT_MACRO_NAME IMGUI_API) | ||
+ | ||
+target_include_directories( | ||
+ ${PROJECT_NAME} | ||
+ PUBLIC | ||
+ $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}> | ||
+ $<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}> | ||
+ $<INSTALL_INTERFACE:include> | ||
+) | ||
+ | ||
+target_sources( | ||
+ ${PROJECT_NAME} | ||
+ PRIVATE | ||
+ ${CMAKE_CURRENT_SOURCE_DIR}/imgui.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_BINARY_DIR}/imgui_export.h | ||
+ ${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} | ||
+) | ||
diff --git a/imgui-config.cmake.in b/imgui-config.cmake.in | ||
new file mode 100644 | ||
index 00000000..b9e55800 | ||
--- /dev/null | ||
+++ b/imgui-config.cmake.in | ||
@@ -0,0 +1,7 @@ | ||
+cmake_policy(SET CMP0012 NEW) | ||
+ | ||
+@PACKAGE_INIT@ | ||
+ | ||
+include(CMakeFindDependencyMacro) | ||
+ | ||
+include("${CMAKE_CURRENT_LIST_DIR}/imgui-targets.cmake") | ||
diff --git a/imgui.h b/imgui.h | ||
index d6286592..c91cb811 100644 | ||
--- a/imgui.h | ||
+++ b/imgui.h | ||
@@ -65,6 +65,8 @@ Index of this file: | ||
|
||
#ifndef IMGUI_DISABLE | ||
|
||
+#include "imgui_export.h" | ||
+ | ||
//----------------------------------------------------------------------------- | ||
// [SECTION] Header mess | ||
//----------------------------------------------------------------------------- |
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.
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.
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.
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.
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.
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.
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.
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