Skip to content

Commit

Permalink
[imgui] imgui[glfw-binding]:wasm32-emscripten build fix (microsoft#30797
Browse files Browse the repository at this point in the history
)

* [imgui] fixed imgui[glfw-binding] build for emscripten (microsoft#30790)

* [imgui] updated versions (microsoft#30790)

* Updated imgui-config.cmake.in with suggested changes.

* Updated git-tree.
  • Loading branch information
pozemka authored Apr 26, 2023
1 parent 40ab347 commit 70992f6
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 5 deletions.
6 changes: 4 additions & 2 deletions ports/imgui/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,10 @@ if(IMGUI_BUILD_DX12_BINDING)
endif()

if(IMGUI_BUILD_GLFW_BINDING)
find_package(glfw3 CONFIG REQUIRED)
target_link_libraries(${PROJECT_NAME} PUBLIC glfw)
if(NOT EMSCRIPTEN)
find_package(glfw3 CONFIG REQUIRED)
target_link_libraries(${PROJECT_NAME} PUBLIC glfw)
endif()
target_sources(${PROJECT_NAME} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/backends/imgui_impl_glfw.cpp)
endif()

Expand Down
4 changes: 3 additions & 1 deletion ports/imgui/imgui-config.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ cmake_policy(SET CMP0012 NEW)
include(CMakeFindDependencyMacro)

if (@IMGUI_BUILD_GLFW_BINDING@)
find_dependency(glfw3 CONFIG)
if (NOT "@EMSCRIPTEN@")
find_dependency(glfw3 CONFIG)
endif()
endif()

if (@IMGUI_BUILD_GLUT_BINDING@)
Expand Down
6 changes: 5 additions & 1 deletion ports/imgui/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "imgui",
"version": "1.89.4",
"port-version": 1,
"description": "Bloat-free Immediate Mode Graphical User interface for C++ with minimal dependencies.",
"homepage": "https://github.com/ocornut/imgui",
"license": "MIT",
Expand Down Expand Up @@ -49,7 +50,10 @@
"glfw-binding": {
"description": "Make available GLFW binding",
"dependencies": [
"glfw3"
{
"name": "glfw3",
"platform": "!emscripten"
}
]
},
"glut-binding": {
Expand Down
2 changes: 1 addition & 1 deletion versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -3270,7 +3270,7 @@
},
"imgui": {
"baseline": "1.89.4",
"port-version": 0
"port-version": 1
},
"imgui-sfml": {
"baseline": "2.5",
Expand Down
5 changes: 5 additions & 0 deletions versions/i-/imgui.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "68cf6847418f27dbd3ae70c557b1ef1357875fa1",
"version": "1.89.4",
"port-version": 1
},
{
"git-tree": "337ea84e098e85d4706ecdd807fe292933d9e6f8",
"version": "1.89.4",
Expand Down

0 comments on commit 70992f6

Please sign in to comment.