diff --git a/CMakeLists.txt b/CMakeLists.txt index 82e69ce27..2836ef208 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -14,6 +14,8 @@ # You should have received a copy of the GNU General Public License # along with QElectroTech. If not, see . +include(cmake/hoto_update_cmake_message.cmake) + cmake_minimum_required(VERSION 3.14...3.19 FATAL_ERROR) project(qelectrotech @@ -43,7 +45,6 @@ include(cmake/fetch_singleapplication.cmake) include(cmake/fetch_pugixml.cmake) include(cmake/qet_compilation_vars.cmake) - set(CMAKE_INCLUDE_CURRENT_DIR ON) set(CMAKE_AUTOMOC ON) diff --git a/cmake/define_definitions.cmake b/cmake/define_definitions.cmake new file mode 100644 index 000000000..c3f93bbe8 --- /dev/null +++ b/cmake/define_definitions.cmake @@ -0,0 +1,66 @@ +# Copyright 2006 The QElectroTech Team +# This file is part of QElectroTech. +# +# QElectroTech is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 2 of the License, or +# (at your option) any later version. +# +# QElectroTech is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with QElectroTech. If not, see . + +# Paths used for compilation and installation of QET + +message(" - define_definitions") + +message("Paths used for compilation and installation of QET") +message("--------------------------------------------------") +message("COMPIL_PREFIX " ${COMPIL_PREFIX}) +message("INSTALL_PREFIX " ${INSTALL_PREFIX}) +message("QET_BINARY_PATH " ${QET_BINARY_PATH}) + +if(${QET_COMMON_COLLECTION_PATH} STRGREATER "") + message("QET_COMMON_COLLECTION_PATH " ${QET_COMMON_COLLECTION_PATH}) + add_definitions(-DQET_COMMON_COLLECTION_PATH=${QET_COMMON_COLLECTION_PATH}) +endif() +if(${QET_COMMON_TBT_PATH} STRGREATER "") + message("QET_COMMON_TBT_PATH " ${QET_COMMON_TBT_PATH}) + add_definitions(-DQET_COMMON_TBT_PATH=${QET_COMMON_TBT_PATH}) +endif() +if(${QET_LANG_PATH_RELATIVE_TO_BINARY_PATH}) + add_definitions(-DQET_LANG_PATH_RELATIVE_TO_BINARY_PATH) +endif() +if(${QET_LANG_PATH} STRGREATER "") + message("QET_LANG_PATH " ${QET_LANG_PATH}) + add_definitions(-DQET_LANG_PATH=${QET_LANG_PATH}) +endif() +if(${QET_EXAMPLES_PATH} STRGREATER "") + message("QET_EXAMPLES_PATH " ${QET_EXAMPLES_PATH}) + add_definitions(-DQET_EXAMPLES_PATH=${QET_EXAMPLES_PATH}) +endif() + +message("QET_LICENSE_PATH " ${QET_LICENSE_PATH}) +message("QET_MIME_XML_PATH " ${QET_MIME_XML_PATH}) +message("QET_MIME_DESKTOP_PATH " ${QET_MIME_DESKTOP_PATH}) +message("QET_MIME_PACKAGE_PATH " ${QET_MIME_PACKAGE_PATH}) +message("QET_DESKTOP_PATH " ${QET_DESKTOP_PATH}) +message("QET_ICONS_PATH " ${QET_ICONS_PATH}) +message("QET_MAN_PATH " ${QET_MAN_PATH}) +message("QET_APPDATA_PATH " ${QET_APPDATA_PATH}) +message("ICON " ${ICON}) +message("--------------------------------------------------") +message("PROJECT_NAME :" ${PROJECT_NAME}) +message("PROJECT_VERSION :" ${PROJECT_VERSION}) +message("PROJECT_DESCRIPTION :" ${PROJECT_DESCRIPTION}) +message("PROJECT_HOMEPAGE_URL :" ${PROJECT_HOMEPAGE_URL}) +message("PROJECT_SOURCE_DIR :" ${PROJECT_SOURCE_DIR}) +message("QET_DIR :" ${QET_DIR}) +message("GIT_COMMIT_SHA :" ${GIT_COMMIT_SHA}) +message("KF5_GIT_TAG :" ${KF5_GIT_TAG}) +message("QET_COMPONENTS :" ${QET_COMPONENTS}) +message("QT_VERSION_MAJOR :" ${QT_VERSION_MAJOR}) diff --git a/cmake/hoto_update_cmake_message.cmake b/cmake/hoto_update_cmake_message.cmake new file mode 100644 index 000000000..cafe4f0f9 --- /dev/null +++ b/cmake/hoto_update_cmake_message.cmake @@ -0,0 +1,25 @@ +# Copyright 2006 The QElectroTech Team +# This file is part of QElectroTech. +# +# QElectroTech is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 2 of the License, or +# (at your option) any later version. +# +# QElectroTech is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with QElectroTech. If not, see . + +if(${CMAKE_VERSION} VERSION_LESS 3.14) + message( + "_____________________________________________________________________") + message("to update Cmake on linux:") + message( + "curl https://github.com/Kitware/CMake/releases/download/v3.19.1/cmake-3.19.1-Linux-x86_64.sh -o cmake.sh") + message( + "sudo sh cmake.sh --prefix=/usr/local/ --exclude-subdir") +endif()