From e39bb02e96615aeb7a8f9ffe714b6777bf4437ca Mon Sep 17 00:00:00 2001 From: Martin Shetty <1972005+martukas@users.noreply.github.com> Date: Thu, 14 Oct 2021 21:06:29 -0700 Subject: [PATCH] "different way to bring in resources; updates #53" --- .github/workflows/build.yml | 2 +- CMakeLists.txt | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 7422512..05047d2 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -18,7 +18,7 @@ jobs: run: | mkdir build cd build - cmake -DQNANO_WIDGETS=1 -DQNANO_QUICK=1 .. + cmake .. - name: Build library run: | cd build diff --git a/CMakeLists.txt b/CMakeLists.txt index e548640..4fead87 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -67,6 +67,9 @@ find_package(QT NAMES Qt5 Qt6 Qt4 COMPONENTS Core QUIET) message(STATUS "Detected QT major version = ${QT_VERSION_MAJOR}") find_package(Qt${QT_VERSION_MAJOR} COMPONENTS Core Gui REQUIRED) +# Auto generate moc files +set(CMAKE_AUTORCC ON) + set(${this_target}_sources libqnanopainter libqnanopainter/qnanopainter.cpp @@ -100,8 +103,9 @@ set(${this_target}_headers libqnanopainter/nanovg/nanovg.h ) -qt_add_resources(${this_target}_resources - libqnanopainter/libqnanopainterdata.qrc) +set(${this_target}_resources + libqnanopainter/libqnanopainterdata.qrc + ) if(${QNANO_BUILD_GLES_BACKENDS}) message(STATUS "QNanoPainter: Including OpenGL ES backends")