Browse Source

Code refactoring - move QHotKey from /src/core to the /external

(cherry picked from commit a71de9d5643be4ec2803b2d60c7fb858586b2bee)
Yuriy Puchkov 4 years ago
parent
commit
d4706b3096
3 changed files with 8 additions and 10 deletions
  1. 4 4
      CMakeLists.txt
  2. 4 4
      external/QHotkey/CMakeLists.txt
  3. 0 2
      src/core/CMakeLists.txt

+ 4 - 4
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()
 

+ 4 - 4
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
         $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
         $<INSTALL_INTERFACE:include>)

+ 0 - 2
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)