mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-09-13 20:23:04 +02:00
if we want to test QET on QT6, KF5 must be removed from the code, this switch is for that, this is for testing only
133 lines
3.5 KiB
CMake
133 lines
3.5 KiB
CMake
# 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 <http://www.gnu.org/licenses/>.
|
|
|
|
include(cmake/hoto_update_cmake_message.cmake)
|
|
|
|
cmake_minimum_required(VERSION 3.14...3.19 FATAL_ERROR)
|
|
|
|
project(qelectrotech
|
|
VERSION 0.8.0
|
|
DESCRIPTION "QET is a CAD/CAE editor focusing on schematics drawing features."
|
|
HOMEPAGE_URL "https://qelectrotech.org/"
|
|
LANGUAGES CXX)
|
|
|
|
include(cmake/copyright_message.cmake)
|
|
|
|
set(QET_DIR ${PROJECT_SOURCE_DIR})
|
|
|
|
# Add sub directories
|
|
option(PACKAGE_TESTS "Build the tests" ON)
|
|
if(PACKAGE_TESTS)
|
|
message("Add sub directorie tests")
|
|
add_subdirectory(tests)
|
|
endif()
|
|
|
|
include(cmake/paths_compilation_installation.cmake)
|
|
include(cmake/start_options.cmake)
|
|
include(cmake/developer_options.cmake)
|
|
include(cmake/git_update_submodules.cmake)
|
|
include(cmake/git_last_commit_sha.cmake)
|
|
include(cmake/fetch_kdeaddons.cmake)
|
|
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)
|
|
set(CMAKE_AUTORCC ON)
|
|
set(CMAKE_AUTOUIC ON)
|
|
|
|
SET(CMAKE_CXX_STANDARD 17)
|
|
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
|
|
|
find_package(
|
|
QT
|
|
NAMES
|
|
Qt6
|
|
Qt5
|
|
COMPONENTS
|
|
${QET_COMPONENTS}
|
|
REQUIRED
|
|
)
|
|
|
|
find_package(
|
|
Qt${QT_VERSION_MAJOR}
|
|
COMPONENTS
|
|
${QET_COMPONENTS}
|
|
REQUIRED)
|
|
|
|
set(CMAKE_AUTOUIC_SEARCH_PATHS ${QET_DIR}/sources/ui)
|
|
|
|
set_source_files_properties(${TS_FILES} PROPERTIES OUTPUT_LOCATION "${QET_DIR}/lang")
|
|
qt5_add_translation(QM_FILES ${TS_FILES})
|
|
|
|
# als laatse
|
|
include(cmake/define_definitions.cmake)
|
|
|
|
add_executable(
|
|
${PROJECT_NAME}
|
|
${QET_SRC_FILES}
|
|
${QM_FILES}
|
|
${QET_DIR}/qelectrotech.qrc
|
|
)
|
|
|
|
target_link_libraries(
|
|
${PROJECT_NAME}
|
|
PUBLIC
|
|
PRIVATE
|
|
pugixml::pugixml
|
|
SingleApplication::SingleApplication
|
|
${KF5_PRIVATE_LIBRARIES}
|
|
${QET_PRIVATE_LIBRARIES}
|
|
)
|
|
|
|
target_include_directories(
|
|
${PROJECT_NAME}
|
|
PRIVATE
|
|
${QET_DIR}/sources/titleblock
|
|
${QET_DIR}/sources/ui
|
|
${QET_DIR}/sources/qetgraphicsitem
|
|
${QET_DIR}/sources/qetgraphicsitem/ViewItem
|
|
${QET_DIR}/sources/qetgraphicsitem/ViewItem/ui
|
|
${QET_DIR}/sources/richtext
|
|
${QET_DIR}/sources/factory
|
|
${QET_DIR}/sources/properties
|
|
${QET_DIR}/sources/dvevent
|
|
${QET_DIR}/sources/editor
|
|
${QET_DIR}/sources/editor/esevent
|
|
${QET_DIR}/sources/editor/graphicspart
|
|
${QET_DIR}/sources/editor/ui
|
|
${QET_DIR}/sources/editor/UndoCommand
|
|
${QET_DIR}/sources/undocommand
|
|
${QET_DIR}/sources/diagramevent
|
|
${QET_DIR}/sources/ElementsCollection
|
|
${QET_DIR}/sources/ElementsCollection/ui
|
|
${QET_DIR}/sources/autoNum
|
|
${QET_DIR}/sources/autoNum/ui
|
|
${QET_DIR}/sources/ui/configpage
|
|
${QET_DIR}/sources/SearchAndReplace
|
|
${QET_DIR}/sources/SearchAndReplace/ui
|
|
${QET_DIR}/sources/NameList
|
|
${QET_DIR}/sources/NameList/ui
|
|
${QET_DIR}/sources/utils
|
|
${QET_DIR}/sources/pugixml
|
|
${QET_DIR}/sources/dataBase
|
|
${QET_DIR}/sources/dataBase/ui
|
|
${QET_DIR}/sources/factory/ui
|
|
${QET_DIR}/sources/print
|
|
)
|