macos编译

This commit is contained in:
Nana 2024-06-14 21:06:42 +08:00
parent 6a67438476
commit 398ae268c9
2 changed files with 10 additions and 1 deletions

View File

@ -1,6 +1,15 @@
project(imgui LANGUAGES C CXX)
set(CMAKE_CXX_STANDARD 23)
set(CMAKE_C_STANDARD 11)
# macos
if (APPLE)
#
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_C_STANDARD 11)
#
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -x objective-c++")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -x objective-c")
endif ()
set(ALL_FILES
${CMAKE_CURRENT_SOURCE_DIR}/imgui/imgui.h

View File

@ -95,7 +95,7 @@ void run_imgui() {
// - When io.WantCaptureKeyboard is true, do not dispatch keyboard input data to your main application, or clear/overwrite your copy of the keyboard data.
// Generally you may always pass all inputs to dear imgui, and hide them from your application based on those two flags.
glfwPollEvents();
std::this_thread::sleep_for(std::chrono::milliseconds(10));
std::this_thread::sleep_for(std::chrono::milliseconds(5));
int width, height;
glfwGetFramebufferSize(g_main_window, &width, &height);