WSL/SLF GitLab Repository

Commit 2697e75c authored by Mathias Bavay's avatar Mathias Bavay
Browse files

Hiding the QT libraries into ADVANCED adn adding a target OSX version for broader compatibility

Also the first effort to address issue 884
parent 27bca564
#SPDX-License-Identifier: GPL-3.0-or-later
CMAKE_MINIMUM_REQUIRED(VERSION 3.1.0)
SET(CMAKE_OSX_DEPLOYMENT_TARGET 10.13)
LIST(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/tools/cmake/")
SET(VERSION_MAJOR 2 CACHE INTERNAL "")
......@@ -16,15 +17,16 @@ INCLUDE("${CMAKE_SOURCE_DIR}/tools/cmake/SetCompilerOptions.cmake")
SET_COMPILER_OPTIONS()
# Specific QT settings
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
SET(CMAKE_AUTOMOC ON)
SET(CMAKE_AUTORCC ON)
SET(CMAKE_AUTOUIC ON)
IF(CMAKE_VERSION VERSION_LESS "3.7.0")
SET(CMAKE_INCLUDE_CURRENT_DIR ON)
ENDIF()
FIND_PACKAGE(Qt5 COMPONENTS Widgets Xml XmlPatterns REQUIRED)
SET(QT5_LIBRARIES Qt5::Widgets Qt5::Xml Qt5::XmlPatterns)
MARK_AS_ADVANCED(FORCE Qt5Core_DIR Qt5Gui_DIR Qt5Network_DIR Qt5Widgets_DIR Qt5XmlPatterns_DIR Qt5Xml_DIR Qt5_DIR)
#finally, SET compile flags
SET(CMAKE_CXX_FLAGS "${ARCH} ${EXTRA}" CACHE STRING "" FORCE)
......@@ -88,6 +90,16 @@ IF(APPLE)
)
ENDIF(APPLE)
# Generate the qm translation files
SET(GENERATE_TRANSLATION_FILES OFF CACHE BOOL "Generate the translations files? (this may require the qttools5-dev package)")
IF(GENERATE_TRANSLATION_FILES)
FIND_PACKAGE(Qt5LinguistTools REQUIRED) #requires package qttools5-dev on Ubuntu
MARK_AS_ADVANCED(FORCE Qt5LinguistTools_DIR)
SET(TS_FILES ./resources/languages/inishell_de.ts)
SET_SOURCE_FILES_PROPERTIES(${TS_FILES} PROPERTIES OUTPUT_LOCATION "./resources/l10n")
qt5_add_translation(qmFiles ${TS_FILES})
ENDIF(GENERATE_TRANSLATION_FILES)
###########################################################
# Custom targets
ADD_CUSTOM_TARGET(distclean make clean
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment