Files
qelectrotech-source-mirror/cmake/fetch_pugixml.cmake
joshua fedc1cb092 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.
2026-03-02 22:34:16 +01:00

30 lines
1.0 KiB
CMake

# Copyright 2006-2026 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/>.
option(BUILD_PUGIXML "Build pugixml library, use system one otherwise" OFF)
if(BUILD_PUGIXML)
Include(FetchContent)
message(" - fetch pugixml")
FetchContent_Declare(
pugixml
GIT_REPOSITORY https://github.com/zeux/pugixml.git
GIT_TAG v1.15)
FetchContent_MakeAvailable(pugixml)
else()
find_package(pugixml REQUIRED)
endif()