aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorboriskro <boris.kro@gmail.com>2021-09-23 17:58:28 -0700
committerGitHub <noreply@github.com>2021-09-23 17:58:28 -0700
commit456a50c1e8ef4af7908bd39129c2472a7a3e1661 (patch)
treeccef3c70ceb1f346eec61f976f5eabc3c3942b71
parentb8a9f2b6d4cd42bb8489a1bdbe5a6df4997dff41 (diff)
downloadvcpkg-456a50c1e8ef4af7908bd39129c2472a7a3e1661.tar.gz
vcpkg-456a50c1e8ef4af7908bd39129c2472a7a3e1661.zip
Fix build issues on OSX when these flags are enabled: osx-bindings, metal-bindings (#20281)
* [imgui] Fix build issues on OSX * bump required cmake version because OBJCXX support has been introduced in 3.16 * set C++ standard to c++11 on Apple. Imgui own examples use c++14, however c++11 was found to be sufficient * enable Objective-C++ mode for *.mm sources * add `-fobjc-weak` flag for imgui_impl_metal.mm to fix compile error * [imgui] Fix build issues on OSX * bump required cmake version because OBJCXX support has been introduced in 3.16 * set C++ standard to c++11 on Apple. Imgui own examples use c++14, however c++11 was found to be sufficient * enable Objective-C++ mode for *.mm sources * add `-fobjc-weak` flag for imgui_impl_metal.mm to fix compile error * Update ports/imgui/vcpkg.json Co-authored-by: Jack·Boos·Yu <47264268+JackBoosY@users.noreply.github.com> * [imgui] Fix manifest format * Ran `vcpkg x-add-version imgui` Co-authored-by: Jack·Boos·Yu <47264268+JackBoosY@users.noreply.github.com>
-rw-r--r--ports/imgui/CMakeLists.txt8
-rw-r--r--ports/imgui/vcpkg.json1
-rw-r--r--versions/baseline.json2
-rw-r--r--versions/i-/imgui.json5
4 files changed, 14 insertions, 2 deletions
diff --git a/ports/imgui/CMakeLists.txt b/ports/imgui/CMakeLists.txt
index b049fdd43..61f9cb8ee 100644
--- a/ports/imgui/CMakeLists.txt
+++ b/ports/imgui/CMakeLists.txt
@@ -1,8 +1,13 @@
-cmake_minimum_required(VERSION 3.8)
+cmake_minimum_required(VERSION 3.16)
project(imgui CXX)
set(CMAKE_DEBUG_POSTFIX d)
+if(APPLE)
+ set(CMAKE_CXX_STANDARD 11)
+ enable_language(OBJCXX)
+endif()
+
add_library(${PROJECT_NAME} "")
add_library(${PROJECT_NAME}::${PROJECT_NAME} ALIAS ${PROJECT_NAME})
target_include_directories(
@@ -59,6 +64,7 @@ endif()
if(IMGUI_BUILD_METAL_BINDING)
target_sources(${PROJECT_NAME} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/backends/imgui_impl_metal.mm)
+ set_source_files_properties(${CMAKE_CURRENT_SOURCE_DIR}/backends/imgui_impl_metal.mm PROPERTIES COMPILE_FLAGS -fobjc-weak)
endif()
if(IMGUI_BUILD_OPENGL2_BINDING)
diff --git a/ports/imgui/vcpkg.json b/ports/imgui/vcpkg.json
index e58bf6b94..c41b330b9 100644
--- a/ports/imgui/vcpkg.json
+++ b/ports/imgui/vcpkg.json
@@ -1,6 +1,7 @@
{
"name": "imgui",
"version": "1.84.2",
+ "port-version": 1,
"description": "Bloat-free Immediate Mode Graphical User interface for C++ with minimal dependencies.",
"homepage": "https://github.com/ocornut/imgui",
"features": {
diff --git a/versions/baseline.json b/versions/baseline.json
index cc14fd577..b543f83bb 100644
--- a/versions/baseline.json
+++ b/versions/baseline.json
@@ -2758,7 +2758,7 @@
},
"imgui": {
"baseline": "1.84.2",
- "port-version": 0
+ "port-version": 1
},
"imgui-sfml": {
"baseline": "2.1",
diff --git a/versions/i-/imgui.json b/versions/i-/imgui.json
index 28772d004..7ca2d7122 100644
--- a/versions/i-/imgui.json
+++ b/versions/i-/imgui.json
@@ -1,6 +1,11 @@
{
"versions": [
{
+ "git-tree": "0d0f402c97029e9c2021ca776e2bebc645cc5ecc",
+ "version": "1.84.2",
+ "port-version": 1
+ },
+ {
"git-tree": "c07b221daf49a22fc9e8e7571bb329485f618a7f",
"version": "1.84.2",
"port-version": 0