From d4706b3096dfc003c066e9798fcbd704804f52a1 Mon Sep 17 00:00:00 2001 From: Yuriy Puchkov Date: Wed, 10 Feb 2021 19:08:26 +0200 Subject: [PATCH] Code refactoring - move QHotKey from /src/core to the /external (cherry picked from commit a71de9d5643be4ec2803b2d60c7fb858586b2bee) --- CMakeLists.txt | 8 ++++---- external/QHotkey/CMakeLists.txt | 8 ++++---- src/core/CMakeLists.txt | 2 -- 3 files changed, 8 insertions(+), 10 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 1a844a87..4b2e122c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,12 +1,12 @@ cmake_minimum_required(VERSION 3.13) # cmake_policy(SET CMP0076 OLD) -set(FLAMESHOT_VERSION 0.9.0) +set(FLAMESHOT_VERSION 0.8.5.10) # Flameshot-org -set(GIT_API_URL "https://api.github.com/repos/flameshot-org/flameshot/releases/latest") +#set(GIT_API_URL "https://api.github.com/repos/flameshot-org/flameshot/releases/latest") # Namecheap -# set(GIT_API_URL "https://api.github.com/repos/namecheap/flameshot/releases/latest") +set(GIT_API_URL "https://api.github.com/repos/namecheap/flameshot/releases/latest") # TODO - fix it for all linux distros # find_package (Git) @@ -37,7 +37,7 @@ project( set(PROJECT_NAME_CAPITALIZED "Flameshot") # This can be read from ${PROJECT_NAME} after project() is called -if(APPLE) +if (APPLE) set(CMAKE_OSX_DEPLOYMENT_TARGET "10.15" CACHE STRING "Minimum OS X deployment version") endif() diff --git a/external/QHotkey/CMakeLists.txt b/external/QHotkey/CMakeLists.txt index 05487262..11e54cd8 100644 --- a/external/QHotkey/CMakeLists.txt +++ b/external/QHotkey/CMakeLists.txt @@ -33,11 +33,11 @@ else() set(SRC_FILES ${SRC_FILES} qhotkey_x11.cpp) endif() -add_library(qhotkey ${SRC_FILES} ${MOC_HEADERS}) -add_library(QHotkey::QHotkey ALIAS qhotkey) -target_link_libraries(qhotkey ${LIBS}) +add_library(QHotkey ${SRC_FILES} ${MOC_HEADERS}) +add_library(QHotkey::QHotkey ALIAS QHotkey) +target_link_libraries(QHotkey ${LIBS}) -target_include_directories(qhotkey +target_include_directories(QHotkey PUBLIC $ $) diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt index 703fd89a..8518184b 100644 --- a/src/core/CMakeLists.txt +++ b/src/core/CMakeLists.txt @@ -1,5 +1,3 @@ -# Required to generate MOC - target_sources(flameshot PRIVATE controller.h flameshotdbusadapter.h qguiappcurrentscreen.h) target_sources(flameshot PRIVATE capturerequest.cpp controller.cpp flameshotdbusadapter.cpp qguiappcurrentscreen.cpp)