From 04426650bc6801fd6a689999d76ada539a88e305 Mon Sep 17 00:00:00 2001 From: Stephan Vedder Date: Fri, 17 Mar 2023 16:00:48 +0100 Subject: [PATCH 1/3] Setup a working CMake build --- CMakeLists.txt | 15 +++ cmake/Modules/Findlibgit2.cmake | 32 +++++++ pri/autoroute.pri | 40 -------- pri/boostdetect.pri | 64 ------------- pri/gitversion.pri | 39 -------- pri/help.pri | 21 ----- pri/items.pri | 87 ------------------ pri/kitchensink.pri | 44 --------- pri/libgit2detect.pri | 71 -------------- pri/mainwindow.pri | 28 ------ pri/model.pri | 27 ------ pri/partsbinpalette.pri | 39 -------- pri/partseditor.pri | 91 ------------------ pri/program.pri | 51 ---------- pri/quazip.pri | 37 -------- pri/referencemodel.pri | 26 ------ pri/sketch.pri | 36 -------- pri/svg.pri | 51 ---------- pri/utils.pri | 68 -------------- src/CMakeLists.txt | 92 +++++++++++++++++++ src/autoroute/CMakeLists.txt | 42 +++++++++ src/connectors/CMakeLists.txt | 36 ++++++++ src/dialogs/CMakeLists.txt | 48 ++++++++++ src/dialogs/dialogs.pri | 40 -------- .../dock/CMakeLists.txt | 10 +- pri/infoview.pri => src/eagle/CMakeLists.txt | 10 +- src/fapplication.cpp | 4 +- src/help/CMakeLists.txt | 26 ++++++ pri/eagle.pri => src/infoview/CMakeLists.txt | 10 +- src/items/CMakeLists.txt | 88 ++++++++++++++++++ src/lib/CMakeLists.txt | 36 ++++++++ src/mainwindow/CMakeLists.txt | 31 +++++++ .../model/CMakeLists.txt | 34 +++---- src/partsbinpalette/CMakeLists.txt | 42 +++++++++ src/partseditor/CMakeLists.txt | 46 ++++++++++ src/program/CMakeLists.txt | 54 +++++++++++ .../referencemodel/CMakeLists.txt | 15 +-- src/sketch/CMakeLists.txt | 38 ++++++++ src/svg/CMakeLists.txt | 56 +++++++++++ src/utils/CMakeLists.txt | 70 ++++++++++++++ src/utils/misc.cpp | 5 +- pri/version.pri => src/version/CMakeLists.txt | 35 +++---- 42 files changed, 817 insertions(+), 918 deletions(-) create mode 100644 CMakeLists.txt create mode 100644 cmake/Modules/Findlibgit2.cmake delete mode 100644 pri/autoroute.pri delete mode 100644 pri/boostdetect.pri delete mode 100644 pri/gitversion.pri delete mode 100644 pri/help.pri delete mode 100644 pri/items.pri delete mode 100644 pri/kitchensink.pri delete mode 100644 pri/libgit2detect.pri delete mode 100644 pri/mainwindow.pri delete mode 100644 pri/model.pri delete mode 100644 pri/partsbinpalette.pri delete mode 100644 pri/partseditor.pri delete mode 100644 pri/program.pri delete mode 100644 pri/quazip.pri delete mode 100644 pri/referencemodel.pri delete mode 100644 pri/sketch.pri delete mode 100644 pri/svg.pri delete mode 100644 pri/utils.pri create mode 100644 src/CMakeLists.txt create mode 100644 src/autoroute/CMakeLists.txt create mode 100644 src/connectors/CMakeLists.txt create mode 100644 src/dialogs/CMakeLists.txt delete mode 100644 src/dialogs/dialogs.pri rename pri/qtsysteminfo.pri => src/dock/CMakeLists.txt (78%) rename pri/infoview.pri => src/eagle/CMakeLists.txt (77%) create mode 100644 src/help/CMakeLists.txt rename pri/eagle.pri => src/infoview/CMakeLists.txt (78%) create mode 100644 src/items/CMakeLists.txt create mode 100644 src/lib/CMakeLists.txt create mode 100644 src/mainwindow/CMakeLists.txt rename pri/connectors.pri => src/model/CMakeLists.txt (58%) create mode 100644 src/partsbinpalette/CMakeLists.txt create mode 100644 src/partseditor/CMakeLists.txt create mode 100644 src/program/CMakeLists.txt rename pri/dock.pri => src/referencemodel/CMakeLists.txt (73%) create mode 100644 src/sketch/CMakeLists.txt create mode 100644 src/svg/CMakeLists.txt create mode 100644 src/utils/CMakeLists.txt rename pri/version.pri => src/version/CMakeLists.txt (54%) diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 000000000..57b345a61 --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,15 @@ +cmake_minimum_required(VERSION 3.1.0) +project(Fritzing VERSION 0.6.4 LANGUAGES C CXX) + +set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/Modules/") + +set(CMAKE_CXX_STANDARD 17) +set(CMAKE_CXX_STANDARD_REQUIRED ON) + +set(CMAKE_AUTOMOC ON) +set(CMAKE_AUTORCC ON) +set(CMAKE_AUTOUIC ON) + +find_package(Qt5 COMPONENTS Widgets REQUIRED) + +add_subdirectory(src) diff --git a/cmake/Modules/Findlibgit2.cmake b/cmake/Modules/Findlibgit2.cmake new file mode 100644 index 000000000..da4390246 --- /dev/null +++ b/cmake/Modules/Findlibgit2.cmake @@ -0,0 +1,32 @@ +# - Try to find the libgit2 library +# Once done this will define +# +# LIBGIT2_FOUND - System has libgit2 +# LIBGIT2_INCLUDE_DIR - The libgit2 include directory +# LIBGIT2_LIBRARIES - The libraries needed to use libgit2 +# LIBGIT2_DEFINITIONS - Compiler switches required for using libgit2 + + +# use pkg-config to get the directories and then use these values +# in the FIND_PATH() and FIND_LIBRARY() calls +#FIND_PACKAGE(PkgConfig) +#PKG_SEARCH_MODULE(PC_LIBGIT2 libgit2) + +SET(LIBGIT2_DEFINITIONS ${PC_LIBGIT2_CFLAGS_OTHER}) + +FIND_PATH(LIBGIT2_INCLUDE_DIR NAMES git2.h + HINTS + ${PC_LIBGIT2_INCLUDEDIR} + ${PC_LIBGIT2_INCLUDE_DIRS} +) + +FIND_LIBRARY(LIBGIT2_LIBRARIES NAMES git2 + HINTS + ${PC_LIBGIT2_LIBDIR} + ${PC_LIBGIT2_LIBRARY_DIRS} +) + +INCLUDE(FindPackageHandleStandardArgs) +FIND_PACKAGE_HANDLE_STANDARD_ARGS(libgit2 DEFAULT_MSG LIBGIT2_LIBRARIES LIBGIT2_INCLUDE_DIR) + +MARK_AS_ADVANCED(LIBGIT2_INCLUDE_DIR LIBGIT2_LIBRARIES) \ No newline at end of file diff --git a/pri/autoroute.pri b/pri/autoroute.pri deleted file mode 100644 index e555d81d9..000000000 --- a/pri/autoroute.pri +++ /dev/null @@ -1,40 +0,0 @@ -# /******************************************************************* -# Part of the Fritzing project - http://fritzing.org -# Copyright (c) 2007-08 Fritzing -# Fritzing 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 3 of the License, or -# (at your option) any later version. -# Fritzing 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 Fritzing. If not, see . -# ********************************************************************/ - -HEADERS += \ -src/autoroute/autorouter.h \ -src/autoroute/cmrouter/cmrouter.h \ -src/autoroute/autorouteprogressdialog.h \ -src/autoroute/autoroutersettingsdialog.h \ -src/autoroute/panelizer.h \ -src/autoroute/cmrouter/tile.h \ -src/autoroute/cmrouter/tileutils.h \ -src/autoroute/mazerouter/mazerouter.h \ -src/autoroute/zoomcontrols.h \ -src/autoroute/drc.h \ - -SOURCES += \ -src/autoroute/autorouter.cpp \ -src/autoroute/cmrouter/cmrouter.cpp \ -src/autoroute/autorouteprogressdialog.cpp \ -src/autoroute/autoroutersettingsdialog.cpp \ -src/autoroute/panelizer.cpp \ -src/autoroute/cmrouter/tile.cpp \ -src/autoroute/cmrouter/DBcell.cpp \ -src/autoroute/cmrouter/search.cpp \ -src/autoroute/cmrouter/search2.cpp \ -src/autoroute/mazerouter/mazerouter.cpp \ -src/autoroute/zoomcontrols.cpp \ -src/autoroute/drc.cpp \ diff --git a/pri/boostdetect.pri b/pri/boostdetect.pri deleted file mode 100644 index 1b6e376c2..000000000 --- a/pri/boostdetect.pri +++ /dev/null @@ -1,64 +0,0 @@ -# /******************************************************************* -# Part of the Fritzing project - http://fritzing.org -# Copyright (c) 2019 Fritzing -# Fritzing 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 3 of the License, or -# (at your option) any later version. -# Fritzing 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 Fritzing. If not, see . -# ********************************************************************/ - -LATESTBOOST = 0 - -# reduce warning messages by checking if variables are defined before using them -defined(boost_root, var) { - LATESTBOOST = user - exists($$boost_root) { - # force absolute: relative would break due to detection versus use folder nest level - BOOSTPATH = $$absolute_path($$boost_root) - # prevent possibly existing absolute_boost flag from breaking already absolute path - absolute_boost = 1 - unset(absolute_boost) - } else { - error("requested boost_root $$boost_root does not exist") - } -} else { - # message("Boost auto detect is deprecated, please set boost root variable.") - message("Using fritzing boost detect script.") - - # boost_1_54_0 is buggy - BOOSTS = 43 44 45 46 47 48 49 50 51 52 53 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 - for(boost, BOOSTS) { - exists(../../boost_1_$${boost}_0) { - LATESTBOOST = $$boost - BOOSTPATH = ../boost_1_$${boost}_0 - } - } -} - -# do the common configuration after all detection is finished -contains(LATESTBOOST, 0) { - boost = 99 - qtCompileTest(boost) - config_boost { - !build_pass:message("using installed Boost library") - } else { - message("Boost 1.54 has a bug in a function that Fritzing uses, so download or install some other version") - error("Easiest to copy the Boost library to ..., so that you have .../boost_1_xx_0") - } -} else { - defined(BOOSTPATH, var) { - defined(absolute_boost, var) { - BOOSTPATH = $$absolute_path(../$${BOOSTPATH}) - } - message("using $${BOOSTPATH} boost environment") - INCLUDEPATH += $$BOOSTPATH - } else { - error("unknown boost environment") - } -} \ No newline at end of file diff --git a/pri/gitversion.pri b/pri/gitversion.pri deleted file mode 100644 index 3414a2b32..000000000 --- a/pri/gitversion.pri +++ /dev/null @@ -1,39 +0,0 @@ -# Need to discard STDERR so get path to NULL device -win32 { - NULL_DEVICE = NUL # Windows doesn't have /dev/null but has NUL -} else { - NULL_DEVICE = /dev/null -} - -# Need to call git with manually specified paths to repository -BASE_GIT_COMMAND = git --git-dir $$PWD/../.git --work-tree $$PWD/.. - -$$(CI) { - # When running on travis ci, the tag is created *after* the build was successful. - # So we can not use 'git describe', but we generate a string that should look exactly - # like what git describe would deliver - GIT_VERSION = CD-$$(TRAVIS_BUILD_NUMBER)-0-$$system($$BASE_GIT_COMMAND rev-parse --short HEAD) -} else { - GIT_VERSION = $$system($$BASE_GIT_COMMAND describe --tags 2> $$NULL_DEVICE) -} - -GIT_DATE = $$system($$BASE_GIT_COMMAND show --no-patch --no-notes --pretty='%cd' HEAD --date=iso-strict 2> $$NULL_DEVICE) - -# Here we process the build date and time -win32 { - # Try to squeeze something ISO-8601-ish out of windows - BUILD_DATE = $$system( powershell (Get-Date -Format "o") ) -} - -macx { - # MacOS uses BSD date rather than GNU date. - BUILD_DATE = $$system( date +%Y-%m-%dT%H:%M:%S%z ) -} - -!win32:!macx { - BUILD_DATE = $$system( date --iso-8601=seconds ) -} - -DEFINES += GIT_VERSION=\\\"$$GIT_VERSION\\\" -DEFINES += GIT_DATE=\\\"$$GIT_DATE\\\" -DEFINES += BUILD_DATE=\\\"$$BUILD_DATE\\\" diff --git a/pri/help.pri b/pri/help.pri deleted file mode 100644 index 590903ae0..000000000 --- a/pri/help.pri +++ /dev/null @@ -1,21 +0,0 @@ -# /******************************************************************* -# Part of the Fritzing project - http://fritzing.org -# Copyright (c) 2007-08 Fritzing -# Fritzing 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 3 of the License, or -# (at your option) any later version. -# Fritzing 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 Fritzing. If not, see . -# ********************************************************************/ -HEADERS += src/help/aboutbox.h \ - src/help/firsttimehelpdialog.h \ - src/help/tipsandtricks.h - -SOURCES += src/help/aboutbox.cpp \ - src/help/firsttimehelpdialog.cpp \ - src/help/tipsandtricks.cpp diff --git a/pri/items.pri b/pri/items.pri deleted file mode 100644 index a70b2f580..000000000 --- a/pri/items.pri +++ /dev/null @@ -1,87 +0,0 @@ -# /******************************************************************* -# Part of the Fritzing project - http://fritzing.org -# Copyright (c) 2007-08 Fritzing -# Fritzing 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 3 of the License, or -# (at your option) any later version. -# Fritzing 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 Fritzing. If not, see . -# ********************************************************************/ - -HEADERS += \ - src/items/breadboard.h \ - src/items/capacitor.h \ - src/items/clipablewire.h \ - src/items/dip.h \ - src/items/groundplane.h \ - src/items/hole.h \ - src/items/itembase.h \ - src/items/jumperitem.h \ - src/items/layerkinpaletteitem.h \ - src/items/led.h \ - src/items/logoitem.h \ - src/items/moduleidnames.h \ - src/items/mysterypart.h \ - src/items/note.h \ - src/items/pad.h \ - src/items/paletteitem.h \ - src/items/paletteitembase.h \ - src/items/partfactory.h \ - src/items/partlabel.h \ - src/items/perfboard.h \ - src/items/pinheader.h \ - src/items/propertydef.h \ - src/items/resistor.h \ - src/items/resizableboard.h \ - src/items/ruler.h \ - src/items/schematicframe.h \ - src/items/schematicsubpart.h \ - src/items/screwterminal.h \ - src/items/stripboard.h \ - src/items/symbolpaletteitem.h \ - src/items/tracewire.h \ - src/items/via.h \ - src/items/virtualwire.h \ - src/items/wire.h \ - - -SOURCES += \ - src/items/breadboard.cpp \ - src/items/capacitor.cpp \ - src/items/clipablewire.cpp \ - src/items/dip.cpp \ - src/items/groundplane.cpp \ - src/items/hole.cpp \ - src/items/itembase.cpp \ - src/items/jumperitem.cpp \ - src/items/layerkinpaletteitem.cpp \ - src/items/led.cpp \ - src/items/logoitem.cpp \ - src/items/moduleidnames.cpp \ - src/items/mysterypart.cpp \ - src/items/note.cpp \ - src/items/pad.cpp \ - src/items/paletteitem.cpp \ - src/items/paletteitembase.cpp \ - src/items/partfactory.cpp \ - src/items/partlabel.cpp \ - src/items/perfboard.cpp \ - src/items/pinheader.cpp \ - src/items/propertydef.cpp \ - src/items/resistor.cpp \ - src/items/resizableboard.cpp \ - src/items/ruler.cpp \ - src/items/schematicframe.cpp \ - src/items/schematicsubpart.cpp \ - src/items/screwterminal.cpp \ - src/items/stripboard.cpp \ - src/items/symbolpaletteitem.cpp \ - src/items/tracewire.cpp \ - src/items/via.cpp \ - src/items/virtualwire.cpp \ - src/items/wire.cpp \ diff --git a/pri/kitchensink.pri b/pri/kitchensink.pri deleted file mode 100644 index 7285fb8e8..000000000 --- a/pri/kitchensink.pri +++ /dev/null @@ -1,44 +0,0 @@ -# /******************************************************************* -# Part of the Fritzing project - http://fritzing.org -# Copyright (c) 2007-08 Fritzing -# Fritzing 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 3 of the License, or -# (at your option) any later version. -# Fritzing 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 Fritzing. If not, see . -# ********************************************************************/ -HEADERS += \ - src/commands.h \ - src/debugdialog.h \ - src/fapplication.h \ - src/fsplashscreen.h \ - src/fsvgrenderer.h \ - src/installedfonts.h \ - src/itemdrag.h \ - src/layerattributes.h \ - src/processeventblocker.h \ - src/routingstatus.h \ - src/sketchtoolbutton.h \ - src/viewgeometry.h \ - src/viewlayer.h \ - src/waitpushundostack.h - -SOURCES += \ - src/commands.cpp \ - src/debugdialog.cpp \ - src/fapplication.cpp \ - src/fsplashscreen.cpp \ - src/fsvgrenderer.cpp \ - src/itemdrag.cpp \ - src/layerattributes.cpp \ - src/main.cpp \ - src/processeventblocker.cpp \ - src/sketchtoolbutton.cpp \ - src/viewgeometry.cpp \ - src/viewlayer.cpp \ - src/waitpushundostack.cpp diff --git a/pri/libgit2detect.pri b/pri/libgit2detect.pri deleted file mode 100644 index 66b3e0d0c..000000000 --- a/pri/libgit2detect.pri +++ /dev/null @@ -1,71 +0,0 @@ -# /******************************************************************* -# Part of the Fritzing project - http://fritzing.org -# Copyright (c) 2016 Fritzing -# Fritzing 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 3 of the License, or -# (at your option) any later version. -# Fritzing 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 Fritzing. If not, see . -# ******************************************************************** - - -packagesExist(libgit2) { -} else { - LIBGIT_STATIC = true -} - -if ($$LIBGIT_STATIC) { - LIBGIT2INCLUDE = "$$_PRO_FILE_PWD_/../libgit2/include" - exists($$LIBGIT2INCLUDE/git2.h) { - message("found libgit2 include path at $$LIBGIT2INCLUDE") - } else { - message("Fritzing requires libgit2") - message("Build it from the repo at https://github.com/libgit2") - message("See https://github.com/fritzing/fritzing-app/wiki for details.") - - error("libgit2 include path not found in $$LIBGIT2INCLUDE") - } - - INCLUDEPATH += $$LIBGIT2INCLUDE -} - -win32 { - contains(QMAKE_TARGET.arch, x86_64) { - LIBGIT2LIB = "$$_PRO_FILE_PWD_/../libgit2/build64/Release" - } else { - LIBGIT2LIB = "$$_PRO_FILE_PWD_/../libgit2/build32/Release" - } - - exists($$LIBGIT2LIB/git2.lib) { - message("found libgit2 library in $$LIBGIT2LIB") - } else { - error("libgit2 library not found in $$LIBGIT2LIB") - } - - LIBS += -L$$LIBGIT2LIB -lgit2 -} - -unix { - if ($$LIBGIT_STATIC) { - LIBGIT2LIB = $$_PRO_FILE_PWD_/../libgit2/build - exists($$LIBGIT2LIB/libgit2.a) { - message("found libgit2 library in $$LIBGIT2LIB") - } else { - error("static libgit2 library not found in $$LIBGIT2LIB") - } - macx { - LIBS += $$LIBGIT2LIB/libgit2.a /System/Library/Frameworks/Security.framework/Versions/A/Security - } else { - LIBS += $$LIBGIT2LIB/libgit2.a -lssl -lcrypto - } - } else { - !build_pass:warning("Using dynamic linking for libgit2.") - #message("Enabled dynamic linking of libgit2") - PKGCONFIG += libgit2 - } -} diff --git a/pri/mainwindow.pri b/pri/mainwindow.pri deleted file mode 100644 index bb2193aac..000000000 --- a/pri/mainwindow.pri +++ /dev/null @@ -1,28 +0,0 @@ -# /******************************************************************* -# Part of the Fritzing project - http://fritzing.org -# Copyright (c) 2007-08 Fritzing -# Fritzing 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 3 of the License, or -# (at your option) any later version. -# Fritzing 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 Fritzing. If not, see . -# ********************************************************************/ -HEADERS += \ - src/mainwindow/fdockwidget.h \ - src/mainwindow/fritzingwindow.h \ - src/mainwindow/mainwindow.h \ - src/mainwindow/sketchareawidget.h \ - -SOURCES += \ - src/mainwindow/fdockwidget.cpp \ - src/mainwindow/fritzingwindow.cpp \ - src/mainwindow/mainwindow.cpp \ - src/mainwindow/mainwindow_export.cpp \ - src/mainwindow/mainwindow_menu.cpp \ - src/mainwindow/mainwindow_dock.cpp \ - src/mainwindow/sketchareawidget.cpp \ diff --git a/pri/model.pri b/pri/model.pri deleted file mode 100644 index 89727d8c8..000000000 --- a/pri/model.pri +++ /dev/null @@ -1,27 +0,0 @@ -# /******************************************************************* -# Part of the Fritzing project - http://fritzing.org -# Copyright (c) 2007-08 Fritzing -# Fritzing 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 3 of the License, or -# (at your option) any later version. -# Fritzing 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 Fritzing. If not, see . -# ********************************************************************/ -HEADERS += \ - src/model/modelbase.h \ - src/model/modelpart.h \ - src/model/modelpartshared.h \ - src/model/palettemodel.h \ - src/model/sketchmodel.h - -SOURCES += \ - src/model/modelbase.cpp \ - src/model/modelpart.cpp \ - src/model/modelpartshared.cpp \ - src/model/palettemodel.cpp \ - src/model/sketchmodel.cpp diff --git a/pri/partsbinpalette.pri b/pri/partsbinpalette.pri deleted file mode 100644 index 738553df0..000000000 --- a/pri/partsbinpalette.pri +++ /dev/null @@ -1,39 +0,0 @@ -# /******************************************************************* -# Part of the Fritzing project - http://fritzing.org -# Copyright (c) 2007-08 Fritzing -# Fritzing 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 3 of the License, or -# (at your option) any later version. -# Fritzing 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 PARTIC,asMainWindowULAR PURPOSE. See the -# GNU General Public License for more details. -# You should have received a copy of the GNU General Public License -# along with Fritzing. If not, see . -# ********************************************************************/ -HEADERS += \ - src/partsbinpalette/partsbinpalettewidget.h \ - src/partsbinpalette/partsbinview.h \ - src/partsbinpalette/partsbinlistview.h \ - src/partsbinpalette/partsbiniconview.h \ - src/partsbinpalette/graphicsflowlayout.h \ - src/partsbinpalette/svgiconwidget.h \ - src/partsbinpalette/partsbincommands.h \ - src/partsbinpalette/searchlineedit.h \ - src/partsbinpalette/binmanager/binmanager.h \ - src/partsbinpalette/binmanager/stacktabbar.h \ - src/partsbinpalette/binmanager/stacktabwidget.h - -SOURCES += \ - src/partsbinpalette/partsbinpalettewidget.cpp \ - src/partsbinpalette/partsbinview.cpp \ - src/partsbinpalette/partsbinlistview.cpp \ - src/partsbinpalette/partsbiniconview.cpp \ - src/partsbinpalette/graphicsflowlayout.cpp \ - src/partsbinpalette/svgiconwidget.cpp \ - src/partsbinpalette/partsbincommands.cpp \ - src/partsbinpalette/searchlineedit.cpp \ - src/partsbinpalette/binmanager/binmanager.cpp \ - src/partsbinpalette/binmanager/stacktabbar.cpp \ - src/partsbinpalette/binmanager/stacktabwidget.cpp diff --git a/pri/partseditor.pri b/pri/partseditor.pri deleted file mode 100644 index f42de3197..000000000 --- a/pri/partseditor.pri +++ /dev/null @@ -1,91 +0,0 @@ -# /******************************************************************* -# -# Part of the Fritzing project - http://fritzing.org -# Copyright (c) 2007-08 Fritzing -# -# Fritzing 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 3 of the License, or -# (at your option) any later version. -# -# Fritzing 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 Fritzing. If not, see . -# -#********************************************************************/ - -HEADERS += \ -# src/partseditor/editabledatewidget.h \ -# src/partseditor/abstractconnectorinfowidget.h \ -# src/partseditor/mismatchingconnectorwidget.h \ -# src/partseditor/partseditorconnectoritem.h \ -# src/partseditor/singleconnectorinfowidget.h \ -# src/partseditor/partconnectorswidget.h \ -# src/partseditor/connectorsinfowidget.h \ -# src/partseditor/editablelinewidget.h \ -# src/partseditor/editabletextwidget.h \ -# src/partseditor/abstracteditablelabelwidget.h \ -# src/partseditor/partseditormainwindow.h \ -# src/partseditor/editablelabel.h \ -# src/partseditor/partspecificationswidget.h \ -# src/partseditor/addremovelistwidget.h \ -# src/partseditor/partseditorpaletteitem.h \ -# src/partseditor/addremoveconnectorbutton.h \ -# src/partseditor/connectorinforemovebutton.h \ -# src/partseditor/partseditorconnectorspaletteitem.h \ -# src/partseditor/partseditorconnectorsconnectoritem.h \ -# src/partseditor/partseditorlayerkinpaletteitem.h \ -# src/partseditor/partseditorconnectorslayerkinpaletteitem.h \ -# src/partseditor/partseditorview.h \ -# src/partseditor/partseditorviewswidget.h \ -# src/partseditor/fixfontsdialog.h \ - \ - src/partseditor/pemainwindow.h \ - src/partseditor/pemetadataview.h \ - src/partseditor/pecommands.h \ - src/partseditor/peconnectorsview.h \ - src/partseditor/pesvgview.h \ - src/partseditor/petoolview.h \ - src/partseditor/peutils.h \ - src/partseditor/pegraphicsitem.h \ - src/partseditor/kicadmoduledialog.h \ - src/partseditor/hashpopulatewidget.h \ - src/partseditor/baseremovebutton.h \ - - -SOURCES += \ - # src/partseditor/editabledatewidget.cpp \ - # src/partseditor/abstractconnectorinfowidget.cpp \ - # src/partseditor/mismatchingconnectorwidget.cpp \ - # src/partseditor/partseditorconnectoritem.cpp \ - # src/partseditor/singleconnectorinfowidget.cpp \ - # src/partseditor/partconnectorswidget.cpp \ - # src/partseditor/connectorsinfowidget.cpp \ - # src/partseditor/editablelinewidget.cpp \ - # src/partseditor/editabletextwidget.cpp \ - # src/partseditor/abstracteditablelabelwidget.cpp \ - # src/partseditor/partseditormainwindow.cpp \ - # src/partseditor/editablelabel.cpp \ - # src/partseditor/partspecificationswidget.cpp \ - # src/partseditor/addremovelistwidget.cpp \ - # src/partseditor/partseditorpaletteitem.cpp \ - # src/partseditor/partseditorconnectorspaletteitem.cpp \ - # src/partseditor/partseditorconnectorsconnectoritem.cpp \ - # src/partseditor/partseditorview.cpp \ - # src/partseditor/partseditorviewswidget.cpp \ - # src/partseditor/fixfontsdialog.cpp \ - \ - src/partseditor/pemainwindow.cpp \ - src/partseditor/pemetadataview.cpp \ - src/partseditor/pecommands.cpp \ - src/partseditor/peconnectorsview.cpp \ - src/partseditor/pesvgview.cpp \ - src/partseditor/petoolview.cpp \ - src/partseditor/peutils.cpp \ - src/partseditor/pegraphicsitem.cpp \ - src/partseditor/kicadmoduledialog.cpp \ - src/partseditor/hashpopulatewidget.cpp \ diff --git a/pri/program.pri b/pri/program.pri deleted file mode 100644 index f94ba8097..000000000 --- a/pri/program.pri +++ /dev/null @@ -1,51 +0,0 @@ -# /******************************************************************* -# -# Part of the Fritzing project - http://fritzing.org -# Copyright (c) 2007-08 Fritzing -# -# Fritzing 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 3 of the License, or -# (at your option) any later version. -# -# Fritzing 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 Fritzing. If not, see . -# -#********************************************************************/ - -HEADERS += \ - src/program/highlighter.h \ - src/program/programtab.h \ - src/program/programwindow.h \ - src/program/syntaxer.h \ - src/program/trienode.h \ - src/program/console.h \ - src/program/consolewindow.h \ - src/program/consolesettings.h \ - src/program/platform.h \ - src/program/platformarduino.h \ - src/program/platformpicaxe.h \ - src/program/platformlaunchpad.h - -SOURCES += \ - src/program/highlighter.cpp \ - src/program/programtab.cpp \ - src/program/programwindow.cpp \ - src/program/syntaxer.cpp \ - src/program/trienode.cpp \ - src/program/console.cpp \ - src/program/consolewindow.cpp \ - src/program/consolesettings.cpp \ - src/program/platform.cpp \ - src/program/platformarduino.cpp \ - src/program/platformpicaxe.cpp \ - src/program/platformlaunchpad.cpp - -FORMS += \ - src/program/consolewindow.ui \ - src/program/consolesettings.ui diff --git a/pri/quazip.pri b/pri/quazip.pri deleted file mode 100644 index 545607269..000000000 --- a/pri/quazip.pri +++ /dev/null @@ -1,37 +0,0 @@ -# /******************************************************************* -# -# Part of the Fritzing project - http://fritzing.org -# Copyright (c) 2007-08 Fritzing -# -# Fritzing 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 3 of the License, or -# (at your option) any later version. -# -# Fritzing 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 Fritzing. If not, see . -# -#********************************************************************/ - -HEADERS += \ - src/lib/quazip/crypt.h \ - src/lib/quazip/ioapi.h \ - src/lib/quazip/quazip.h \ - src/lib/quazip/quazipfile.h \ - src/lib/quazip/quazipfileinfo.h \ - src/lib/quazip/quazipnewinfo.h \ - src/lib/quazip/unzip.h \ - src/lib/quazip/zip.h - -SOURCES += \ - src/lib/quazip/ioapi.c \ - src/lib/quazip/quazip.cpp \ - src/lib/quazip/quazipfile.cpp \ - src/lib/quazip/quazipnewinfo.cpp \ - src/lib/quazip/unzip.c \ - src/lib/quazip/zip.c diff --git a/pri/referencemodel.pri b/pri/referencemodel.pri deleted file mode 100644 index aa566faeb..000000000 --- a/pri/referencemodel.pri +++ /dev/null @@ -1,26 +0,0 @@ -# /******************************************************************* -# -# Part of the Fritzing project - http://fritzing.org -# Copyright (c) 2007-08 Fritzing -# -# Fritzing 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 3 of the License, or -# (at your option) any later version. -# -# Fritzing 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 Fritzing. If not, see . -# -#********************************************************************/ - -HEADERS += \ - src/referencemodel/sqlitereferencemodel.h \ - src/referencemodel/referencemodel.h \ - -SOURCES += \ - src/referencemodel/sqlitereferencemodel.cpp \ diff --git a/pri/sketch.pri b/pri/sketch.pri deleted file mode 100644 index 6d7ccaaa1..000000000 --- a/pri/sketch.pri +++ /dev/null @@ -1,36 +0,0 @@ -# /******************************************************************* -# Part of the Fritzing project - http://fritzing.org -# Copyright (c) 2007-08 Fritzing -# Fritzing 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 3 of the License, or -# (at your option) any later version. -# Fritzing 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 Fritzing. If not, see . -# ********************************************************************/ -HEADERS += \ - $$PWD/../src/sketch/renderthing.h \ - src/sketch/fgraphicsscene.h \ - src/sketch/breadboardsketchwidget.h \ - src/sketch/infographicsview.h \ - src/sketch/pcbsketchwidget.h \ - src/sketch/schematicsketchwidget.h \ - src/sketch/sketchwidget.h \ - src/sketch/welcomeview.h \ - src/sketch/zoomablegraphicsview.h \ - - -SOURCES += \ - $$PWD/../src/sketch/renderthing.cpp \ - src/sketch/fgraphicsscene.cpp \ - src/sketch/breadboardsketchwidget.cpp \ - src/sketch/infographicsview.cpp \ - src/sketch/pcbsketchwidget.cpp \ - src/sketch/schematicsketchwidget.cpp \ - src/sketch/sketchwidget.cpp \ - src/sketch/welcomeview.cpp \ - src/sketch/zoomablegraphicsview.cpp \ diff --git a/pri/svg.pri b/pri/svg.pri deleted file mode 100644 index 428ddb423..000000000 --- a/pri/svg.pri +++ /dev/null @@ -1,51 +0,0 @@ -# /******************************************************************* -# Part of the Fritzing project - http://fritzing.org -# Copyright (c) 2007-08 Fritzing -# Fritzing 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 3 of the License, or -# (at your option) any later version. -# Fritzing 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 Fritzing. If not, see . -# ********************************************************************/ -HEADERS += src/svg/svgfilesplitter.h \ - src/svg/svgpathparser.h \ - src/svg/svgpathgrammar_p.h \ - src/svg/svgpathlexer.h \ - src/svg/svgpathrunner.h \ - src/svg/svg2gerber.h \ - src/svg/svgflattener.h \ - src/svg/gerbergenerator.h \ - src/svg/groundplanegenerator.h \ - src/svg/x2svg.h \ - src/svg/kicad2svg.h \ - src/svg/kicadmodule2svg.h \ - src/svg/kicadschematic2svg.h \ - src/svg/gedaelement2svg.h \ - src/svg/gedaelementparser.h \ - src/svg/gedaelementgrammar_p.h \ - src/svg/gedaelementlexer.h \ - $$PWD/../src/svg/svgtext.h - -SOURCES += src/svg/svgfilesplitter.cpp \ - src/svg/svgpathparser.cpp \ - src/svg/svgpathgrammar.cpp \ - src/svg/svgpathlexer.cpp \ - src/svg/svgpathrunner.cpp \ - src/svg/svg2gerber.cpp \ - src/svg/svgflattener.cpp \ - src/svg/gerbergenerator.cpp \ - src/svg/groundplanegenerator.cpp \ - src/svg/x2svg.cpp \ - src/svg/kicad2svg.cpp \ - src/svg/kicadmodule2svg.cpp \ - src/svg/kicadschematic2svg.cpp \ - src/svg/gedaelement2svg.cpp \ - src/svg/gedaelementparser.cpp \ - src/svg/gedaelementgrammar.cpp \ - src/svg/gedaelementlexer.cpp \ - $$PWD/../src/svg/svgtext.cpp diff --git a/pri/utils.pri b/pri/utils.pri deleted file mode 100644 index 11e8c40c6..000000000 --- a/pri/utils.pri +++ /dev/null @@ -1,68 +0,0 @@ -# /******************************************************************* -# Part of the Fritzing project - http://fritzing.org -# Copyright (c) 2007-16 Fritzing -# Fritzing 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 3 of the License, or -# (at your option) any later version. -# Fritzing 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 Fritzing. If not, see . -# ********************************************************************/ - -HEADERS += \ -src/utils/abstractstatesbutton.h \ -src/utils/autoclosemessagebox.h \ -src/utils/bendpointaction.h \ -src/utils/bezier.h \ -src/utils/bezierdisplay.h \ -src/utils/boundedregexpvalidator.h \ -src/utils/bundler.h \ -src/utils/clickablelabel.h \ -src/utils/cursormaster.h \ -src/utils/expandinglabel.h \ -src/utils/familypropertycombobox.h \ -src/utils/fileprogressdialog.h \ -src/utils/flineedit.h \ -src/utils/fmessagebox.h \ -src/utils/focusoutcombobox.h \ -src/utils/fsizegrip.h \ -src/utils/lockmanager.h \ -src/utils/misc.h \ -src/utils/resizehandle.h \ -src/utils/folderutils.h \ -src/utils/graphicsutils.h \ -src/utils/graphutils.h \ -src/utils/ratsnestcolors.h \ -src/utils/schematicrectconstants.h \ -src/utils/s2s.h \ -src/utils/textutils.h \ -src/utils/zoomslider.h - -SOURCES += \ -src/utils/autoclosemessagebox.cpp \ -src/utils/bendpointaction.cpp \ -src/utils/bezier.cpp \ -src/utils/bezierdisplay.cpp \ -src/utils/clickablelabel.cpp \ -src/utils/cursormaster.cpp \ -src/utils/expandinglabel.cpp \ -src/utils/fileprogressdialog.cpp \ -src/utils/flineedit.cpp \ -src/utils/fmessagebox.cpp \ -src/utils/focusoutcombobox.cpp \ -src/utils/fsizegrip.cpp \ -src/utils/lockmanager.cpp \ -src/utils/misc.cpp \ -src/utils/resizehandle.cpp \ -src/utils/folderutils.cpp \ -src/utils/graphicsutils.cpp \ -src/utils/graphutils.cpp \ -src/utils/ratsnestcolors.cpp \ -src/utils/schematicrectconstants.cpp \ -src/utils/s2s.cpp \ -src/utils/textutils.cpp \ -src/utils/zoomslider.cpp diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt new file mode 100644 index 000000000..197e1be1b --- /dev/null +++ b/src/CMakeLists.txt @@ -0,0 +1,92 @@ +# Find QT5 +find_package(Qt5 COMPONENTS Widgets Xml Concurrent Svg Network PrintSupport SerialPort Sql REQUIRED) +# Find Boost +find_package(Boost REQUIRED) +# Find Libgit +find_package(libgit2 REQUIRED) +# Find Libgit +find_package(ZLIB REQUIRED) + +set(FRITZING_SRCS + commands.cpp + debugdialog.cpp + fapplication.cpp + fsplashscreen.cpp + fsvgrenderer.cpp + itemdrag.cpp + layerattributes.cpp + main.cpp + processeventblocker.cpp + sketchtoolbutton.cpp + viewgeometry.cpp + viewlayer.cpp + waitpushundostack.cpp) + +set(FRITZING_HDRS + commands.h + debugdialog.h + fapplication.h + fsplashscreen.h + fsvgrenderer.h + installedfonts.h + itemdrag.h + layerattributes.h + processeventblocker.h + routingstatus.h + sketchtoolbutton.h + viewgeometry.h + viewlayer.h + waitpushundostack.h) + +set(FRITZING_FORMS) + +set(FRITZING_INC_DIRS + ${CMAKE_SOURCE_DIR} + ${CMAKE_CURRENT_SOURCE_DIR} + ${LIBGIT2_INCLUDE_DIR}) + +add_subdirectory(autoroute) +add_subdirectory(connectors) +add_subdirectory(dialogs) +add_subdirectory(dock) +add_subdirectory(eagle) +add_subdirectory(help) +add_subdirectory(infoview) +add_subdirectory(items) +add_subdirectory(lib) +add_subdirectory(mainwindow) +add_subdirectory(model) +add_subdirectory(partsbinpalette) +add_subdirectory(partseditor) +add_subdirectory(program) +add_subdirectory(referencemodel) +add_subdirectory(sketch) +add_subdirectory(svg) +add_subdirectory(utils) +add_subdirectory(version) + +add_executable(fritzing + ${CMAKE_SOURCE_DIR}/fritzing.rc + ${CMAKE_SOURCE_DIR}/phoenixresources.qrc + ${FRITZING_SRCS} + ${FRITZING_HDRS} + ${FRITZING_FORMS}) + +target_link_libraries(fritzing + Boost::boost + Qt5::Widgets + Qt5::Concurrent + Qt5::Xml + Qt5::Svg + Qt5::Network + Qt5::PrintSupport + Qt5::SerialPort + Qt5::Sql + ZLIB::ZLIB + ${LIBGIT2_LIBRARIES}) + +target_include_directories(fritzing PRIVATE ${FRITZING_INC_DIRS}) + +# Git versioning + +target_compile_definitions(fritzing PRIVATE GIT_VERSION="N/A" GIT_DATE="N/A" BUILD_TIME="N/A") \ No newline at end of file diff --git a/src/autoroute/CMakeLists.txt b/src/autoroute/CMakeLists.txt new file mode 100644 index 000000000..ceb56408c --- /dev/null +++ b/src/autoroute/CMakeLists.txt @@ -0,0 +1,42 @@ +# /******************************************************************* +# Part of the Fritzing project - http://fritzing.org +# Copyright (c) 2007-23 Fritzing +# Fritzing 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 3 of the License, or +# (at your option) any later version. +# Fritzing 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 Fritzing. If not, see . +# ********************************************************************/ + +set(FRITZING_HDRS ${FRITZING_HDRS} + ${CMAKE_CURRENT_SOURCE_DIR}/autorouter.h + ${CMAKE_CURRENT_SOURCE_DIR}/cmrouter/cmrouter.h + ${CMAKE_CURRENT_SOURCE_DIR}/autorouteprogressdialog.h + ${CMAKE_CURRENT_SOURCE_DIR}/autoroutersettingsdialog.h + ${CMAKE_CURRENT_SOURCE_DIR}/panelizer.h + ${CMAKE_CURRENT_SOURCE_DIR}/cmrouter/tile.h + ${CMAKE_CURRENT_SOURCE_DIR}/cmrouter/tileutils.h + ${CMAKE_CURRENT_SOURCE_DIR}/mazerouter/mazerouter.h + ${CMAKE_CURRENT_SOURCE_DIR}/zoomcontrols.h + ${CMAKE_CURRENT_SOURCE_DIR}/drc.h + PARENT_SCOPE) + +set(FRITZING_SRCS ${FRITZING_SRCS} + ${CMAKE_CURRENT_SOURCE_DIR}/autorouter.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/cmrouter/cmrouter.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/autorouteprogressdialog.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/autoroutersettingsdialog.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/panelizer.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/cmrouter/tile.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/cmrouter/DBcell.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/cmrouter/search.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/cmrouter/search2.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/mazerouter/mazerouter.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/zoomcontrols.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/drc.cpp + PARENT_SCOPE) diff --git a/src/connectors/CMakeLists.txt b/src/connectors/CMakeLists.txt new file mode 100644 index 000000000..f7d08e3ae --- /dev/null +++ b/src/connectors/CMakeLists.txt @@ -0,0 +1,36 @@ +# /******************************************************************* +# Part of the Fritzing project - http://fritzing.org +# Copyright (c) 2007-23 Fritzing +# Fritzing 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 3 of the License, or +# (at your option) any later version. +# Fritzing 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 Fritzing. If not, see . +# ********************************************************************/ + +set(FRITZING_HDRS ${FRITZING_HDRS} + ${CMAKE_CURRENT_SOURCE_DIR}/bus.h + ${CMAKE_CURRENT_SOURCE_DIR}/busshared.h + ${CMAKE_CURRENT_SOURCE_DIR}/connector.h + ${CMAKE_CURRENT_SOURCE_DIR}/connectoritem.h + ${CMAKE_CURRENT_SOURCE_DIR}/nonconnectoritem.h + ${CMAKE_CURRENT_SOURCE_DIR}/connectorshared.h + ${CMAKE_CURRENT_SOURCE_DIR}/ercdata.h + ${CMAKE_CURRENT_SOURCE_DIR}/svgidlayer.h + PARENT_SCOPE) + +set(FRITZING_SRCS ${FRITZING_SRCS} + ${CMAKE_CURRENT_SOURCE_DIR}/bus.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/busshared.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/connector.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/connectoritem.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/nonconnectoritem.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/connectorshared.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/ercdata.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/svgidlayer.cpp + PARENT_SCOPE) diff --git a/src/dialogs/CMakeLists.txt b/src/dialogs/CMakeLists.txt new file mode 100644 index 000000000..9a9f26a0a --- /dev/null +++ b/src/dialogs/CMakeLists.txt @@ -0,0 +1,48 @@ +# /******************************************************************* +# Part of the Fritzing project - http://fritzing.org +# Copyright (c) 2007-23 Fritzing +# Fritzing 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 3 of the License, or +# (at your option) any later version. +# Fritzing 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 Fritzing. If not, see . +# ********************************************************************/ + +set(FRITZING_HDRS ${FRITZING_HDRS} + ${CMAKE_CURRENT_SOURCE_DIR}/prefsdialog.h + ${CMAKE_CURRENT_SOURCE_DIR}/pinlabeldialog.h + ${CMAKE_CURRENT_SOURCE_DIR}/groundfillseeddialog.h + ${CMAKE_CURRENT_SOURCE_DIR}/quotedialog.h + ${CMAKE_CURRENT_SOURCE_DIR}/recoverydialog.h + ${CMAKE_CURRENT_SOURCE_DIR}/setcolordialog.h + ${CMAKE_CURRENT_SOURCE_DIR}/translatorlistmodel.h + ${CMAKE_CURRENT_SOURCE_DIR}/fabuploaddialog.h + ${CMAKE_CURRENT_SOURCE_DIR}/fabuploadprogress.h + ${CMAKE_CURRENT_SOURCE_DIR}/networkhelper.h + PARENT_SCOPE) + +set(FRITZING_SRCS ${FRITZING_SRCS} + ${CMAKE_CURRENT_SOURCE_DIR}/prefsdialog.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/pinlabeldialog.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/groundfillseeddialog.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/quotedialog.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/recoverydialog.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/setcolordialog.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/translatorlistmodel.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/fabuploaddialog.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/fabuploadprogress.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/networkhelper.cpp + PARENT_SCOPE) + +set(FRITZING_FORMS ${FRITZING_FORMS} + ${CMAKE_CURRENT_SOURCE_DIR}/fabuploaddialog.ui + PARENT_SCOPE) + +set(FRITZING_INC_DIRS ${FRITZING_INC_DIRS} + ${CMAKE_CURRENT_SOURCE_DIR} + PARENT_SCOPE) diff --git a/src/dialogs/dialogs.pri b/src/dialogs/dialogs.pri deleted file mode 100644 index ca4a7bdd0..000000000 --- a/src/dialogs/dialogs.pri +++ /dev/null @@ -1,40 +0,0 @@ -# /******************************************************************* -# Part of the Fritzing project - http://fritzing.org -# Copyright (c) 2007-08 Fritzing -# Fritzing 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 3 of the License, or -# (at your option) any later version. -# Fritzing 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 Fritzing. If not, see . -# ********************************************************************/ - -INCLUDEPATH += $$PWD - -HEADERS += src/dialogs/prefsdialog.h \ - src/dialogs/pinlabeldialog.h \ - src/dialogs/groundfillseeddialog.h \ - src/dialogs/quotedialog.h \ - src/dialogs/recoverydialog.h \ - src/dialogs/setcolordialog.h \ - src/dialogs/translatorlistmodel.h \ - src/dialogs/fabuploaddialog.h \ - src/dialogs/fabuploadprogress.h \ - src/dialogs/networkhelper.h - -SOURCES += src/dialogs/prefsdialog.cpp \ - src/dialogs/pinlabeldialog.cpp \ - src/dialogs/groundfillseeddialog.cpp \ - src/dialogs/quotedialog.cpp \ - src/dialogs/recoverydialog.cpp \ - src/dialogs/setcolordialog.cpp \ - src/dialogs/translatorlistmodel.cpp \ - src/dialogs/fabuploaddialog.cpp \ - src/dialogs/fabuploadprogress.cpp \ - src/dialogs/networkhelper.cpp - -FORMS += src/dialogs/fabuploaddialog.ui diff --git a/pri/qtsysteminfo.pri b/src/dock/CMakeLists.txt similarity index 78% rename from pri/qtsysteminfo.pri rename to src/dock/CMakeLists.txt index 0fbcd1565..d72886ea2 100644 --- a/pri/qtsysteminfo.pri +++ b/src/dock/CMakeLists.txt @@ -1,6 +1,6 @@ # /******************************************************************* # Part of the Fritzing project - http://fritzing.org -# Copyright (c) 2007-2019 Fritzing +# Copyright (c) 2007-23 Fritzing # Fritzing 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 3 of the License, or @@ -13,6 +13,10 @@ # along with Fritzing. If not, see . # ********************************************************************/ +set(FRITZING_HDRS ${FRITZING_HDRS} + ${CMAKE_CURRENT_SOURCE_DIR}/layerpalette.h + PARENT_SCOPE) -SOURCES += src/lib/qtsysteminfo/QtSystemInfo.cpp -HEADERS += src/lib/qtsysteminfo/QtSystemInfo.h +set(FRITZING_SRCS ${FRITZING_SRCS} + ${CMAKE_CURRENT_SOURCE_DIR}/layerpalette.cpp + PARENT_SCOPE) diff --git a/pri/infoview.pri b/src/eagle/CMakeLists.txt similarity index 77% rename from pri/infoview.pri rename to src/eagle/CMakeLists.txt index 494d23c84..3629ae813 100644 --- a/pri/infoview.pri +++ b/src/eagle/CMakeLists.txt @@ -1,6 +1,6 @@ # /******************************************************************* # Part of the Fritzing project - http://fritzing.org -# Copyright (c) 2007-08 Fritzing +# Copyright (c) 2007-23 Fritzing # Fritzing 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 3 of the License, or @@ -13,6 +13,10 @@ # along with Fritzing. If not, see . # ********************************************************************/ -HEADERS += src/infoview/htmlinfoview.h +set(FRITZING_HDRS ${FRITZING_HDRS} + ${CMAKE_CURRENT_SOURCE_DIR}/fritzing2eagle.h + PARENT_SCOPE) -SOURCES += src/infoview/htmlinfoview.cpp +set(FRITZING_SRCS ${FRITZING_SRCS} + ${CMAKE_CURRENT_SOURCE_DIR}/fritzing2eagle.cpp + PARENT_SCOPE) diff --git a/src/fapplication.cpp b/src/fapplication.cpp index 60caf3412..9f96502b5 100644 --- a/src/fapplication.cpp +++ b/src/fapplication.cpp @@ -85,10 +85,10 @@ along with Fritzing. If not, see . #include #include -#ifdef LINUX_32 +#if defined Q_OS_LINUX && defined Q_PROCESSOR_X86_32 #define PLATFORM_NAME "linux-32bit" #endif -#ifdef LINUX_64 +#if defined Q_OS_LINUX && defined Q_PROCESSOR_X86_64 #define PLATFORM_NAME "linux-64bit" #endif #ifdef Q_OS_WIN diff --git a/src/help/CMakeLists.txt b/src/help/CMakeLists.txt new file mode 100644 index 000000000..80e235afe --- /dev/null +++ b/src/help/CMakeLists.txt @@ -0,0 +1,26 @@ +# /******************************************************************* +# Part of the Fritzing project - http://fritzing.org +# Copyright (c) 2007-23 Fritzing +# Fritzing 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 3 of the License, or +# (at your option) any later version. +# Fritzing 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 Fritzing. If not, see . +# ********************************************************************/ + +set(FRITZING_HDRS ${FRITZING_HDRS} + ${CMAKE_CURRENT_SOURCE_DIR}/aboutbox.h + ${CMAKE_CURRENT_SOURCE_DIR}/firsttimehelpdialog.h + ${CMAKE_CURRENT_SOURCE_DIR}/tipsandtricks.h + PARENT_SCOPE) + +set(FRITZING_SRCS ${FRITZING_SRCS} + ${CMAKE_CURRENT_SOURCE_DIR}/aboutbox.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/firsttimehelpdialog.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/tipsandtricks.cpp + PARENT_SCOPE) diff --git a/pri/eagle.pri b/src/infoview/CMakeLists.txt similarity index 78% rename from pri/eagle.pri rename to src/infoview/CMakeLists.txt index 27ec719db..60deb26d5 100644 --- a/pri/eagle.pri +++ b/src/infoview/CMakeLists.txt @@ -1,6 +1,6 @@ # /******************************************************************* # Part of the Fritzing project - http://fritzing.org -# Copyright (c) 2007-08 Fritzing +# Copyright (c) 2007-23 Fritzing # Fritzing 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 3 of the License, or @@ -13,6 +13,10 @@ # along with Fritzing. If not, see . # ********************************************************************/ -HEADERS += src/eagle/fritzing2eagle.h +set(FRITZING_HDRS ${FRITZING_HDRS} + ${CMAKE_CURRENT_SOURCE_DIR}/htmlinfoview.h + PARENT_SCOPE) -SOURCES += src/eagle/fritzing2eagle.cpp +set(FRITZING_SRCS ${FRITZING_SRCS} + ${CMAKE_CURRENT_SOURCE_DIR}/htmlinfoview.cpp + PARENT_SCOPE) diff --git a/src/items/CMakeLists.txt b/src/items/CMakeLists.txt new file mode 100644 index 000000000..3290e28cc --- /dev/null +++ b/src/items/CMakeLists.txt @@ -0,0 +1,88 @@ +# /******************************************************************* +# Part of the Fritzing project - http://fritzing.org +# Copyright (c) 2007-23 Fritzing +# Fritzing 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 3 of the License, or +# (at your option) any later version. +# Fritzing 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 Fritzing. If not, see . +# ********************************************************************/ + +set(FRITZING_HDRS ${FRITZING_HDRS} + ${CMAKE_CURRENT_SOURCE_DIR}/breadboard.h + ${CMAKE_CURRENT_SOURCE_DIR}/capacitor.h + ${CMAKE_CURRENT_SOURCE_DIR}/clipablewire.h + ${CMAKE_CURRENT_SOURCE_DIR}/dip.h + ${CMAKE_CURRENT_SOURCE_DIR}/groundplane.h + ${CMAKE_CURRENT_SOURCE_DIR}/hole.h + ${CMAKE_CURRENT_SOURCE_DIR}/itembase.h + ${CMAKE_CURRENT_SOURCE_DIR}/jumperitem.h + ${CMAKE_CURRENT_SOURCE_DIR}/layerkinpaletteitem.h + ${CMAKE_CURRENT_SOURCE_DIR}/led.h + ${CMAKE_CURRENT_SOURCE_DIR}/logoitem.h + ${CMAKE_CURRENT_SOURCE_DIR}/moduleidnames.h + ${CMAKE_CURRENT_SOURCE_DIR}/mysterypart.h + ${CMAKE_CURRENT_SOURCE_DIR}/note.h + ${CMAKE_CURRENT_SOURCE_DIR}/pad.h + ${CMAKE_CURRENT_SOURCE_DIR}/paletteitem.h + ${CMAKE_CURRENT_SOURCE_DIR}/paletteitembase.h + ${CMAKE_CURRENT_SOURCE_DIR}/partfactory.h + ${CMAKE_CURRENT_SOURCE_DIR}/partlabel.h + ${CMAKE_CURRENT_SOURCE_DIR}/perfboard.h + ${CMAKE_CURRENT_SOURCE_DIR}/pinheader.h + ${CMAKE_CURRENT_SOURCE_DIR}/propertydef.h + ${CMAKE_CURRENT_SOURCE_DIR}/resistor.h + ${CMAKE_CURRENT_SOURCE_DIR}/resizableboard.h + ${CMAKE_CURRENT_SOURCE_DIR}/ruler.h + ${CMAKE_CURRENT_SOURCE_DIR}/schematicframe.h + ${CMAKE_CURRENT_SOURCE_DIR}/schematicsubpart.h + ${CMAKE_CURRENT_SOURCE_DIR}/screwterminal.h + ${CMAKE_CURRENT_SOURCE_DIR}/stripboard.h + ${CMAKE_CURRENT_SOURCE_DIR}/symbolpaletteitem.h + ${CMAKE_CURRENT_SOURCE_DIR}/tracewire.h + ${CMAKE_CURRENT_SOURCE_DIR}/via.h + ${CMAKE_CURRENT_SOURCE_DIR}/virtualwire.h + ${CMAKE_CURRENT_SOURCE_DIR}/wire.h + PARENT_SCOPE) + +set(FRITZING_SRCS ${FRITZING_SRCS} + ${CMAKE_CURRENT_SOURCE_DIR}/breadboard.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/capacitor.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/clipablewire.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/dip.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/groundplane.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/hole.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/itembase.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/jumperitem.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/layerkinpaletteitem.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/led.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/logoitem.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/moduleidnames.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/mysterypart.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/note.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/pad.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/paletteitem.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/paletteitembase.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/partfactory.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/partlabel.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/perfboard.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/pinheader.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/propertydef.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/resistor.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/resizableboard.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/ruler.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/schematicframe.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/schematicsubpart.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/screwterminal.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/stripboard.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/symbolpaletteitem.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/tracewire.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/via.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/virtualwire.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/wire.cpp + PARENT_SCOPE) diff --git a/src/lib/CMakeLists.txt b/src/lib/CMakeLists.txt new file mode 100644 index 000000000..1d57cedb0 --- /dev/null +++ b/src/lib/CMakeLists.txt @@ -0,0 +1,36 @@ +# /******************************************************************* +# Part of the Fritzing project - http://fritzing.org +# Copyright (c) 2007-23 Fritzing +# Fritzing 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 3 of the License, or +# (at your option) any later version. +# Fritzing 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 Fritzing. If not, see . +# ********************************************************************/ + +set(FRITZING_HDRS ${FRITZING_HDRS} + ${CMAKE_CURRENT_SOURCE_DIR}/qtsysteminfo/QtSystemInfo.h + ${CMAKE_CURRENT_SOURCE_DIR}/quazip/crypt.h + ${CMAKE_CURRENT_SOURCE_DIR}/quazip/ioapi.h + ${CMAKE_CURRENT_SOURCE_DIR}/quazip/quazip.h + ${CMAKE_CURRENT_SOURCE_DIR}/quazip/quazipfile.h + ${CMAKE_CURRENT_SOURCE_DIR}/quazip/quazipfileinfo.h + ${CMAKE_CURRENT_SOURCE_DIR}/quazip/quazipnewinfo.h + ${CMAKE_CURRENT_SOURCE_DIR}/quazip/unzip.h + ${CMAKE_CURRENT_SOURCE_DIR}/quazip/zip.h + PARENT_SCOPE) + +set(FRITZING_SRCS ${FRITZING_SRCS} + ${CMAKE_CURRENT_SOURCE_DIR}/qtsysteminfo/QtSystemInfo.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/quazip/ioapi.c + ${CMAKE_CURRENT_SOURCE_DIR}/quazip/quazip.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/quazip/quazipfile.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/quazip/quazipnewinfo.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/quazip/unzip.c + ${CMAKE_CURRENT_SOURCE_DIR}/quazip/zip.c + PARENT_SCOPE) diff --git a/src/mainwindow/CMakeLists.txt b/src/mainwindow/CMakeLists.txt new file mode 100644 index 000000000..2baaf3ec3 --- /dev/null +++ b/src/mainwindow/CMakeLists.txt @@ -0,0 +1,31 @@ +# /******************************************************************* +# Part of the Fritzing project - http://fritzing.org +# Copyright (c) 2007-23 Fritzing +# Fritzing 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 3 of the License, or +# (at your option) any later version. +# Fritzing 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 Fritzing. If not, see . +# ********************************************************************/ + +set(FRITZING_HDRS ${FRITZING_HDRS} + ${CMAKE_CURRENT_SOURCE_DIR}/fdockwidget.h + ${CMAKE_CURRENT_SOURCE_DIR}/fritzingwindow.h + ${CMAKE_CURRENT_SOURCE_DIR}/mainwindow.h + ${CMAKE_CURRENT_SOURCE_DIR}/sketchareawidget.h + PARENT_SCOPE) + +set(FRITZING_SRCS ${FRITZING_SRCS} + ${CMAKE_CURRENT_SOURCE_DIR}/fdockwidget.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/fritzingwindow.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/mainwindow.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/mainwindow_export.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/mainwindow_menu.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/mainwindow_dock.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/sketchareawidget.cpp + PARENT_SCOPE) diff --git a/pri/connectors.pri b/src/model/CMakeLists.txt similarity index 58% rename from pri/connectors.pri rename to src/model/CMakeLists.txt index d72a1e033..4d34d5854 100644 --- a/pri/connectors.pri +++ b/src/model/CMakeLists.txt @@ -1,6 +1,6 @@ # /******************************************************************* # Part of the Fritzing project - http://fritzing.org -# Copyright (c) 2007-08 Fritzing +# Copyright (c) 2007-23 Fritzing # Fritzing 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 3 of the License, or @@ -13,22 +13,18 @@ # along with Fritzing. If not, see . # ********************************************************************/ -HEADERS += \ -src/connectors/bus.h \ -src/connectors/busshared.h \ -src/connectors/connector.h \ -src/connectors/connectoritem.h \ -src/connectors/nonconnectoritem.h \ -src/connectors/connectorshared.h \ -src/connectors/ercdata.h \ -src/connectors/svgidlayer.h +set(FRITZING_HDRS ${FRITZING_HDRS} + ${CMAKE_CURRENT_SOURCE_DIR}/modelbase.h + ${CMAKE_CURRENT_SOURCE_DIR}/modelpart.h + ${CMAKE_CURRENT_SOURCE_DIR}/modelpartshared.h + ${CMAKE_CURRENT_SOURCE_DIR}/palettemodel.h + ${CMAKE_CURRENT_SOURCE_DIR}/sketchmodel.h + PARENT_SCOPE) -SOURCES += \ -src/connectors/bus.cpp \ -src/connectors/busshared.cpp \ -src/connectors/connector.cpp \ -src/connectors/connectoritem.cpp \ -src/connectors/nonconnectoritem.cpp \ -src/connectors/connectorshared.cpp \ -src/connectors/ercdata.cpp \ -src/connectors/svgidlayer.cpp +set(FRITZING_SRCS ${FRITZING_SRCS} + ${CMAKE_CURRENT_SOURCE_DIR}/modelbase.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/modelpart.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/modelpartshared.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/palettemodel.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/sketchmodel.cpp + PARENT_SCOPE) diff --git a/src/partsbinpalette/CMakeLists.txt b/src/partsbinpalette/CMakeLists.txt new file mode 100644 index 000000000..7814c7009 --- /dev/null +++ b/src/partsbinpalette/CMakeLists.txt @@ -0,0 +1,42 @@ +# /******************************************************************* +# Part of the Fritzing project - http://fritzing.org +# Copyright (c) 2007-23 Fritzing +# Fritzing 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 3 of the License, or +# (at your option) any later version. +# Fritzing 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 PARTIC,asMainWindowULAR PURPOSE. See the +# GNU General Public License for more details. +# You should have received a copy of the GNU General Public License +# along with Fritzing. If not, see . +# ********************************************************************/ + +set(FRITZING_HDRS ${FRITZING_HDRS} + ${CMAKE_CURRENT_SOURCE_DIR}/partsbinpalettewidget.h + ${CMAKE_CURRENT_SOURCE_DIR}/partsbinview.h + ${CMAKE_CURRENT_SOURCE_DIR}/partsbinlistview.h + ${CMAKE_CURRENT_SOURCE_DIR}/partsbiniconview.h + ${CMAKE_CURRENT_SOURCE_DIR}/graphicsflowlayout.h + ${CMAKE_CURRENT_SOURCE_DIR}/svgiconwidget.h + ${CMAKE_CURRENT_SOURCE_DIR}/partsbincommands.h + ${CMAKE_CURRENT_SOURCE_DIR}/searchlineedit.h + ${CMAKE_CURRENT_SOURCE_DIR}/binmanager/binmanager.h + ${CMAKE_CURRENT_SOURCE_DIR}/binmanager/stacktabbar.h + ${CMAKE_CURRENT_SOURCE_DIR}/binmanager/stacktabwidget.h + PARENT_SCOPE) + +set(FRITZING_SRCS ${FRITZING_SRCS} + ${CMAKE_CURRENT_SOURCE_DIR}/partsbinpalettewidget.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/partsbinview.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/partsbinlistview.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/partsbiniconview.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/graphicsflowlayout.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/svgiconwidget.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/partsbincommands.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/searchlineedit.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/binmanager/binmanager.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/binmanager/stacktabbar.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/binmanager/stacktabwidget.cpp + PARENT_SCOPE) diff --git a/src/partseditor/CMakeLists.txt b/src/partseditor/CMakeLists.txt new file mode 100644 index 000000000..9730c57f4 --- /dev/null +++ b/src/partseditor/CMakeLists.txt @@ -0,0 +1,46 @@ +# /******************************************************************* +# +# Part of the Fritzing project - http://fritzing.org +# Copyright (c) 2007-23 Fritzing +# +# Fritzing 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 3 of the License, or +# (at your option) any later version. +# +# Fritzing 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 Fritzing. If not, see . +# +#********************************************************************/ + +set(FRITZING_HDRS ${FRITZING_HDRS} + ${CMAKE_CURRENT_SOURCE_DIR}/pemainwindow.h + ${CMAKE_CURRENT_SOURCE_DIR}/pemetadataview.h + ${CMAKE_CURRENT_SOURCE_DIR}/pecommands.h + ${CMAKE_CURRENT_SOURCE_DIR}/peconnectorsview.h + ${CMAKE_CURRENT_SOURCE_DIR}/pesvgview.h + ${CMAKE_CURRENT_SOURCE_DIR}/petoolview.h + ${CMAKE_CURRENT_SOURCE_DIR}/peutils.h + ${CMAKE_CURRENT_SOURCE_DIR}/pegraphicsitem.h + ${CMAKE_CURRENT_SOURCE_DIR}/kicadmoduledialog.h + ${CMAKE_CURRENT_SOURCE_DIR}/hashpopulatewidget.h + ${CMAKE_CURRENT_SOURCE_DIR}/baseremovebutton.h + PARENT_SCOPE) + +set(FRITZING_SRCS ${FRITZING_SRCS} + ${CMAKE_CURRENT_SOURCE_DIR}/pemainwindow.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/pemetadataview.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/pecommands.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/peconnectorsview.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/pesvgview.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/petoolview.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/peutils.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/pegraphicsitem.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/kicadmoduledialog.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/hashpopulatewidget.cpp + PARENT_SCOPE) \ No newline at end of file diff --git a/src/program/CMakeLists.txt b/src/program/CMakeLists.txt new file mode 100644 index 000000000..ab4b8d411 --- /dev/null +++ b/src/program/CMakeLists.txt @@ -0,0 +1,54 @@ +# /******************************************************************* +# +# Part of the Fritzing project - http://fritzing.org +# Copyright (c) 2007-23 Fritzing +# +# Fritzing 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 3 of the License, or +# (at your option) any later version. +# +# Fritzing 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 Fritzing. If not, see . +# +#********************************************************************/ + +set(FRITZING_HDRS ${FRITZING_HDRS} + ${CMAKE_CURRENT_SOURCE_DIR}/highlighter.h + ${CMAKE_CURRENT_SOURCE_DIR}/programtab.h + ${CMAKE_CURRENT_SOURCE_DIR}/programwindow.h + ${CMAKE_CURRENT_SOURCE_DIR}/syntaxer.h + ${CMAKE_CURRENT_SOURCE_DIR}/trienode.h + ${CMAKE_CURRENT_SOURCE_DIR}/console.h + ${CMAKE_CURRENT_SOURCE_DIR}/consolewindow.h + ${CMAKE_CURRENT_SOURCE_DIR}/consolesettings.h + ${CMAKE_CURRENT_SOURCE_DIR}/platform.h + ${CMAKE_CURRENT_SOURCE_DIR}/platformarduino.h + ${CMAKE_CURRENT_SOURCE_DIR}/platformpicaxe.h + ${CMAKE_CURRENT_SOURCE_DIR}/platformlaunchpad.h + PARENT_SCOPE) + +set(FRITZING_SRCS ${FRITZING_SRCS} + ${CMAKE_CURRENT_SOURCE_DIR}/highlighter.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/programtab.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/programwindow.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/syntaxer.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/trienode.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/console.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/consolewindow.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/consolesettings.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/platform.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/platformarduino.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/platformpicaxe.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/platformlaunchpad.cpp + PARENT_SCOPE) + +set(FRITZING_FORMS ${FRITZING_FORMS} + ${CMAKE_CURRENT_SOURCE_DIR}/consolewindow.ui + ${CMAKE_CURRENT_SOURCE_DIR}/consolesettings.ui + PARENT_SCOPE) diff --git a/pri/dock.pri b/src/referencemodel/CMakeLists.txt similarity index 73% rename from pri/dock.pri rename to src/referencemodel/CMakeLists.txt index 4a525c974..695350fad 100644 --- a/pri/dock.pri +++ b/src/referencemodel/CMakeLists.txt @@ -1,6 +1,6 @@ # /******************************************************************* # Part of the Fritzing project - http://fritzing.org -# Copyright (c) 2007-08 Fritzing +# Copyright (c) 2007-23 Fritzing # Fritzing 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 3 of the License, or @@ -13,10 +13,11 @@ # along with Fritzing. If not, see . # ********************************************************************/ -HEADERS += \ -src/dock/layerpalette.h \ +set(FRITZING_HDRS ${FRITZING_HDRS} + ${CMAKE_CURRENT_SOURCE_DIR}/referencemodel.h + ${CMAKE_CURRENT_SOURCE_DIR}/sqlitereferencemodel.h + PARENT_SCOPE) - - -SOURCES += \ -src/dock/layerpalette.cpp \ +set(FRITZING_SRCS ${FRITZING_SRCS} + ${CMAKE_CURRENT_SOURCE_DIR}/sqlitereferencemodel.cpp + PARENT_SCOPE) diff --git a/src/sketch/CMakeLists.txt b/src/sketch/CMakeLists.txt new file mode 100644 index 000000000..c93c58341 --- /dev/null +++ b/src/sketch/CMakeLists.txt @@ -0,0 +1,38 @@ +# /******************************************************************* +# Part of the Fritzing project - http://fritzing.org +# Copyright (c) 2007-23 Fritzing +# Fritzing 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 3 of the License, or +# (at your option) any later version. +# Fritzing 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 Fritzing. If not, see . +# ********************************************************************/ + +set(FRITZING_HDRS ${FRITZING_HDRS} + ${CMAKE_CURRENT_SOURCE_DIR}/renderthing.h + ${CMAKE_CURRENT_SOURCE_DIR}/fgraphicsscene.h + ${CMAKE_CURRENT_SOURCE_DIR}/breadboardsketchwidget.h + ${CMAKE_CURRENT_SOURCE_DIR}/infographicsview.h + ${CMAKE_CURRENT_SOURCE_DIR}/pcbsketchwidget.h + ${CMAKE_CURRENT_SOURCE_DIR}/schematicsketchwidget.h + ${CMAKE_CURRENT_SOURCE_DIR}/sketchwidget.h + ${CMAKE_CURRENT_SOURCE_DIR}/welcomeview.h + ${CMAKE_CURRENT_SOURCE_DIR}/zoomablegraphicsview.h + PARENT_SCOPE) + +set(FRITZING_SRCS ${FRITZING_SRCS} + ${CMAKE_CURRENT_SOURCE_DIR}/renderthing.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/fgraphicsscene.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/breadboardsketchwidget.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/infographicsview.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/pcbsketchwidget.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/schematicsketchwidget.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/sketchwidget.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/welcomeview.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/zoomablegraphicsview.cpp + PARENT_SCOPE) \ No newline at end of file diff --git a/src/svg/CMakeLists.txt b/src/svg/CMakeLists.txt new file mode 100644 index 000000000..cfb373963 --- /dev/null +++ b/src/svg/CMakeLists.txt @@ -0,0 +1,56 @@ +# /******************************************************************* +# Part of the Fritzing project - http://fritzing.org +# Copyright (c) 2007-23 Fritzing +# Fritzing 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 3 of the License, or +# (at your option) any later version. +# Fritzing 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 Fritzing. If not, see . +# ********************************************************************/ + +set(FRITZING_HDRS ${FRITZING_HDRS} + ${CMAKE_CURRENT_SOURCE_DIR}/svgfilesplitter.h + ${CMAKE_CURRENT_SOURCE_DIR}/svgpathparser.h + ${CMAKE_CURRENT_SOURCE_DIR}/svgpathgrammar_p.h + ${CMAKE_CURRENT_SOURCE_DIR}/svgpathlexer.h + ${CMAKE_CURRENT_SOURCE_DIR}/svgpathrunner.h + ${CMAKE_CURRENT_SOURCE_DIR}/svg2gerber.h + ${CMAKE_CURRENT_SOURCE_DIR}/svgflattener.h + ${CMAKE_CURRENT_SOURCE_DIR}/gerbergenerator.h + ${CMAKE_CURRENT_SOURCE_DIR}/groundplanegenerator.h + ${CMAKE_CURRENT_SOURCE_DIR}/x2svg.h + ${CMAKE_CURRENT_SOURCE_DIR}/kicad2svg.h + ${CMAKE_CURRENT_SOURCE_DIR}/kicadmodule2svg.h + ${CMAKE_CURRENT_SOURCE_DIR}/kicadschematic2svg.h + ${CMAKE_CURRENT_SOURCE_DIR}/gedaelement2svg.h + ${CMAKE_CURRENT_SOURCE_DIR}/gedaelementparser.h + ${CMAKE_CURRENT_SOURCE_DIR}/gedaelementgrammar_p.h + ${CMAKE_CURRENT_SOURCE_DIR}/gedaelementlexer.h + ${CMAKE_CURRENT_SOURCE_DIR}/svgtext.h + PARENT_SCOPE) + +set(FRITZING_SRCS ${FRITZING_SRCS} + ${CMAKE_CURRENT_SOURCE_DIR}/svgfilesplitter.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/svgpathparser.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/svgpathgrammar.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/svgpathlexer.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/svgpathrunner.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/svg2gerber.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/svgflattener.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/gerbergenerator.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/groundplanegenerator.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/x2svg.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/kicad2svg.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/kicadmodule2svg.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/kicadschematic2svg.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/gedaelement2svg.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/gedaelementparser.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/gedaelementgrammar.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/gedaelementlexer.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/svgtext.cpp + PARENT_SCOPE) diff --git a/src/utils/CMakeLists.txt b/src/utils/CMakeLists.txt new file mode 100644 index 000000000..15c3722df --- /dev/null +++ b/src/utils/CMakeLists.txt @@ -0,0 +1,70 @@ +# /******************************************************************* +# Part of the Fritzing project - http://fritzing.org +# Copyright (c) 2007-23 Fritzing +# Fritzing 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 3 of the License, or +# (at your option) any later version. +# Fritzing 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 Fritzing. If not, see . +# ********************************************************************/ + +set(FRITZING_HDRS ${FRITZING_HDRS} + ${CMAKE_CURRENT_SOURCE_DIR}/abstractstatesbutton.h + ${CMAKE_CURRENT_SOURCE_DIR}/autoclosemessagebox.h + ${CMAKE_CURRENT_SOURCE_DIR}/bendpointaction.h + ${CMAKE_CURRENT_SOURCE_DIR}/bezier.h + ${CMAKE_CURRENT_SOURCE_DIR}/bezierdisplay.h + ${CMAKE_CURRENT_SOURCE_DIR}/boundedregexpvalidator.h + ${CMAKE_CURRENT_SOURCE_DIR}/bundler.h + ${CMAKE_CURRENT_SOURCE_DIR}/clickablelabel.h + ${CMAKE_CURRENT_SOURCE_DIR}/cursormaster.h + ${CMAKE_CURRENT_SOURCE_DIR}/expandinglabel.h + ${CMAKE_CURRENT_SOURCE_DIR}/familypropertycombobox.h + ${CMAKE_CURRENT_SOURCE_DIR}/fileprogressdialog.h + ${CMAKE_CURRENT_SOURCE_DIR}/flineedit.h + ${CMAKE_CURRENT_SOURCE_DIR}/fmessagebox.h + ${CMAKE_CURRENT_SOURCE_DIR}/focusoutcombobox.h + ${CMAKE_CURRENT_SOURCE_DIR}/fsizegrip.h + ${CMAKE_CURRENT_SOURCE_DIR}/lockmanager.h + ${CMAKE_CURRENT_SOURCE_DIR}/misc.h + ${CMAKE_CURRENT_SOURCE_DIR}/resizehandle.h + ${CMAKE_CURRENT_SOURCE_DIR}/folderutils.h + ${CMAKE_CURRENT_SOURCE_DIR}/graphicsutils.h + ${CMAKE_CURRENT_SOURCE_DIR}/graphutils.h + ${CMAKE_CURRENT_SOURCE_DIR}/ratsnestcolors.h + ${CMAKE_CURRENT_SOURCE_DIR}/schematicrectconstants.h + ${CMAKE_CURRENT_SOURCE_DIR}/s2s.h + ${CMAKE_CURRENT_SOURCE_DIR}/textutils.h + ${CMAKE_CURRENT_SOURCE_DIR}/zoomslider.h + PARENT_SCOPE) + +set(FRITZING_SRCS ${FRITZING_SRCS} + ${CMAKE_CURRENT_SOURCE_DIR}/autoclosemessagebox.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/bendpointaction.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/bezier.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/bezierdisplay.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/clickablelabel.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/cursormaster.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/expandinglabel.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/fileprogressdialog.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/flineedit.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/fmessagebox.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/focusoutcombobox.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/fsizegrip.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/lockmanager.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/misc.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/resizehandle.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/folderutils.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/graphicsutils.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/graphutils.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/ratsnestcolors.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/schematicrectconstants.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/s2s.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/textutils.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/zoomslider.cpp + PARENT_SCOPE) diff --git a/src/utils/misc.cpp b/src/utils/misc.cpp index fd2560952..b3371bfed 100644 --- a/src/utils/misc.cpp +++ b/src/utils/misc.cpp @@ -67,10 +67,7 @@ bool isParent(QObject * candidateParent, QObject * candidateChild) { } Qt::KeyboardModifier altOrMetaModifier() { -#ifdef LINUX_32 - return Qt::MetaModifier; -#endif -#ifdef LINUX_64 +#ifdef Q_OS_LINUX return Qt::MetaModifier; #endif return Qt::AltModifier; diff --git a/pri/version.pri b/src/version/CMakeLists.txt similarity index 54% rename from pri/version.pri rename to src/version/CMakeLists.txt index 0c528c093..ae428ccbe 100644 --- a/pri/version.pri +++ b/src/version/CMakeLists.txt @@ -1,6 +1,6 @@ # /******************************************************************* # Part of the Fritzing project - http://fritzing.org -# Copyright (c) 2007-08 Fritzing +# Copyright (c) 2007-23 Fritzing # Fritzing 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 3 of the License, or @@ -13,21 +13,22 @@ # along with Fritzing. If not, see . # ********************************************************************/ -include(gitversion.pri) +set(FRITZING_HDRS ${FRITZING_HDRS} + ${CMAKE_CURRENT_SOURCE_DIR}/modfiledialog.h + ${CMAKE_CURRENT_SOURCE_DIR}/updatedialog.h + ${CMAKE_CURRENT_SOURCE_DIR}/version.h + ${CMAKE_CURRENT_SOURCE_DIR}/versionchecker.h + ${CMAKE_CURRENT_SOURCE_DIR}/partschecker.h + PARENT_SCOPE) -HEADERS += \ - src/version/modfiledialog.h \ - src/version/updatedialog.h \ - src/version/version.h \ - src/version/versionchecker.h \ - src/version/partschecker.h +set(FRITZING_SRCS ${FRITZING_SRCS} + ${CMAKE_CURRENT_SOURCE_DIR}/modfiledialog.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/updatedialog.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/version.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/versionchecker.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/partschecker.cpp + PARENT_SCOPE) -SOURCES += \ - src/version/modfiledialog.cpp \ - src/version/updatedialog.cpp \ - src/version/version.cpp \ - src/version/versionchecker.cpp \ - src/version/partschecker.cpp - -FORMS += \ - src/version/modfiledialog.ui +set(FRITZING_FORMS ${FRITZING_FORMS} + ${CMAKE_CURRENT_SOURCE_DIR}/modfiledialog.ui + PARENT_SCOPE) From 0278b1013e1e731c6be3abc6bc5c4c07dcdd5ec6 Mon Sep 17 00:00:00 2001 From: Stephan Vedder Date: Fri, 17 Mar 2023 16:39:46 +0100 Subject: [PATCH 2/3] Readd git versioning --- src/CMakeLists.txt | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 197e1be1b..b35bf1518 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -88,5 +88,25 @@ target_link_libraries(fritzing target_include_directories(fritzing PRIVATE ${FRITZING_INC_DIRS}) # Git versioning +find_package(Git) -target_compile_definitions(fritzing PRIVATE GIT_VERSION="N/A" GIT_DATE="N/A" BUILD_TIME="N/A") \ No newline at end of file +set(GIT_VERSION "N/A") +set(GIT_DATE "N/A") +string(TIMESTAMP BUILD_TIME "%Y-%m-%d %H:%M") + +if(GIT_FOUND) + execute_process( + COMMAND ${GIT_EXECUTABLE} describe --tags --always + OUTPUT_VARIABLE GIT_VERSION) + string(STRIP ${GIT_VERSION} GIT_VERSION) + message(STATUS ${GIT_VERSION}) + execute_process( + COMMAND ${GIT_EXECUTABLE} show --no-patch --no-notes --pretty='%cd' --date=iso-strict + OUTPUT_VARIABLE GIT_DATE) + string(STRIP ${GIT_DATE} GIT_DATE) + message(STATUS ${GIT_DATE}) +else() + message(WARN "Can't get git versioning") +endif() + +target_compile_definitions(fritzing PRIVATE GIT_VERSION="${GIT_VERSION}" GIT_DATE="${GIT_DATE}" BUILD_TIME="${BUILD_TIME}") \ No newline at end of file From a706c16d2c51732148720dccaf7a3a542049c6d9 Mon Sep 17 00:00:00 2001 From: Stephan Vedder Date: Mon, 20 Mar 2023 15:20:12 +0100 Subject: [PATCH 3/3] Add building of parts library as a custom target --- .gitmodules | 3 +++ CMakeLists.txt | 8 ++++++-- parts | 1 + src/CMakeLists.txt | 2 -- 4 files changed, 10 insertions(+), 4 deletions(-) create mode 100644 .gitmodules create mode 160000 parts diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 000000000..03239940e --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "parts"] + path = parts + url = https://github.com/fritzing/fritzing-parts.git diff --git a/CMakeLists.txt b/CMakeLists.txt index 57b345a61..8aba75ffc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -10,6 +10,10 @@ set(CMAKE_AUTOMOC ON) set(CMAKE_AUTORCC ON) set(CMAKE_AUTOUIC ON) -find_package(Qt5 COMPONENTS Widgets REQUIRED) - +# Build application add_subdirectory(src) + +# Build parts library +add_custom_target(fritzing_parts + COMMAND fritzing -db "${CMAKE_CURRENT_BINARY_DIR}/parts.db" -pp ${CMAKE_SOURCE_DIR}/parts + BYPRODUCTS ${CMAKE_CURRENT_BINARY_DIR}/parts.db) \ No newline at end of file diff --git a/parts b/parts new file mode 160000 index 000000000..c53679d10 --- /dev/null +++ b/parts @@ -0,0 +1 @@ +Subproject commit c53679d107bbcff09f925fdadfa37b109034b742 diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index b35bf1518..18283bfe2 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -99,12 +99,10 @@ if(GIT_FOUND) COMMAND ${GIT_EXECUTABLE} describe --tags --always OUTPUT_VARIABLE GIT_VERSION) string(STRIP ${GIT_VERSION} GIT_VERSION) - message(STATUS ${GIT_VERSION}) execute_process( COMMAND ${GIT_EXECUTABLE} show --no-patch --no-notes --pretty='%cd' --date=iso-strict OUTPUT_VARIABLE GIT_DATE) string(STRIP ${GIT_DATE} GIT_DATE) - message(STATUS ${GIT_DATE}) else() message(WARN "Can't get git versioning") endif()