Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
cmake_minimum_required(VERSION 3.0.0)
project(implot_demos VERSION 0.1.0)

set(CMAKE_CXX_STANDARD 17)
add_compile_options(-O3 -march=native)

###############################################################################
# 3RD PARTY LIBS
###############################################################################
Expand Down Expand Up @@ -82,7 +85,11 @@ add_library(imgui ${IMGUI_HEADERS} ${IMGUI_SRC})
if(MSVC)
target_compile_options(imgui PRIVATE /W4 /WX /arch:AVX2 /fp:fast)
endif()
target_link_libraries(imgui PUBLIC glfw glad OpenGL::GL imm32)
if(WIN32)
target_link_libraries(imgui PUBLIC glfw glad OpenGL::GL imm32)
else()
target_link_libraries(imgui PUBLIC glfw glad OpenGL::GL)
endif()
target_compile_definitions(imgui PRIVATE IMGUI_DLL_EXPORT)

include_directories(../imgui/ ../imgui/examples ../imgui/examples/libs/gl3w ../imgui/backends ../imgui/misc/cpp)
Expand Down
2 changes: 2 additions & 0 deletions common/App.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,9 @@ App::App(std::string title, int w, int h, int argc, char const *argv[])
const bool no_vsync = result["vsync"].as<bool>();
const bool use_msaa = result["msaa"].as<bool>();
const bool im_style = result["imgui"].as<bool>();
#if defined(_WIN32)
NvOptimusEnablement = AmdPowerXpressRequestHighPerformance = result["gpu"].as<bool>();
#endif

#ifdef _DEBUG
title += " - OpenGL - Debug";
Expand Down