macos编译
This commit is contained in:
parent
6a67438476
commit
398ae268c9
Arona/third_party/imgui
9
Arona/third_party/imgui/CMakeLists.txt
vendored
9
Arona/third_party/imgui/CMakeLists.txt
vendored
@ -1,6 +1,15 @@
|
|||||||
project(imgui LANGUAGES C CXX)
|
project(imgui LANGUAGES C CXX)
|
||||||
set(CMAKE_CXX_STANDARD 23)
|
set(CMAKE_CXX_STANDARD 23)
|
||||||
set(CMAKE_C_STANDARD 11)
|
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
|
set(ALL_FILES
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/imgui/imgui.h
|
${CMAKE_CURRENT_SOURCE_DIR}/imgui/imgui.h
|
||||||
|
2
Arona/third_party/imgui/imgui_macos_main.mm
vendored
2
Arona/third_party/imgui/imgui_macos_main.mm
vendored
@ -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.
|
// - 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.
|
// Generally you may always pass all inputs to dear imgui, and hide them from your application based on those two flags.
|
||||||
glfwPollEvents();
|
glfwPollEvents();
|
||||||
std::this_thread::sleep_for(std::chrono::milliseconds(10));
|
std::this_thread::sleep_for(std::chrono::milliseconds(5));
|
||||||
|
|
||||||
int width, height;
|
int width, height;
|
||||||
glfwGetFramebufferSize(g_main_window, &width, &height);
|
glfwGetFramebufferSize(g_main_window, &width, &height);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user