summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorgregory guy <[email protected]>2020-10-12 15:43:57 +0200
committergregory guy <[email protected]>2020-11-02 17:30:41 +0100
commita9c86866c380e503dd75797b5c2d129bfb622a9e (patch)
tree7f082c4dc920583aea947d773459d9d29b7b65ef /src
parent99525910c366e86d76dfeb818697220703578e8a (diff)
downloadktechlab-a9c86866c380e503dd75797b5c2d129bfb622a9e.tar.gz
ktechlab-a9c86866c380e503dd75797b5c2d129bfb622a9e.zip
Conversion to the cmake building system.
Added man pages taken from the Debian packaging system. Move the ktechlab.desktop file into XDG_APPS_INSTALL_DIR directory, see TDE/tde#26 and bug 2408. Signed-off-by: gregory guy <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/CMakeLists.txt100
-rw-r--r--src/circuitview.cpp5
-rw-r--r--src/core/CMakeLists.txt31
-rw-r--r--src/core/main.cpp10
-rw-r--r--src/debugmanager.cpp2
-rw-r--r--src/debugmanager.h2
-rw-r--r--src/documentiface.h2
-rw-r--r--src/drawparts/CMakeLists.txt25
-rw-r--r--src/electronics/CMakeLists.txt36
-rw-r--r--src/electronics/components/CMakeLists.txt49
-rw-r--r--src/electronics/components/piccomponent.cpp2
-rw-r--r--src/electronics/components/piccomponent.h2
-rw-r--r--src/electronics/components/piccomponentpin.cpp2
-rw-r--r--src/electronics/components/piccomponentpin.h2
-rw-r--r--src/electronics/gpsimprocessor.cpp19
-rw-r--r--src/electronics/gpsimprocessor.h2
-rw-r--r--src/electronics/simulation/CMakeLists.txt29
-rw-r--r--src/flowparts/CMakeLists.txt35
-rw-r--r--src/flowparts/sub.cpp3
-rw-r--r--src/gui/CMakeLists.txt44
-rw-r--r--src/gui/newfiledlg.cpp3
-rw-r--r--src/gui/projectdlgs.cpp2
-rw-r--r--src/gui/symbolviewer.h2
-rw-r--r--src/itemdocument.cpp4
-rw-r--r--src/itemdocumentdata.cpp2
-rw-r--r--src/itemgroup.cpp1
-rw-r--r--src/itemlibrary.cpp2
-rw-r--r--src/ktechlab.cpp5
-rw-r--r--src/languages/CMakeLists.txt32
-rw-r--r--src/languages/asmparser.cpp5
-rw-r--r--src/mechanics/CMakeLists.txt25
-rw-r--r--src/micro/CMakeLists.txt23
-rw-r--r--src/microsettings.cpp2
-rw-r--r--src/oscilloscopedata.cpp2
-rw-r--r--src/textdocument.h3
-rw-r--r--src/textview.cpp5
-rw-r--r--src/textview.h3
-rw-r--r--src/variablelabel.cpp2
-rw-r--r--src/variablelabel.h2
39 files changed, 514 insertions, 13 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
new file mode 100644
index 0000000..657e8dd
--- /dev/null
+++ b/src/CMakeLists.txt
@@ -0,0 +1,100 @@
+add_subdirectory( core )
+add_subdirectory( gui )
+add_subdirectory( flowparts )
+add_subdirectory( micro )
+add_subdirectory( mechanics )
+add_subdirectory( electronics )
+add_subdirectory( languages )
+add_subdirectory( drawparts )
+
+include_directories(
+ ${CMAKE_BINARY_DIR}
+ ${CMAKE_CURRENT_BINARY_DIR}
+ ${CMAKE_CURRENT_SOURCE_DIR}
+ ${TDE_INCLUDE_DIR}
+ ${TQT_INCLUDE_DIRS}
+ ${CMAKE_SOURCE_DIR}/src/drawparts
+ ${CMAKE_SOURCE_DIR}/src/electronics
+ ${CMAKE_SOURCE_DIR}/src/electronics/components
+ ${CMAKE_SOURCE_DIR}/src/electronics/simulation
+ ${CMAKE_SOURCE_DIR}/src/flowparts
+ ${CMAKE_SOURCE_DIR}/src/gui
+ ${CMAKE_SOURCE_DIR}/src/languages
+ ${CMAKE_SOURCE_DIR}/src/mechanics
+ ${CMAKE_SOURCE_DIR}/src/micro
+ ${GPSIM_INCLUDE_DIRS}
+)
+
+link_directories(
+ ${TQT_LIBRARY_DIRS}
+ ${TDE_LIB_DIR}
+)
+
+##### ktechlab (executable)
+
+tde_add_executable( ${PROJECT_NAME} AUTOMOC
+
+ SOURCES
+ docmanageriface.skel viewiface.skel documentiface.skel
+ ktechlab.cpp node.cpp connector.cpp itemlibrary.cpp
+ libraryitem.cpp projectmanager.cpp picitem.cpp
+ variant.cpp canvasitemparts.cpp flowcontainer.cpp
+ microsettings.cpp fpnode.cpp cells.cpp
+ asmformatter.cpp conrouter.cpp nodegroup.cpp
+ canvasmanipulator.cpp iteminterface.cpp
+ itemgroup.cpp ciwidgetmgr.cpp filemetainfo.cpp
+ resizeoverlay.cpp document.cpp view.cpp
+ docmanager.cpp cnitem.cpp item.cpp cnitemgroup.cpp
+ itemview.cpp itemdocument.cpp textview.cpp
+ textdocument.cpp circuitdocument.cpp
+ flowcodedocument.cpp icnview.cpp icndocument.cpp
+ viewcontainer.cpp circuitview.cpp flowcodeview.cpp
+ eventinfo.cpp oscilloscopedata.cpp
+ itemdocumentdata.cpp docmanageriface.cpp
+ documentiface.cpp viewiface.cpp simulator.cpp
+ katemdi.cpp debugmanager.cpp recentfilesaction.cpp
+ variablelabel.cpp
+ LINK
+ tdecore-shared
+ tdeui-shared
+ tdeprint-shared
+ tdeparts-shared
+ tdeutils-shared
+ tdetexteditor-shared
+ core-static
+ gui-static
+ micro-static
+ flowparts-static
+ mechanics-static
+ electronics-static
+ components-static
+ languages-static
+ drawparts-static
+ ${GPSIM_LIBRARIES}
+
+ DESTINATION ${BIN_INSTALL_DIR}
+)
+
+
+##### other data
+
+install(
+ FILES ktechlabui.rc error_messages_en_gb
+ ktechlabcircuitui.rc ktechlabflowcodeui.rc
+ ktechlabitemviewui.rc ktechlabmechanicsui.rc
+ ktechlabtextui.rc ktechlabkateui.rc
+ DESTINATION ${DATA_INSTALL_DIR}/${PROJECT_NAME}
+)
+
+install(
+ FILES microbe.xml
+ DESTINATION ${DATA_INSTALL_DIR}/katepart/syntax
+)
+
+tde_create_translated_desktop(
+ SOURCE x-circuit.desktop x-flowcode.desktop
+ x-ktechlab.desktop x-microbe.desktop
+ DESTINATION ${MIME_INSTALL_DIR}/application
+)
+
+tde_create_translated_desktop( ${PROJECT_NAME}.desktop )
diff --git a/src/circuitview.cpp b/src/circuitview.cpp
index 5e90448..07a6408 100644
--- a/src/circuitview.cpp
+++ b/src/circuitview.cpp
@@ -8,9 +8,12 @@
* (at your option) any later version. *
***************************************************************************/
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
#include "circuitdocument.h"
#include "circuitview.h"
-#include "config.h"
#include "ktechlab.h"
#include "simulator.h"
#include "viewiface.h"
diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt
new file mode 100644
index 0000000..2a06ed1
--- /dev/null
+++ b/src/core/CMakeLists.txt
@@ -0,0 +1,31 @@
+include_directories(
+ ${CMAKE_BINARY_DIR}
+ ${CMAKE_CURRENT_BINARY_DIR}
+ ${CMAKE_CURRENT_SOURCE_DIR}
+ ${TDE_INCLUDE_DIR}
+ ${TQT_INCLUDE_DIRS}
+ ${CMAKE_SOURCE_DIR}/src
+)
+
+link_directories(
+ ${TQT_LIBRARY_DIRS}
+ ${TDE_LIB_DIR}
+)
+
+
+##### core (static)
+
+tde_add_library( core STATIC_PIC AUTOMOC
+
+ SOURCES
+ ktlconfig.kcfgc
+ main.cpp
+)
+
+
+##### other data
+
+install(
+ FILES ktechlab.kcfg
+ DESTINATION ${KCFG_INSTALL_DIR}
+)
diff --git a/src/core/main.cpp b/src/core/main.cpp
index eae01fd..a8a4f39 100644
--- a/src/core/main.cpp
+++ b/src/core/main.cpp
@@ -8,6 +8,10 @@
* (at your option) any later version. *
***************************************************************************/
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
#include "ktechlab.h"
#include <dcopclient.h>
@@ -57,8 +61,12 @@ int main(int argc, char **argv)
return app.exec();
}
-void exit_gpsim(int ret)
+#ifndef NO_GPSIM
+
+KDE_EXPORT void exit_gpsim(int ret)
{
printf("gpsim attempted to call exit_gpsim(%d), ***IGNORING***\n", ret);
// exit(ret);
}
+
+#endif
diff --git a/src/debugmanager.cpp b/src/debugmanager.cpp
index 5350b7c..ffab040 100644
--- a/src/debugmanager.cpp
+++ b/src/debugmanager.cpp
@@ -8,7 +8,9 @@
* (at your option) any later version. *
***************************************************************************/
+#ifdef HAVE_CONFIG_H
#include "config.h"
+#endif
#ifndef NO_GPSIM
#include "debugmanager.h"
diff --git a/src/debugmanager.h b/src/debugmanager.h
index b609290..00d6c5f 100644
--- a/src/debugmanager.h
+++ b/src/debugmanager.h
@@ -8,7 +8,9 @@
* (at your option) any later version. *
***************************************************************************/
+#ifdef HAVE_CONFIG_H
#include "config.h"
+#endif
#ifndef NO_GPSIM
#ifndef DEBUGMANAGER_H
diff --git a/src/documentiface.h b/src/documentiface.h
index ff41edd..0f6909e 100644
--- a/src/documentiface.h
+++ b/src/documentiface.h
@@ -11,7 +11,9 @@
#ifndef DOCUMENTIFACE_H
#define DOCUMENTIFACE_H
+#ifdef HAVE_CONFIG_H
#include "config.h"
+#endif
#include <dcopobject.h>
#include <dcopref.h>
diff --git a/src/drawparts/CMakeLists.txt b/src/drawparts/CMakeLists.txt
new file mode 100644
index 0000000..760d5c7
--- /dev/null
+++ b/src/drawparts/CMakeLists.txt
@@ -0,0 +1,25 @@
+include_directories(
+ ${CMAKE_BINARY_DIR}
+ ${CMAKE_CURRENT_BINARY_DIR}
+ ${CMAKE_CURRENT_SOURCE_DIR}
+ ${TDE_INCLUDE_DIR}
+ ${TQT_INCLUDE_DIRS}
+ ${CMAKE_SOURCE_DIR}/src
+)
+
+link_directories(
+ ${TQT_LIBRARY_DIRS}
+ ${TDE_LIB_DIR}
+)
+
+
+##### drawparts (static)
+
+tde_add_library( drawparts STATIC_PIC AUTOMOC
+
+ SOURCES
+ drawpart.cpp
+ dpline.cpp
+ solidshape.cpp
+ dptext.cpp
+)
diff --git a/src/electronics/CMakeLists.txt b/src/electronics/CMakeLists.txt
new file mode 100644
index 0000000..781d0a0
--- /dev/null
+++ b/src/electronics/CMakeLists.txt
@@ -0,0 +1,36 @@
+add_subdirectory( simulation )
+add_subdirectory( components )
+
+include_directories(
+ ${CMAKE_BINARY_DIR}
+ ${CMAKE_CURRENT_BINARY_DIR}
+ ${CMAKE_CURRENT_SOURCE_DIR}
+ ${TDE_INCLUDE_DIR}
+ ${TQT_INCLUDE_DIRS}
+ ${CMAKE_SOURCE_DIR}/src
+ ${CMAKE_SOURCE_DIR}/src/electronics/components
+ ${CMAKE_SOURCE_DIR}/src/electronics/simulation
+ ${CMAKE_SOURCE_DIR}/src/gui
+ ${CMAKE_SOURCE_DIR}/src/languages
+ ${CMAKE_SOURCE_DIR}/src/micro
+ ${GLIB_INCLUDE_DIRS}
+ ${GPSIM_INCLUDE_DIRS}
+)
+
+link_directories(
+ ${TQT_LIBRARY_DIRS}
+ ${TDE_LIB_DIR}
+)
+
+
+##### electronics (static)
+
+
+tde_add_library( electronics STATIC_PIC AUTOMOC
+
+ SOURCES
+ component.cpp subcircuits.cpp gpsimprocessor.cpp
+ switch.cpp pin.cpp wire.cpp ecnode.cpp port.cpp
+ LINK
+ components-static
+)
diff --git a/src/electronics/components/CMakeLists.txt b/src/electronics/components/CMakeLists.txt
new file mode 100644
index 0000000..7850d19
--- /dev/null
+++ b/src/electronics/components/CMakeLists.txt
@@ -0,0 +1,49 @@
+include_directories(
+ ${CMAKE_BINARY_DIR}
+ ${CMAKE_CURRENT_BINARY_DIR}
+ ${CMAKE_CURRENT_SOURCE_DIR}
+ ${TDE_INCLUDE_DIR}
+ ${TQT_INCLUDE_DIRS}
+ ${CMAKE_SOURCE_DIR}/src
+ ${CMAKE_SOURCE_DIR}/src/electronics
+ ${CMAKE_SOURCE_DIR}/src/electronics/components
+ ${CMAKE_SOURCE_DIR}/src/electronics/simulation
+ ${CMAKE_SOURCE_DIR}/src/gui
+ ${CMAKE_SOURCE_DIR}/src/languages
+ ${CMAKE_SOURCE_DIR}/src/micro
+ ${GLIB_INCLUDE_DIRS}
+ ${GPSIM_INCLUDE_DIRS}
+)
+
+link_directories(
+ ${TQT_LIBRARY_DIRS}
+ ${TDE_LIB_DIR}
+)
+
+
+##### components (static)
+
+tde_add_library( components STATIC_PIC AUTOMOC
+
+ SOURCES
+ ecresistor.cpp ecled.cpp ecdiode.cpp
+ ecsevensegment.cpp eckeypad.cpp
+ eccapacitor.cpp ec555.cpp eccurrentsource.cpp
+ ecfixedvoltage.cpp ecbcdto7segment.cpp
+ ecsignallamp.cpp ecclockinput.cpp
+ ecpotentiometer.cpp ecopamp.cpp ecvoltagesource.cpp
+ eccurrentsignal.cpp ecvoltagesignal.cpp
+ ecground.cpp multiinputgate.cpp fulladder.cpp
+ multiplexer.cpp demultiplexer.cpp externalconnection.cpp
+ ecsubcircuit.cpp meter.cpp probe.cpp resistordip.cpp
+ addac.cpp dependentsource.cpp flipflop.cpp
+ toggleswitch.cpp pushswitch.cpp ram.cpp
+ discretelogic.cpp piccomponent.cpp piccomponentpin.cpp
+ binarycounter.cpp bidirled.cpp matrixdisplay.cpp
+ bussplitter.cpp matrixdisplaydriver.cpp
+ magnitudecomparator.cpp serialportcomponent.cpp
+ parallelportcomponent.cpp inductor.cpp ecbjt.cpp
+ rotoswitch.cpp
+ LINK
+ elements-static
+)
diff --git a/src/electronics/components/piccomponent.cpp b/src/electronics/components/piccomponent.cpp
index 83038c1..57ff164 100644
--- a/src/electronics/components/piccomponent.cpp
+++ b/src/electronics/components/piccomponent.cpp
@@ -8,7 +8,9 @@
* (at your option) any later version. *
***************************************************************************/
+#ifdef HAVE_CONFIG_H
#include "config.h"
+#endif
#ifndef NO_GPSIM
#include "canvasitemparts.h"
diff --git a/src/electronics/components/piccomponent.h b/src/electronics/components/piccomponent.h
index 330fbf9..5bf4ac8 100644
--- a/src/electronics/components/piccomponent.h
+++ b/src/electronics/components/piccomponent.h
@@ -11,7 +11,9 @@
#ifndef PICCOMPONENT_H
#define PICCOMPONENT_H
+#ifdef HAVE_CONFIG_H
#include "config.h"
+#endif
#ifndef NO_GPSIM
#include "component.h"
diff --git a/src/electronics/components/piccomponentpin.cpp b/src/electronics/components/piccomponentpin.cpp
index 47ef6cb..59790f1 100644
--- a/src/electronics/components/piccomponentpin.cpp
+++ b/src/electronics/components/piccomponentpin.cpp
@@ -8,7 +8,9 @@
* (at your option) any later version. *
***************************************************************************/
+#ifdef HAVE_CONFIG_H
#include "config.h"
+#endif
#ifndef NO_GPSIM
#include "micropackage.h"
diff --git a/src/electronics/components/piccomponentpin.h b/src/electronics/components/piccomponentpin.h
index cd41db9..8681cab 100644
--- a/src/electronics/components/piccomponentpin.h
+++ b/src/electronics/components/piccomponentpin.h
@@ -11,7 +11,9 @@
#ifndef PICCOMPONENTPIN_H
#define PICCOMPONENTPIN_H
+#ifdef HAVE_CONFIG_H
#include "config.h"
+#endif
#ifndef NO_GPSIM
#include "logic.h"
diff --git a/src/electronics/gpsimprocessor.cpp b/src/electronics/gpsimprocessor.cpp
index c5ad638..38e9c89 100644
--- a/src/electronics/gpsimprocessor.cpp
+++ b/src/electronics/gpsimprocessor.cpp
@@ -8,7 +8,14 @@
* (at your option) any later version. *
***************************************************************************/
+#if defined(TQT_NO_STL)
+# define DISABLE_TQT_NO_STL
+# undef TQT_NO_STL
+#endif
+
+#ifdef HAVE_CONFIG_H
#include "config.h"
+#endif
#ifndef NO_GPSIM
#include "asmparser.h"
@@ -50,8 +57,8 @@ void initialize_ConsoleUI();
extern void initialize_readline();
extern void gui_main(void);
extern void cli_main();
-void gpsim_version() {};
-void quit_gui() {};
+KDE_EXPORT void gpsim_version() {};
+KDE_EXPORT void quit_gui() {};
//BEGIN class GpsimProcessor
@@ -788,7 +795,6 @@ void RegisterSet::update()
//END class RegisterSet
-
//BEGIN class RegisterInfo
RegisterInfo::RegisterInfo( Register * reg )
{
@@ -815,7 +821,6 @@ RegisterInfo::RegisterInfo( Register * reg )
m_type = Invalid;
break;
}
-
m_name = m_pRegister->baseName();
}
@@ -880,7 +885,11 @@ DebugLine::DebugLine()
}
//END class DebugLine
-
#include "gpsimprocessor.moc"
+#endif
+// restore TQT_NO_STL
+#if defined(DISABLE_TQT_NO_STL)
+# undef DISABLE_TQT_NO_STL
+# define TQT_NO_STL
#endif
diff --git a/src/electronics/gpsimprocessor.h b/src/electronics/gpsimprocessor.h
index aae2605..6337300 100644
--- a/src/electronics/gpsimprocessor.h
+++ b/src/electronics/gpsimprocessor.h
@@ -8,7 +8,9 @@
* (at your option) any later version. *
***************************************************************************/
+#ifdef HAVE_CONFIG_H
#include "config.h"
+#endif
#ifndef NO_GPSIM
#ifndef GPSIMPROCESSOR_H
diff --git a/src/electronics/simulation/CMakeLists.txt b/src/electronics/simulation/CMakeLists.txt
new file mode 100644
index 0000000..ffe2399
--- /dev/null
+++ b/src/electronics/simulation/CMakeLists.txt
@@ -0,0 +1,29 @@
+include_directories(
+ ${CMAKE_BINARY_DIR}
+ ${CMAKE_CURRENT_BINARY_DIR}
+ ${CMAKE_CURRENT_SOURCE_DIR}
+ ${TDE_INCLUDE_DIR}
+ ${TQT_INCLUDE_DIRS}
+ ${CMAKE_SOURCE_DIR}/src
+ ${CMAKE_SOURCE_DIR}/src/electronics
+)
+
+link_directories(
+ ${TQT_LIBRARY_DIRS}
+ ${TDE_LIB_DIR}
+)
+
+
+##### elements (static)
+
+tde_add_library( elements STATIC_PIC AUTOMOC
+
+ SOURCES
+ cccs.cpp ccvs.cpp circuit.cpp currentsource.cpp
+ diode.cpp element.cpp elementset.cpp logic.cpp
+ matrix.cpp vccs.cpp vcvs.cpp voltagesource.cpp
+ capacitance.cpp resistance.cpp currentsignal.cpp
+ voltagepoint.cpp voltagesignal.cpp elementsignal.cpp
+ nonlinear.cpp reactive.cpp vec.cpp bjt.cpp
+ opamp.cpp inductance.cpp
+)
diff --git a/src/flowparts/CMakeLists.txt b/src/flowparts/CMakeLists.txt
new file mode 100644
index 0000000..733a07e
--- /dev/null
+++ b/src/flowparts/CMakeLists.txt
@@ -0,0 +1,35 @@
+
+include_directories(
+ ${CMAKE_BINARY_DIR}
+ ${CMAKE_CURRENT_BINARY_DIR}
+ ${CMAKE_CURRENT_SOURCE_DIR}
+ ${TDE_INCLUDE_DIR}
+ ${TQT_INCLUDE_DIRS}
+ ${CMAKE_SOURCE_DIR}/src
+ ${CMAKE_SOURCE_DIR}/src/electronics
+ ${CMAKE_SOURCE_DIR}/src/electronics/components
+ ${CMAKE_SOURCE_DIR}/src/languages
+ ${CMAKE_SOURCE_DIR}/src/micro
+
+)
+
+link_directories(
+ ${TQT_LIBRARY_DIRS}
+ ${TDE_LIB_DIR}
+)
+
+
+##### flowparts (static)
+
+tde_add_library( flowparts STATIC_PIC AUTOMOC
+
+ SOURCES
+ callsub.cpp delay.cpp end.cpp forloop.cpp
+ readport.cpp setpin.cpp start.cpp
+ testpin.cpp unary.cpp varassignment.cpp
+ varcomparison.cpp writeport.cpp repeat.cpp
+ while.cpp sub.cpp count.cpp embed.cpp
+ interrupt.cpp keypad.cpp pulse.cpp
+ sevenseg.cpp inputbutton.cpp
+ flowpart.cpp pinmapping.cpp
+)
diff --git a/src/flowparts/sub.cpp b/src/flowparts/sub.cpp
index 5be9f8e..cedf17e 100644
--- a/src/flowparts/sub.cpp
+++ b/src/flowparts/sub.cpp
@@ -57,6 +57,3 @@ void Sub::generateMicrobe( FlowCode *code )
code->addCodeBranch( outputPart("int_in") );
code->addCode("}");
}
-
-
-// #include "sub.moc"
diff --git a/src/gui/CMakeLists.txt b/src/gui/CMakeLists.txt
new file mode 100644
index 0000000..2e38f19
--- /dev/null
+++ b/src/gui/CMakeLists.txt
@@ -0,0 +1,44 @@
+include_directories(
+ ${CMAKE_BINARY_DIR}
+ ${CMAKE_CURRENT_BINARY_DIR}
+ ${CMAKE_CURRENT_SOURCE_DIR}
+ ${TDE_INCLUDE_DIR}
+ ${TQT_INCLUDE_DIRS}
+ ${CMAKE_SOURCE_DIR}/src
+ ${CMAKE_SOURCE_DIR}/src/electronics
+ ${CMAKE_SOURCE_DIR}/src/electronics/components
+ ${CMAKE_SOURCE_DIR}/src/electronics/simulation
+ ${CMAKE_SOURCE_DIR}/src/flowparts
+ ${CMAKE_SOURCE_DIR}/src/languages
+ ${CMAKE_SOURCE_DIR}/src/mechanics
+ ${CMAKE_SOURCE_DIR}/src/micro
+)
+
+link_directories(
+ ${TQT_LIBRARY_DIRS}
+ ${TDE_LIB_DIR}
+)
+
+
+##### gui (static)
+
+tde_add_library( gui STATIC_PIC AUTOMOC
+
+ SOURCES
+ asmformattingwidget.ui gpasmsettingswidget.ui
+ logicwidget.ui newfilewidget.ui newprojectwidget.ui
+ outputmethodwidget.ui microsettingswidget.ui
+ oscilloscopewidget.ui generaloptionswidget.ui
+ createsubprojectwidget.ui processingoptionswidget.ui
+ sdccoptionswidget.ui linkeroptionswidget.ui
+ picprogrammerconfigwidget.ui newpinmappingwidget.ui
+ programmerwidget.ui
+ contexthelp.cpp doublespinbox.cpp itemeditor.cpp
+ itemselector.cpp microsettingsdlg.cpp
+ newfiledlg.cpp orientationwidget.cpp
+ outputmethoddlg.cpp pieditor.cpp plvitem.cpp
+ propertieslistview.cpp settingsdlg.cpp oscilloscope.cpp
+ oscilloscopeview.cpp probepositioner.cpp logview.cpp
+ projectdlgs.cpp microselectwidget.cpp
+ symbolviewer.cpp programmerdlg.cpp colorcombo.cpp
+)
diff --git a/src/gui/newfiledlg.cpp b/src/gui/newfiledlg.cpp
index fac51d5..e379976 100644
--- a/src/gui/newfiledlg.cpp
+++ b/src/gui/newfiledlg.cpp
@@ -8,7 +8,10 @@
* (at your option) any later version. *
***************************************************************************/
+#ifdef HAVE_CONFIG_H
#include "config.h"
+#endif
+
#include "document.h"
#include "microinfo.h"
#include "newfiledlg.h"
diff --git a/src/gui/projectdlgs.cpp b/src/gui/projectdlgs.cpp
index f6e2718..6ab051b 100644
--- a/src/gui/projectdlgs.cpp
+++ b/src/gui/projectdlgs.cpp
@@ -270,6 +270,8 @@ void ProcessingOptionsDlg::accept()
void ProcessingOptionsDlg::reject()
{
}
+
+#include "projectdlgs.moc"
//END class ProcessingOptionsDlg
diff --git a/src/gui/symbolviewer.h b/src/gui/symbolviewer.h
index d0ab0d7..a85253f 100644
--- a/src/gui/symbolviewer.h
+++ b/src/gui/symbolviewer.h
@@ -8,7 +8,9 @@
* (at your option) any later version. *
***************************************************************************/
+#ifdef HAVE_CONFIG_H
#include "config.h"
+#endif
#ifndef NO_GPSIM
#ifndef SYMBOLVIEWER_H
diff --git a/src/itemdocument.cpp b/src/itemdocument.cpp
index c830bef..9a73877 100644
--- a/src/itemdocument.cpp
+++ b/src/itemdocument.cpp
@@ -8,6 +8,10 @@
* (at your option) any later version. *
***************************************************************************/
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
#include "canvasmanipulator.h"
#include "circuitdocument.h"
#include "connector.h"
diff --git a/src/itemdocumentdata.cpp b/src/itemdocumentdata.cpp
index 24a0ac6..c0efc5d 100644
--- a/src/itemdocumentdata.cpp
+++ b/src/itemdocumentdata.cpp
@@ -27,6 +27,8 @@
#include <tqbitarray.h>
#include <tqfile.h>
+#include <map>
+
// Converts the TQBitArray into a string (e.g. "F289A9E") that can be stored in an xml file
static TQString toAsciiHex( TQBitArray _data )
diff --git a/src/itemgroup.cpp b/src/itemgroup.cpp
index c1ab4da..1268550 100644
--- a/src/itemgroup.cpp
+++ b/src/itemgroup.cpp
@@ -15,6 +15,7 @@
#include <tqtimer.h>
+#include <map>
ItemGroup::ItemGroup( ItemDocument *view, const char *name )
: TQObject( view, name )
diff --git a/src/itemlibrary.cpp b/src/itemlibrary.cpp
index 720c5c7..bbf144e 100644
--- a/src/itemlibrary.cpp
+++ b/src/itemlibrary.cpp
@@ -8,7 +8,9 @@
* (at your option) any later version. *
***************************************************************************/
+#ifdef HAVE_CONFIG_H
#include "config.h"
+#endif
#include "cnitem.h"
#include "canvasitemparts.h"
diff --git a/src/ktechlab.cpp b/src/ktechlab.cpp
index 5979544..e0294e1 100644
--- a/src/ktechlab.cpp
+++ b/src/ktechlab.cpp
@@ -8,8 +8,11 @@
* (at your option) any later version. *
***************************************************************************/
-#include "circuitdocument.h"
+#ifdef HAVE_CONFIG_H
#include "config.h"
+#endif
+
+#include "circuitdocument.h"
#include "contexthelp.h"
#include "docmanager.h"
#include "filemetainfo.h"
diff --git a/src/languages/CMakeLists.txt b/src/languages/CMakeLists.txt
new file mode 100644
index 0000000..b7df5ec
--- /dev/null
+++ b/src/languages/CMakeLists.txt
@@ -0,0 +1,32 @@
+include_directories(
+ ${CMAKE_BINARY_DIR}
+ ${CMAKE_CURRENT_BINARY_DIR}
+ ${CMAKE_CURRENT_SOURCE_DIR}
+ ${TDE_INCLUDE_DIR}
+ ${TQT_INCLUDE_DIRS}
+ ${CMAKE_SOURCE_DIR}/src
+ ${CMAKE_SOURCE_DIR}/src/electronics
+ ${CMAKE_SOURCE_DIR}/src/flowparts
+ ${CMAKE_SOURCE_DIR}/src/gui
+ ${CMAKE_SOURCE_DIR}/src/micro
+)
+
+link_directories(
+ ${TQT_LIBRARY_DIRS}
+ ${TDE_LIB_DIR}
+)
+
+
+##### languages (static)
+
+tde_add_library( languages STATIC_PIC AUTOMOC
+
+ SOURCES
+ language.cpp languagemanager.cpp microbe.cpp
+ externallanguage.cpp gpasm.cpp gpdasm.cpp
+ processchain.cpp flowcode.cpp asmparser.cpp
+ sdcc.cpp gplink.cpp gplib.cpp sourceline.cpp
+ picprogrammer.cpp
+ LINK
+ gui-static
+)
diff --git a/src/languages/asmparser.cpp b/src/languages/asmparser.cpp
index 90c26d7..0123dfb 100644
--- a/src/languages/asmparser.cpp
+++ b/src/languages/asmparser.cpp
@@ -8,8 +8,11 @@
* (at your option) any later version. *
***************************************************************************/
-#include "asmparser.h"
+#ifdef HAVE_CONFIG_H
#include "config.h"
+#endif
+
+#include "asmparser.h"
#include "gpsimprocessor.h"
#include <kdebug.h>
diff --git a/src/mechanics/CMakeLists.txt b/src/mechanics/CMakeLists.txt
new file mode 100644
index 0000000..07db34d
--- /dev/null
+++ b/src/mechanics/CMakeLists.txt
@@ -0,0 +1,25 @@
+include_directories(
+ ${CMAKE_BINARY_DIR}
+ ${CMAKE_CURRENT_BINARY_DIR}
+ ${CMAKE_CURRENT_SOURCE_DIR}
+ ${TDE_INCLUDE_DIR}
+ ${TQT_INCLUDE_DIRS}
+ ${CMAKE_SOURCE_DIR}/src
+ ${CMAKE_SOURCE_DIR}/src/drawparts
+)
+
+link_directories(
+ ${TQT_LIBRARY_DIRS}
+ ${TDE_LIB_DIR}
+)
+
+
+##### mechanics (static)
+
+tde_add_library( mechanics STATIC_PIC AUTOMOC
+
+ SOURCES
+ mechanicsitem.cpp chassiscircular2.cpp
+ mechanicssimulation.cpp mechanicsdocument.cpp
+ mechanicsgroup.cpp mechanicsview.cpp
+)
diff --git a/src/micro/CMakeLists.txt b/src/micro/CMakeLists.txt
new file mode 100644
index 0000000..61d6def
--- /dev/null
+++ b/src/micro/CMakeLists.txt
@@ -0,0 +1,23 @@
+include_directories(
+ ${CMAKE_BINARY_DIR}
+ ${CMAKE_CURRENT_BINARY_DIR}
+ ${CMAKE_CURRENT_SOURCE_DIR}
+ ${TDE_INCLUDE_DIR}
+ ${TQT_INCLUDE_DIRS}
+)
+
+link_directories(
+ ${TQT_LIBRARY_DIRS}
+ ${TDE_LIB_DIR}
+)
+
+
+##### micro (static)
+
+tde_add_library( micro STATIC_PIC AUTOMOC
+
+ SOURCES
+ microinfo.cpp picinfo.cpp picinfo16bit.cpp
+ picinfo14bit.cpp picinfo12bit.cpp
+ microlibrary.cpp micropackage.cpp asminfo.cpp
+)
diff --git a/src/microsettings.cpp b/src/microsettings.cpp
index f10ca72..2c118b6 100644
--- a/src/microsettings.cpp
+++ b/src/microsettings.cpp
@@ -333,6 +333,8 @@ PinMappingMap MicroSettings::pinMappings() const
{
return m_pinMappings;
}
+
+#include "microsettings.moc"
//END class MicroSettings
diff --git a/src/oscilloscopedata.cpp b/src/oscilloscopedata.cpp
index 9eaf2f1..8a04df4 100644
--- a/src/oscilloscopedata.cpp
+++ b/src/oscilloscopedata.cpp
@@ -166,6 +166,8 @@ void FloatingProbeData::setLowerAbsValue( double lowerAbsValue )
m_lowerAbsValue = lowerAbsValue;
emit displayAttributeChanged();
}
+
+#include "oscilloscopedata.moc"
//END class FloatingProbeData
diff --git a/src/textdocument.h b/src/textdocument.h
index 2fe79b9..ace26ab 100644
--- a/src/textdocument.h
+++ b/src/textdocument.h
@@ -11,7 +11,10 @@
#ifndef TEXTDOCUMENT_H
#define TEXTDOCUMENT_H
+#ifdef HAVE_CONFIG_H
#include "config.h"
+#endif
+
#include "document.h"
#include <tqguardedptr.h>
diff --git a/src/textview.cpp b/src/textview.cpp
index f763c23..c06c3c3 100644
--- a/src/textview.cpp
+++ b/src/textview.cpp
@@ -8,12 +8,15 @@
* (at your option) any later version. *
***************************************************************************/
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
#define protected public
#include <kxmlguiclient.h>
#undef protected
#include "asmformatter.h"
-#include "config.h"
#include "filemetainfo.h"
#include "gpsimprocessor.h"
#include "ktechlab.h"
diff --git a/src/textview.h b/src/textview.h
index fd35ea1..cfb3158 100644
--- a/src/textview.h
+++ b/src/textview.h
@@ -11,7 +11,10 @@
#ifndef TEXTVIEW_H
#define TEXTVIEW_H
+#ifdef HAVE_CONFIG_H
#include "config.h"
+#endif
+
#include "view.h"
#include <kate/view.h>
diff --git a/src/variablelabel.cpp b/src/variablelabel.cpp
index 0d0472c..ee7686e 100644
--- a/src/variablelabel.cpp
+++ b/src/variablelabel.cpp
@@ -8,7 +8,9 @@
* (at your option) any later version. *
***************************************************************************/
+#ifdef HAVE_CONFIG_H
#include "config.h"
+#endif
#ifndef NO_GPSIM
#include "gpsimprocessor.h"
diff --git a/src/variablelabel.h b/src/variablelabel.h
index 106b5ab..40ab293 100644
--- a/src/variablelabel.h
+++ b/src/variablelabel.h
@@ -8,7 +8,9 @@
* (at your option) any later version. *
***************************************************************************/
+#ifdef HAVE_CONFIG_H
#include "config.h"
+#endif
#ifndef NO_GPSIM
#ifndef VARIABLELABEL_H