diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index 13d6c21..ac66325 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -26,7 +26,7 @@ jobs: run: | sudo add-apt-repository -y "deb http://archive.ubuntu.com/ubuntu `lsb_release -sc` main universe restricted multiverse" sudo apt-get update -y -qq - sudo apt-get install libsdl2-dev libsdl2-image-dev libsdl2-ttf-dev googletest + sudo apt-get install libsdl2-dev libsdl2-image-dev libsdl2-ttf-dev libgtest-dev googletest - name: Configure CMake # Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make. diff --git a/src/tinyui.cpp b/src/tinyui.cpp index b782264..afd992a 100644 --- a/src/tinyui.cpp +++ b/src/tinyui.cpp @@ -85,7 +85,9 @@ Context *Context::create(const char *title, const Style &style, tui_log_func log ctx->mWindowsTitle = title; ctx->mStyle = style; - logVersion(*ctx); + if (ctx->mLogger != nullptr) { + logVersion(*ctx); + } return ctx; } diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 85f2414..7dacced 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -1,7 +1,7 @@ cmake_minimum_required(VERSION 3.10) # Find GoogleTest package (should be found in main CMakeLists.txt) -find_package(GTest REQUIRED) +find_package(GTest CONFIG REQUIRED) # Enable testing enable_testing()