summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorgregory guy <gregory-tde@laposte.net>2020-10-12 15:43:57 +0200
committergregory guy <gregory-tde@laposte.net>2020-11-02 17:30:41 +0100
commita9c86866c380e503dd75797b5c2d129bfb622a9e (patch)
tree7f082c4dc920583aea947d773459d9d29b7b65ef
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 <gregory-tde@laposte.net>
-rw-r--r--CMakeLists.txt83
-rw-r--r--ConfigureChecks.cmake124
-rw-r--r--config.h.cmake26
-rw-r--r--doc/CMakeLists.txt34
-rw-r--r--doc/man/CMakeLists.txt7
-rw-r--r--doc/man/ktechlab.1151
-rw-r--r--doc/man/microbe.1162
-rw-r--r--icons/CMakeLists.txt6
-rw-r--r--icons/pics/CMakeLists.txt8
-rw-r--r--microbe/CMakeLists.txt31
-rw-r--r--po/CMakeLists.txt14
-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
50 files changed, 1160 insertions, 13 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
new file mode 100644
index 0000000..dd0d6c1
--- /dev/null
+++ b/CMakeLists.txt
@@ -0,0 +1,83 @@
+############################################
+# #
+# Improvements and feedbacks are welcome #
+# #
+# This file is released under GPL >= 3 #
+# #
+############################################
+
+
+cmake_minimum_required( VERSION 2.8 )
+
+
+#### general package setup
+
+project( ktechlab )
+set( VERSION R14.1.0 )
+
+
+#### include essential cmake modules
+
+include( FindPkgConfig )
+include( CheckFunctionExists )
+include( CheckSymbolExists )
+include( CheckIncludeFile )
+include( CheckIncludeFileCXX )
+include( CheckLibraryExists )
+include( CheckCSourceCompiles )
+include( CheckCXXSourceCompiles )
+
+
+#### include our cmake modules
+
+set( CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/modules" )
+include( TDEMacros )
+
+
+##### setup install paths
+
+include( TDESetupPaths )
+tde_setup_paths( )
+
+
+##### optional stuff
+
+option( WITH_ALL_OPTIONS "Enable all optional support" OFF )
+option( WITH_GCC_VISIBILITY "Enable fvisibility and fvisibility-inlines-hidden" ${WITH_ALL_OPTIONS} )
+option( WITH_GPSIM "Enable gpsim support" ${WITH_ALL_OPTIONS} )
+option( WITH_MECHANICS "Enable mechanics support" OFF )
+
+
+##### user requested modules
+
+option( BUILD_ALL "Build all" ON )
+option( BUILD_DOC "Build documentation" ${BUILD_ALL} )
+option( BUILD_TRANSLATIONS "Build translations" ${BUILD_ALL} )
+
+
+##### configure checks
+
+include( ConfigureChecks.cmake )
+
+
+###### global compiler settings
+
+add_definitions( -DHAVE_CONFIG_H -UTQT_NO_ASCII_CAST )
+
+set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${TQT_CXX_FLAGS}" )
+set( CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-undefined" )
+set( CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -Wl,--no-undefined" )
+
+
+##### directories
+
+add_subdirectory( src )
+add_subdirectory( icons )
+add_subdirectory( microbe )
+tde_conditional_add_subdirectory( BUILD_DOC doc )
+tde_conditional_add_subdirectory( BUILD_TRANSLATIONS po )
+
+
+##### write configure files
+
+configure_file( config.h.cmake config.h @ONLY )
diff --git a/ConfigureChecks.cmake b/ConfigureChecks.cmake
new file mode 100644
index 0000000..c6003b0
--- /dev/null
+++ b/ConfigureChecks.cmake
@@ -0,0 +1,124 @@
+###########################################
+# #
+# Improvements and feedback are welcome #
+# #
+# This file is released under GPL >= 3 #
+# #
+###########################################
+
+# required stuff
+find_package( TQt )
+find_package( TDE )
+
+tde_setup_architecture_flags( )
+
+include(TestBigEndian)
+test_big_endian(WORDS_BIGENDIAN)
+
+tde_setup_largefiles( )
+
+
+##### check for gcc visibility support
+
+if( WITH_GCC_VISIBILITY )
+ tde_setup_gcc_visibility( )
+endif( WITH_GCC_VISIBILITY )
+
+
+##### look for gpsim
+
+if( NOT WITH_GPSIM )
+ set( NO_GPSIM 1 )
+ else()
+ find_path( HAVE_GPSIM_INCLUDE "gpsim/cod.h" )
+ find_library( HAVE_GPSIM_LIBRARY gpsim)
+
+ if( (NOT HAVE_GPSIM_INCLUDE) OR (NOT HAVE_GPSIM_LIBRARY) )
+ tde_message_fatal( "gpsim support have been requested but was not found on your system" )
+ else()
+ set( GPSIM_INCLUDE_DIRS ${HAVE_GPSIM_INCLUDE} )
+ set( GPSIM_LIBRARIES gpsim;gpsimcli )
+
+##### glib-1.2 or glib-2.0
+
+ pkg_search_module( GLIB glib-2.0 glib )
+ message( STATUS "glib version: ${GLIB_VERSION}" )
+
+ if( NOT GLIB_FOUND )
+ tde_message_fatal( "glib is required but was not found on your system" )
+ endif()
+
+ tde_save( CMAKE_REQUIRED_INCLUDES )
+ set( CMAKE_REQUIRED_INCLUDES ${GLIB_INCLUDE_DIRS} ${GPSIM_INCLUDE_DIRS})
+
+##### check for gpsim version
+
+ check_cxx_source_compiles( "
+ #include <gpsim/interface.h>
+ #include <gpsim/gpsim_interface.h>
+ #include <gpsim/breakpoints.h>
+ #include <gpsim/gpsim_time.h>
+ void func()
+ {
+ (void)cycles;
+ (void)initialize_gpsim_core();
+ (void)load_symbol_file(0,0);
+ }
+ int main()
+ {
+ return 0;
+ } "
+ GPSIM_0_21_4
+ )
+
+ check_cxx_source_compiles( "
+ #include <gpsim/interface.h>
+ #include <gpsim/gpsim_interface.h>
+ #include <gpsim/breakpoints.h>
+ #include <gpsim/gpsim_time.h>
+ #include <gpsim/symbol.h>
+ #include <gpsim/program_files.h>
+ void func()
+ {
+ (void)cycles;
+ (void)initialize_gpsim_core();
+ }
+ int main()
+ {
+ return 0;
+ } "
+ GPSIM_0_21_11
+ )
+
+ check_cxx_source_compiles( "
+ #include <gpsim/ValueCollections.h>
+ int main()
+ {
+ return 0;
+ } "
+ GPSIM_0_21_12
+ )
+
+ check_cxx_source_compiles( "
+ #include <gpsim/pic-processor.h>
+ void func()
+ {
+ pic_processor *Processor;
+ sizeof(Processor->Wreg);
+ }
+ int main()
+ {
+ return 0;
+ } "
+ GPSIM_0_27_0
+ )
+ tde_restore( CMAKE_REQUIRED_INCLUDES )
+ endif((NOT HAVE_GPSIM_INCLUDE) OR (NOT HAVE_GPSIM_LIBRARY))
+endif( NOT WITH_GPSIM )
+
+
+##### mechanics
+
+if( WITH_MECHANICS )
+ set( MECHANICS 1 )
+endif()
diff --git a/config.h.cmake b/config.h.cmake
new file mode 100644
index 0000000..5a37c00
--- /dev/null
+++ b/config.h.cmake
@@ -0,0 +1,26 @@
+#define VERSION "@VERSION@"
+
+// Defined if you have fvisibility and fvisibility-inlines-hidden support.
+#cmakedefine __KDE_HAVE_GCC_VISIBILITY 1
+
+/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
+ significant byte first (like Motorola and SPARC, unlike Intel). */
+#cmakedefine WORDS_BIGENDIAN @WORDS_BIGENDIAN@
+
+/* build with gpsim-0.21.4 support */
+#cmakedefine GPSIM_0_21_4 1
+
+/* build with gpsim-0.21.11 support */
+#cmakedefine GPSIM_0_21_11 1
+
+/* build with gpsim-0.21.12 support */
+#cmakedefine GPSIM_0_21_12 1
+
+/* build with gpsim-0.27 support */
+#cmakedefine GPSIM_0_27_0 1
+
+/* build without gpsim support */
+#cmakedefine NO_GPSIM 1
+
+/* build with mechanics support */
+#cmakedefine MECHANICS 1
diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt
new file mode 100644
index 0000000..f6eec15
--- /dev/null
+++ b/doc/CMakeLists.txt
@@ -0,0 +1,34 @@
+file( GLOB _dirs RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} * )
+list( REMOVE_ITEM _dirs html man )
+
+string( REGEX REPLACE "[ \r\n\t]+" ";" _linguas "$ENV{LINGUAS}" )
+
+foreach( _dir IN LISTS _dirs )
+ if( IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/${_dir}
+ AND ( "${_dir}" STREQUAL "en" OR
+ "${_linguas}" MATCHES "^;*$" OR
+ ";${_linguas};" MATCHES ";${_dir};" ))
+ file( GLOB _doc_files RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}/${_dir} ${_dir}/*.docbook )
+ if( _doc_files )
+ list( FIND _doc_files "index.docbook" _find_index )
+ if( -1 EQUAL _find_index )
+ set( _noindex "NOINDEX" )
+ else()
+ unset( _noindex )
+ endif()
+ tde_create_handbook(
+ SOURCE_BASEDIR ${_dir}
+ ${_noindex}
+ LANG ${_dir}
+ DESTINATION ${PROJECT_NAME}
+ )
+ endif()
+ endif()
+endforeach()
+
+if( EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/html/CMakeLists.txt )
+ add_subdirectory( html )
+endif()
+if( EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/man/CMakeLists.txt )
+ add_subdirectory( man )
+endif()
diff --git a/doc/man/CMakeLists.txt b/doc/man/CMakeLists.txt
new file mode 100644
index 0000000..5c8c2e4
--- /dev/null
+++ b/doc/man/CMakeLists.txt
@@ -0,0 +1,7 @@
+##### man pages
+
+INSTALL(
+ FILES ${PROJECT_NAME}.1 microbe.1
+ DESTINATION ${MAN_INSTALL_DIR}/man1
+ COMPONENT doc
+)
diff --git a/doc/man/ktechlab.1 b/doc/man/ktechlab.1
new file mode 100644
index 0000000..bb49c1d
--- /dev/null
+++ b/doc/man/ktechlab.1
@@ -0,0 +1,151 @@
+.\" This file was generated by kdemangen.pl
+.TH KTECHLAB 1 "Jan 2006" "Trinity Desktop Environment" "An IDE for microcontrollers and electronics"
+.SH NAME
+ktechlab
+\- An IDE for microcontrollers and electronics
+.SH SYNOPSIS
+ktechlab [Qt\-options] [TDE\-options] [URL]
+.SH DESCRIPTION
+An IDE for microcontrollers and electronics
+.SH OPTIONS
+.SS
+.SS Arguments:
+.TP
+.B URL
+Document to open.
+.SS Generic options:
+.TP
+.B \-\-help
+Show help about options
+.TP
+.B \-\-help\-qt
+Show Qt specific options
+.TP
+.B \-\-help\-tde
+Show TDE specific options
+.TP
+.B \-\-help\-all
+Show all options
+.TP
+.B \-\-author
+Show author information
+.TP
+.B \-v, \-\-version
+Show version information
+.TP
+.B \-\-license
+Show license information
+.TP
+.B \-\-
+End of options
+.SS
+.SS TDE options:
+.TP
+.B \-\-caption <caption>
+Use 'caption' as name in the titlebar
+.TP
+.B \-\-icon <icon>
+Use 'icon' as the application icon
+.TP
+.B \-\-miniicon <icon>
+Use 'icon' as the icon in the titlebar
+.TP
+.B \-\-config <filename>
+Use alternative configuration file
+.TP
+.B \-\-dcopserver <server>
+Use the DCOP Server specified by 'server'
+.TP
+.B \-\-nocrashhandler
+Disable crash handler, to get core dumps
+.TP
+.B \-\-waitforwm
+Waits for a WM_NET compatible windowmanager
+.TP
+.B \-\-style <style>
+sets the application GUI style
+.TP
+.B \-\-geometry <geometry>
+sets the client geometry of the main widget - see man X for the argument format
+.SS
+.SS Qt options:
+.TP
+.B \-\-display <displayname>
+Use the X-server display 'displayname'
+.TP
+.B \-\-session <sessionId>
+Restore the application for the given 'sessionId'
+.TP
+.B \-\-cmap
+Causes the application to install a private color
+map on an 8-bit display
+.TP
+.B \-\-ncols <count>
+Limits the number of colors allocated in the color
+cube on an 8-bit display, if the application is
+using the QApplication::ManyColor color
+specification
+.TP
+.B \-\-nograb
+tells Qt to never grab the mouse or the keyboard
+.TP
+.B \-\-dograb
+running under a debugger can cause an implicit
+-nograb, use -dograb to override
+.TP
+.B \-\-sync
+switches to synchronous mode for debugging
+.TP
+.B \-\-fn, \-\-font <fontname>
+defines the application font
+.TP
+.B \-\-bg, \-\-background <color>
+sets the default background color and an
+application palette (light and dark shades are
+calculated)
+.TP
+.B \-\-fg, \-\-foreground <color>
+sets the default foreground color
+.TP
+.B \-\-btn, \-\-button <color>
+sets the default button color
+.TP
+.B \-\-name <name>
+sets the application name
+.TP
+.B \-\-title <title>
+sets the application title (caption)
+.TP
+.B \-\-visual TrueColor
+forces the application to use a TrueColor visual on
+an 8-bit display
+.TP
+.B \-\-inputstyle <inputstyle>
+sets XIM (X Input Method) input style. Possible
+values are onthespot, overthespot, offthespot and
+root
+.TP
+.B \-\-im <XIM server>
+set XIM server
+.TP
+.B \-\-noxim
+disable XIM
+.TP
+.B \-\-reverse
+mirrors the whole layout of widgets
+.SS
+
+.SH SEE ALSO
+Full user documentation is available through the TDE Help Center. You can also enter the URL
+.BR help:/ktechlab/
+directly into konqueror or you can run
+.BR "`khelpcenter help:/ktechlab/'"
+from the command-line.
+.br
+.SH AUTHORS
+.nf
+David Saxton <david@bluehaze.org>
+.br
+Daniel Clarke <daniel.jc@gmail.com>
+.br
+
diff --git a/doc/man/microbe.1 b/doc/man/microbe.1
new file mode 100644
index 0000000..bbe54c3
--- /dev/null
+++ b/doc/man/microbe.1
@@ -0,0 +1,162 @@
+.\" This file was generated by kdemangen.pl
+.TH MICROBE 1 "Jan 2006" "Trinity Desktop Environment" "The Microbe Compiler"
+.SH NAME
+microbe
+\- The Microbe Compiler
+.SH SYNOPSIS
+microbe [Qt\-options] [TDE\-options] [options] [Input URL] [Output URL]
+.SH DESCRIPTION
+
+.SH OPTIONS
+.SS
+.SS Arguments:
+.TP
+.B Input
+URL Input filename
+.TP
+.B Output
+URL Output filename
+.SS Options:
+.TP
+.B \-\-show\-source
+Show source code lines in assembly output
+.TP
+.B \-\-nooptimize
+Do not attempt optimization of generated instructions.
+.SS
+.SS Generic options:
+.TP
+.B \-\-help
+Show help about options
+.TP
+.B \-\-help\-qt
+Show Qt specific options
+.TP
+.B \-\-help\-tde
+Show TDE specific options
+.TP
+.B \-\-help\-all
+Show all options
+.TP
+.B \-\-author
+Show author information
+.TP
+.B \-v, \-\-version
+Show version information
+.TP
+.B \-\-license
+Show license information
+.TP
+.B \-\-
+End of options
+.SS
+.SS TDE options:
+.TP
+.B \-\-caption <caption>
+Use 'caption' as name in the titlebar
+.TP
+.B \-\-icon <icon>
+Use 'icon' as the application icon
+.TP
+.B \-\-miniicon <icon>
+Use 'icon' as the icon in the titlebar
+.TP
+.B \-\-config <filename>
+Use alternative configuration file
+.TP
+.B \-\-dcopserver <server>
+Use the DCOP Server specified by 'server'
+.TP
+.B \-\-nocrashhandler
+Disable crash handler, to get core dumps
+.TP
+.B \-\-waitforwm
+Waits for a WM_NET compatible windowmanager
+.TP
+.B \-\-style <style>
+sets the application GUI style
+.TP
+.B \-\-geometry <geometry>
+sets the client geometry of the main widget - see man X for the argument format
+.SS
+.SS Qt options:
+.TP
+.B \-\-display <displayname>
+Use the X-server display 'displayname'
+.TP
+.B \-\-session <sessionId>
+Restore the application for the given 'sessionId'
+.TP
+.B \-\-cmap
+Causes the application to install a private color
+map on an 8-bit display
+.TP
+.B \-\-ncols <count>
+Limits the number of colors allocated in the color
+cube on an 8-bit display, if the application is
+using the QApplication::ManyColor color
+specification
+.TP
+.B \-\-nograb
+tells Qt to never grab the mouse or the keyboard
+.TP
+.B \-\-dograb
+running under a debugger can cause an implicit
+-nograb, use -dograb to override
+.TP
+.B \-\-sync
+switches to synchronous mode for debugging
+.TP
+.B \-\-fn, \-\-font <fontname>
+defines the application font
+.TP
+.B \-\-bg, \-\-background <color>
+sets the default background color and an
+application palette (light and dark shades are
+calculated)
+.TP
+.B \-\-fg, \-\-foreground <color>
+sets the default foreground color
+.TP
+.B \-\-btn, \-\-button <color>
+sets the default button color
+.TP
+.B \-\-name <name>
+sets the application name
+.TP
+.B \-\-title <title>
+sets the application title (caption)
+.TP
+.B \-\-visual TrueColor
+forces the application to use a TrueColor visual on
+an 8-bit display
+.TP
+.B \-\-inputstyle <inputstyle>
+sets XIM (X Input Method) input style. Possible
+values are onthespot, overthespot, offthespot and
+root
+.TP
+.B \-\-im <XIM server>
+set XIM server
+.TP
+.B \-\-noxim
+disable XIM
+.TP
+.B \-\-reverse
+mirrors the whole layout of widgets
+.SS
+
+.SH SEE ALSO
+Full user documentation is available through the TDE Help Center. You can also enter the URL
+.BR help:/microbe/
+directly into konqueror or you can run
+.BR "`khelpcenter help:/microbe/'"
+from the command-line.
+.br
+.SH AUTHORS
+.nf
+Daniel Clarke <daniel.jc@gmail.com>
+.br
+David Saxton <david@bluehaze.org>
+.br
+
diff --git a/icons/CMakeLists.txt b/icons/CMakeLists.txt
new file mode 100644
index 0000000..dd774cc
--- /dev/null
+++ b/icons/CMakeLists.txt
@@ -0,0 +1,6 @@
+add_subdirectory( pics )
+
+
+##### icons hicolor
+
+tde_install_icons()
diff --git a/icons/pics/CMakeLists.txt b/icons/pics/CMakeLists.txt
new file mode 100644
index 0000000..4c8f6f8
--- /dev/null
+++ b/icons/pics/CMakeLists.txt
@@ -0,0 +1,8 @@
+##### icons
+
+file( GLOB _pics RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.png )
+
+install(
+ FILES ${_pics}
+ DESTINATION ${DATA_INSTALL_DIR}/${PROJECT_NAME}/icons
+)
diff --git a/microbe/CMakeLists.txt b/microbe/CMakeLists.txt
new file mode 100644
index 0000000..4e8883a
--- /dev/null
+++ b/microbe/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}
+)
+
+link_directories(
+ ${TQT_LIBRARY_DIRS}
+ ${TDE_LIB_DIR}
+)
+
+
+##### microbe (executable)
+
+tde_add_executable( microbe AUTOMOC
+
+ SOURCES
+ btreebase.cpp btreenode.cpp main.cpp
+ traverser.cpp expression.cpp pic14.cpp
+ variable.cpp optimizer.cpp instruction.cpp
+ microbe.cpp parser.cpp
+ LINK
+ tdecore-shared
+ tdeui-shared
+ tdeio-shared
+
+ DESTINATION ${BIN_INSTALL_DIR}
+)
diff --git a/po/CMakeLists.txt b/po/CMakeLists.txt
new file mode 100644
index 0000000..75c89f8
--- /dev/null
+++ b/po/CMakeLists.txt
@@ -0,0 +1,14 @@
+file( GLOB_RECURSE po_files RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.po )
+string( REGEX REPLACE "[ \r\n\t]+" ";" _linguas "$ENV{LINGUAS}" )
+
+foreach( _po ${po_files} )
+ get_filename_component( _lang ${_po} NAME_WE )
+ if( "${_linguas}" MATCHES "^;*$" OR ";${_linguas};" MATCHES ";${_lang};" )
+ if( "${_po}" MATCHES "^([^/]*)/.*" )
+ string( REGEX REPLACE "^([^/]*)/.*" "\\1" _component "${_po}" )
+ else( )
+ set( _component "${PROJECT_NAME}" )
+ endif( )
+ tde_create_translation( FILES ${_po} LANG ${_lang} OUTPUT_NAME ${_component} )
+ endif( )
+endforeach( )
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