diff --git a/lib/external/imgui/CMakeLists.txt b/lib/external/imgui/CMakeLists.txt index 239fe72ae..d7219273c 100644 --- a/lib/external/imgui/CMakeLists.txt +++ b/lib/external/imgui/CMakeLists.txt @@ -8,10 +8,6 @@ find_package(Freetype REQUIRED) find_package(OpenGL REQUIRED) pkg_search_module(GLFW REQUIRED glfw3) -if (UNIX) - find_package(OpenGL REQUIRED) -endif () - add_library(imgui OBJECT source/imgui.cpp source/imgui_demo.cpp @@ -39,12 +35,8 @@ add_library(imgui OBJECT add_compile_definitions(IMGUI_IMPL_OPENGL_LOADER_GLAD) -target_include_directories(imgui PUBLIC include ${FREETYPE_INCLUDE_DIRS} ${GLFW_INCLUDE_DIRS}) +target_include_directories(imgui PUBLIC include ${FREETYPE_INCLUDE_DIRS} ${GLFW_INCLUDE_DIRS} ${OpenGL_INCLUDE_DIRS}) -target_link_directories(imgui PUBLIC ${GLFW_LIBRARY_DIRS}) +target_link_directories(imgui PUBLIC ${GLFW_LIBRARY_DIRS} ${OpenGL_LIBRARY_DIRS}) -if (WIN32) - target_link_libraries(imgui PUBLIC Freetype::Freetype glfw3 opengl32.lib) -elseif (UNIX) - target_link_libraries(imgui PUBLIC Freetype::Freetype glfw OpenGL::GL) -endif() +target_link_libraries(imgui PUBLIC Freetype::Freetype ${GLFW_LIBRARIES} ${OPENGL_LIBRARIES}) diff --git a/lib/libimhex/CMakeLists.txt b/lib/libimhex/CMakeLists.txt index 8d1281100..c3b33d639 100644 --- a/lib/libimhex/CMakeLists.txt +++ b/lib/libimhex/CMakeLists.txt @@ -72,4 +72,4 @@ elseif (APPLE) endif () target_link_libraries(libimhex PRIVATE ${FMT_LIBRARIES}) -target_link_libraries(libimhex PUBLIC dl imgui ${NFD_LIBRARIES} magic ${CAPSTONE_LIBRARIES} LLVMDemangle microtar ${NLOHMANN_JSON_LIBRARIES} ${YARA_LIBRARIES} ${LIBCURL_LIBRARIES} ${MBEDTLS_LIBRARIES} ${LIBBACKTRACE_LIBRARIES} libpl intervaltree) \ No newline at end of file +target_link_libraries(libimhex PUBLIC dl imgui ${NFD_LIBRARIES} magic ${CAPSTONE_LIBRARIES} LLVMDemangle microtar ${NLOHMANN_JSON_LIBRARIES} ${YARA_LIBRARIES} ${LIBCURL_LIBRARIES} ${MBEDTLS_LIBRARIES} ${LIBBACKTRACE_LIBRARIES} libpl intervaltree ${OpenAL_LIBRARIES}) \ No newline at end of file diff --git a/plugins/builtin/source/content/ui_items.cpp b/plugins/builtin/source/content/ui_items.cpp index a244dcc60..d4024a5bd 100644 --- a/plugins/builtin/source/content/ui_items.cpp +++ b/plugins/builtin/source/content/ui_items.cpp @@ -227,7 +227,7 @@ namespace hex::plugin::builtin { ContentRegistry::Interface::addFooterItem([] { auto taskCount = TaskManager::getRunningTaskCount(); if (taskCount > 0) { - auto &tasks = TaskManager::getRunningTasks(); + const auto &tasks = TaskManager::getRunningTasks(); auto frontTask = tasks.front(); auto progress = frontTask->getMaxValue() == 0 ? 1 : float(frontTask->getValue()) / frontTask->getMaxValue();