|
@@ -1,12 +1,12 @@
|
|
|
cmake_minimum_required(VERSION 3.13)
|
|
|
# cmake_policy(SET CMP0076 OLD)
|
|
|
|
|
|
-set(FLAMESHOT_VERSION 0.8.5.10)
|
|
|
+set(FLAMESHOT_VERSION 0.9.0)
|
|
|
|
|
|
# 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)
|
|
@@ -31,35 +31,37 @@ set(GIT_API_URL "https://api.github.com/repos/namecheap/flameshot/releases/lates
|
|
|
#endif ()
|
|
|
|
|
|
project(
|
|
|
- flameshot
|
|
|
- VERSION ${FLAMESHOT_VERSION}
|
|
|
- LANGUAGES CXX)
|
|
|
+ flameshot
|
|
|
+ VERSION ${FLAMESHOT_VERSION}
|
|
|
+ LANGUAGES CXX)
|
|
|
set(PROJECT_NAME_CAPITALIZED "Flameshot")
|
|
|
|
|
|
# This can be read from ${PROJECT_NAME} after project() is called
|
|
|
if (APPLE)
|
|
|
set(CMAKE_OSX_DEPLOYMENT_TARGET "10.15" CACHE STRING "Minimum OS X deployment version")
|
|
|
+ # # Required to generate MOC
|
|
|
+ # add_subdirectory(external/QHotkey)
|
|
|
endif()
|
|
|
|
|
|
|
|
|
# Configuration options
|
|
|
set(DEFAULT_RUN_IN_PLACE FALSE)
|
|
|
if(WIN32)
|
|
|
- set(DEFAULT_RUN_IN_PLACE TRUE)
|
|
|
- # For Windows RC file.
|
|
|
- add_definitions(-DFLAMESHOT_VERSION_MAJOR=${CMAKE_PROJECT_VERSION_MAJOR})
|
|
|
- add_definitions(-DFLAMESHOT_VERSION_MINOR=${CMAKE_PROJECT_VERSION_MINOR})
|
|
|
- add_definitions(-DFLAMESHOT_VERSION_BUGFIX=${CMAKE_PROJECT_VERSION_PATCH})
|
|
|
- add_definitions(-DFLAMESHOT_VERSION_BUILD=1)
|
|
|
- add_definitions(-DFLAMESHOT_VERSION_STRING="${PROJECT_VERSION}")
|
|
|
+ set(DEFAULT_RUN_IN_PLACE TRUE)
|
|
|
+ # For Windows RC file.
|
|
|
+ add_definitions(-DFLAMESHOT_VERSION_MAJOR=${CMAKE_PROJECT_VERSION_MAJOR})
|
|
|
+ add_definitions(-DFLAMESHOT_VERSION_MINOR=${CMAKE_PROJECT_VERSION_MINOR})
|
|
|
+ add_definitions(-DFLAMESHOT_VERSION_BUGFIX=${CMAKE_PROJECT_VERSION_PATCH})
|
|
|
+ add_definitions(-DFLAMESHOT_VERSION_BUILD=1)
|
|
|
+ add_definitions(-DFLAMESHOT_VERSION_STRING="${PROJECT_VERSION}")
|
|
|
elseif(APPLE)
|
|
|
set(Qt5_DIR "$(brew --prefix qt5)/lib/cmake/Qt5/" CACHE PATH "directory where Qt5Config.cmake exists.")
|
|
|
set(CMAKE_MACOSX_BUNDLE ON)
|
|
|
set(CMAKE_MACOSX_RPATH ON)
|
|
|
endif()
|
|
|
set(RUN_IN_PLACE
|
|
|
- ${DEFAULT_RUN_IN_PLACE}
|
|
|
- CACHE BOOL "Run directly in source directory structure")
|
|
|
+ ${DEFAULT_RUN_IN_PLACE}
|
|
|
+ CACHE BOOL "Run directly in source directory structure")
|
|
|
|
|
|
option(GENERATE_TS "Regenerate translation source files" OFF)
|
|
|
|
|
@@ -84,20 +86,20 @@ enable_sanitizers(project_options)
|
|
|
# allow for static analysis options include(cmake/StaticAnalyzers.cmake)
|
|
|
|
|
|
set(QAPPLICATION_CLASS
|
|
|
- QApplication
|
|
|
- CACHE STRING "Inheritance class for SingleApplication")
|
|
|
+ QApplication
|
|
|
+ CACHE STRING "Inheritance class for SingleApplication")
|
|
|
add_subdirectory(external/singleapplication)
|
|
|
|
|
|
if(USE_EXTERNAL_SPDLOG)
|
|
|
- find_package(spdlog REQUIRED)
|
|
|
- message(STATUS "Using external spdlog library")
|
|
|
+ find_package(spdlog REQUIRED)
|
|
|
+ message(STATUS "Using external spdlog library")
|
|
|
else()
|
|
|
- add_subdirectory(external/spdlog)
|
|
|
+ add_subdirectory(external/spdlog)
|
|
|
endif()
|
|
|
|
|
|
-IF (APPLE)
|
|
|
+if (APPLE)
|
|
|
add_subdirectory(external/QHotkey)
|
|
|
-ENDIF ()
|
|
|
+endif()
|
|
|
add_subdirectory(src)
|
|
|
|
|
|
# CPack
|
|
@@ -107,9 +109,9 @@ set(CPACK_PACKAGE_VERSION ${PROJECT_VERSION})
|
|
|
set(CPACK_PACKAGE_HOMEPAGE_URL "https://flameshot.org")
|
|
|
set(CPACK_PACKAGE_CONTACT "flameshot-org developers <info@flameshot.org>")
|
|
|
set(CPACK_PACKAGE_ICON "${CMAKE_SOURCE_DIR}/data/img/app/org.flameshot.Flameshot.svg") # TODO: Can any generator make
|
|
|
- # use of this?
|
|
|
+# use of this?
|
|
|
set(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_SOURCE_DIR}/README.md") # TODO: Where is this used? Do we need a better
|
|
|
- # source?
|
|
|
+# source?
|
|
|
|
|
|
if(WIN32)
|
|
|
# Include all dynamically linked runtime libraries such as MSVCRxxx.dll
|