mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-03-04 04:29:58 +01:00
Made available compilation on windows with msys2
The aim of this commit is to easily build qelectrotech under windows with qt6/cmake and the package tool MSYS2. -Update some cmake file. -Remove Git submodule for pugixml and single application -Use cmake find_package for pugi xml -Use cmake fetchContent for single application. -Use cmake find_package for KCoreAddons and KWidgetsAddons. -Minor change for pugi xml -Minor change on ProjectPrintWindow class to compatible with Qt6 API.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
# Copyright 2006 The QElectroTech Team
|
||||
# Copyright 2006-2026 The QElectroTech Team
|
||||
# This file is part of QElectroTech.
|
||||
#
|
||||
# QElectroTech is free software: you can redistribute it and/or modify
|
||||
@@ -14,25 +14,22 @@
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with QElectroTech. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
message(STATUS "fetch_kdeaddons")
|
||||
|
||||
if(BUILD_WITH_KF6)
|
||||
option(BUILD_KF6 "Build KF6 libraries, use system ones otherwise" OFF)
|
||||
option(BUILD_KF6 "Build KF6 libraries, use system ones otherwise" OFF)
|
||||
if(BUILD_KF6)
|
||||
block(PROPAGATE KF6_GIT_TAG)
|
||||
set(BUILD_TESTING OFF)
|
||||
set(KDE_SKIP_TEST_SETTINGS ON)
|
||||
set(BUILD_DESIGNERPLUGIN OFF)
|
||||
set(KCOREADDONS_USE_QML OFF)
|
||||
set(BUILD_QCH OFF)
|
||||
set(BUILD_SHARED_LIBS OFF)
|
||||
find_package(ECM 6.8.0 REQUIRED NO_MODULE)
|
||||
list(APPEND CMAKE_MODULE_PATH ${ECM_MODULE_PATH})
|
||||
message(STATUS " - fetch_kdeaddons")
|
||||
set(KDE_SKIP_TEST_SETTINGS ON)
|
||||
set(KCOREADDONS_USE_QML OFF)
|
||||
set(KWIDGETSADDONS_USE_QML OFF)
|
||||
set(BUILD_TESTING OFF)
|
||||
set(BUILD_DESIGNERPLUGIN OFF)
|
||||
set(BUILD_QCH OFF)
|
||||
set(BUILD_SHARED_LIBS OFF)
|
||||
|
||||
if(BUILD_KF6)
|
||||
Include(FetchContent)
|
||||
|
||||
if(NOT DEFINED KF6_GIT_TAG)
|
||||
set(KF6_GIT_TAG v6.8.0)
|
||||
set(KF6_GIT_TAG v6.22.0)
|
||||
endif()
|
||||
|
||||
FetchContent_Declare(
|
||||
@@ -40,21 +37,19 @@ if(BUILD_WITH_KF6)
|
||||
GIT_REPOSITORY https://invent.kde.org/frameworks/kcoreaddons.git
|
||||
GIT_TAG ${KF6_GIT_TAG})
|
||||
FetchContent_MakeAvailable(kcoreaddons)
|
||||
get_target_property(kca_version KF6::CoreAddons VERSION)
|
||||
|
||||
else()
|
||||
find_package(KF6CoreAddons REQUIRED)
|
||||
set(kca_version ${KF6CoreAddons_VERSION})
|
||||
endif()
|
||||
|
||||
get_target_property(kwa_type KF6::CoreAddons TYPE)
|
||||
|
||||
message(NOTICE "ecm version : " ${ECM_VERSION})
|
||||
message(NOTICE "kcoreaddons library : " ${kca_type})
|
||||
message(NOTICE "kcoreaddons version : " ${kca_version})
|
||||
FetchContent_Declare(
|
||||
kwidgetsaddons
|
||||
GIT_REPOSITORY https://invent.kde.org/frameworks/kwidgetsaddons.git
|
||||
GIT_TAG ${KF6_GIT_TAG})
|
||||
FetchContent_MakeAvailable(kwidgetsaddons)
|
||||
endblock()
|
||||
|
||||
set(KF6_PRIVATE_LIBRARIES
|
||||
KF6::CoreAddons
|
||||
)
|
||||
else()
|
||||
find_package(KF6CoreAddons REQUIRED)
|
||||
find_package(KF6WidgetsAddons REQUIRED)
|
||||
endif()
|
||||
|
||||
set(KF6_PRIVATE_LIBRARIES
|
||||
KF6::CoreAddons
|
||||
KF6::WidgetsAddons
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user