cmake_policy(SET CMP0043 OLD)
endif()
+# Honor visibility settings for all target types
+if (CMAKE_VERSION VERSION_GREATER 3.3)
+ cmake_policy(SET CMP0063 NEW)
+endif()
+
# Simplify later checks
#####################################################################
PURPOSE "Enable support for the snorenotify framework"
)
endif()
-
+
if (WITH_WEBKIT)
find_package(Qt5WebKit QUIET)
if (ECM_FOUND)
list(APPEND CMAKE_MODULE_PATH ${ECM_MODULE_PATH})
- endif()
-
- if (WITH_KDE)
- find_package(KF5 COMPONENTS ConfigWidgets CoreAddons Notifications NotifyConfig TextWidgets WidgetsAddons XmlGui QUIET)
- set_package_properties(KF5 PROPERTIES TYPE REQUIRED
- URL "http://www.kde.org"
- DESCRIPTION "KDE Frameworks"
- PURPOSE "Required for integration into the Plasma desktop"
- )
-
- endif()
+ if (WITH_KDE)
+ find_package(KF5 COMPONENTS ConfigWidgets CoreAddons Notifications NotifyConfig TextWidgets WidgetsAddons XmlGui QUIET)
+ set_package_properties(KF5 PROPERTIES TYPE REQUIRED
+ URL "http://www.kde.org"
+ DESCRIPTION "KDE Frameworks"
+ PURPOSE "Required for integration into the Plasma desktop"
+ )
+ else(WITH_KDE)
+ find_package(KF5Sonnet QUIET)
+ set_package_properties(KF5Sonnet PROPERTIES TYPE RECOMMENDED
+ URL "http://api.kde.org/frameworks-api/frameworks5-apidocs/sonnet/html"
+ DESCRIPTION "framework for providing spell-checking capabilities"
+ PURPOSE "Enables spell-checking support in input widgets"
+ )
+ endif(WITH_KDE)
+ endif(ECM_FOUND)
endif(BUILD_GUI)
cmake_push_check_state(RESET)
set(CMAKE_REQUIRED_INCLUDES ${QT_INCLUDES} ${Qt5Core_INCLUDE_DIRS})
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${Qt5Core_EXECUTABLE_COMPILE_FLAGS}")
+
+if (USE_QT5 AND Qt5_POSITION_INDEPENDENT_CODE)
+ set(CMAKE_REQUIRED_FLAGS "-fPIC -DQT_NO_VERSION_TAGGING")
+endif()
+
check_cxx_source_compiles("
#include \"qglobal.h\"
#if defined QT_NO_SSL
get_git_head_revision(GIT_REFSPEC GIT_HEAD)
git_describe(GIT_DESCRIBE --long)
+# If in a Git repo we can get the commit-date from a git command
+if (GIT_HEAD)
+ execute_process(
+ COMMAND git show -s --format=%ct
+ WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
+ OUTPUT_VARIABLE GIT_COMMIT_DATE
+ OUTPUT_STRIP_TRAILING_WHITESPACE
+ )
+endif()
+
# If not in a Git repo try to read GIT_HEAD and GIT_DESCRIBE from
# enviroment
if (NOT GIT_HEAD OR NOT GIT_DESCRIBE)
if (NOT GIT_HEAD OR NOT GIT_DESCRIBE)
set(GIT_HEAD "")
set(GIT_DESCRIBE "")
+ set(GIT_COMMIT_DATE 0)
endif()
configure_file(version.h.in ${CMAKE_BINARY_DIR}/version.h @ONLY)