summaryrefslogtreecommitdiff
path: root/navit
diff options
context:
space:
mode:
authorrikky <rikky@ffa7fe5e-494d-0410-b361-a75ebd5db220>2010-10-02 19:58:55 +0000
committerrikky <rikky@ffa7fe5e-494d-0410-b361-a75ebd5db220>2010-10-02 19:58:55 +0000
commitfaf8136eb0ffa70ee5d9494b4b387c0aabaac8b5 (patch)
treee2cdd914ff2b3be4c97a0d3ffb150ab13068f3d1 /navit
parentcf3d13d788278d4989fe0f0287fc224087d36f32 (diff)
downloadnavit-faf8136eb0ffa70ee5d9494b4b387c0aabaac8b5.tar.gz
Add:core:Initial support for cmake build system. This first stage partly supports windows and linux platforms.
git-svn-id: http://svn.code.sf.net/p/navit/code/trunk/navit@3589 ffa7fe5e-494d-0410-b361-a75ebd5db220
Diffstat (limited to 'navit')
-rw-r--r--navit/CMakeLists.txt111
-rw-r--r--navit/binding/dbus/CMakeLists.txt1
-rw-r--r--navit/fib-1.1/CMakeLists.txt5
-rw-r--r--navit/graphics/CMakeLists.txt11
-rw-r--r--navit/graphics/null/CMakeLists.txt1
-rw-r--r--navit/graphics/opengl/CMakeLists.txt2
-rw-r--r--navit/graphics/qt_qpainter/CMakeLists.txt10
-rw-r--r--navit/graphics/sdl/CMakeLists.txt2
-rw-r--r--navit/graphics/win32/CMakeLists.txt1
-rw-r--r--navit/gui/gtk/CMakeLists.txt2
-rw-r--r--navit/gui/internal/CMakeLists.txt1
-rw-r--r--navit/gui/qml/CMakeLists.txt14
-rw-r--r--navit/gui/win32/CMakeLists.txt2
-rw-r--r--navit/map/binfile/CMakeLists.txt1
-rw-r--r--navit/map/filter/CMakeLists.txt1
-rw-r--r--navit/map/mg/CMakeLists.txt1
-rw-r--r--navit/map/shapefile/CMakeLists.txt6
-rw-r--r--navit/map/textfile/CMakeLists.txt1
-rw-r--r--navit/maptool/CMakeLists.txt12
-rw-r--r--navit/osd/core/CMakeLists.txt1
-rw-r--r--navit/speech/cmdline/CMakeLists.txt1
-rw-r--r--navit/speech/dbus/CMakeLists.txt1
-rw-r--r--navit/speech/speech_dispatcher/CMakeLists.txt1
-rw-r--r--navit/support/ezxml/CMakeLists.txt2
-rw-r--r--navit/support/glib/CMakeLists.txt4
-rw-r--r--navit/support/libpng/CMakeLists.txt3
-rw-r--r--navit/support/win32/CMakeLists.txt3
-rw-r--r--navit/support/wordexp/CMakeLists.txt1
-rw-r--r--navit/support/zlib/CMakeLists.txt2
-rw-r--r--navit/vehicle/demo/CMakeLists.txt1
-rw-r--r--navit/vehicle/file/CMakeLists.txt3
-rw-r--r--navit/vehicle/gpsd/CMakeLists.txt2
-rw-r--r--navit/vehicle/gpsd_dbus/CMakeLists.txt2
-rw-r--r--navit/vehicle/gypsy/CMakeLists.txt2
-rw-r--r--navit/vehicle/wince/CMakeLists.txt1
-rw-r--r--navit/version.h.in2
-rw-r--r--navit/xpm/CMakeLists.txt80
37 files changed, 297 insertions, 0 deletions
diff --git a/navit/CMakeLists.txt b/navit/CMakeLists.txt
new file mode 100644
index 000000000..d477b972e
--- /dev/null
+++ b/navit/CMakeLists.txt
@@ -0,0 +1,111 @@
+include_directories( "${PROJECT_BINARY_DIR}")
+include_directories( "${CMAKE_CURRENT_SOURCE_DIR}")
+include_directories( "${CMAKE_CURRENT_BINARY_DIR}")
+include_directories( "${CMAKE_CURRENT_SOURCE_DIR}/support")
+
+message("" )
+message("Summary:\n")
+
+foreach ( PLUGIN_PATH ${ALL_PLUGINS})
+ if (${${PLUGIN_PATH}})
+ message("Enabled ${PLUGIN_PATH} ( ${${PLUGIN_PATH}_REASON} )")
+
+ include_directories( "${CMAKE_CURRENT_SOURCE_DIR}/${PLUGIN_PATH}")
+
+ string(REPLACE "/" "_" MODULE_INC ${PLUGIN_PATH})
+ list(APPEND NAVIT_SUPPORT_LIBS ${MODULE_INC})
+ else()
+ message("Disabled ${PLUGIN_PATH} ( ${${PLUGIN_PATH}_REASON} )")
+ endif()
+endforeach()
+
+foreach ( MODULE_PATH ${ALL_MODULES})
+ if (${${MODULE_PATH}})
+ message("Enabled ${MODULE_PATH} ( ${${MODULE_PATH}_REASON} )")
+
+ include_directories( "${CMAKE_CURRENT_SOURCE_DIR}/${MODULE_PATH}")
+
+ string(REPLACE "/" "_" MODULE_INC ${MODULE_PATH})
+ list(APPEND MODULES_PROTOTYPE "void\tmodule_${MODULE_INC}_init(void)\;\\n")
+ list(APPEND MODULES_FUNC "module_${MODULE_INC}_init()\;\\n")
+
+ if (NOT USE_PLUGINS)
+ list(APPEND MODULES_NAME ${MODULE_INC})
+ endif()
+ else()
+ message("Disabled ${MODULE_PATH} ( ${${MODULE_PATH}_REASON} )")
+ endif()
+endforeach()
+
+message( "")
+
+include_directories( "${CMAKE_CURRENT_SOURCE_DIR}/fib-1.1")
+
+# Add module paths
+foreach (CURRENT_MODULE ${ALL_PLUGINS} ${ALL_MODULES})
+ if (${${CURRENT_MODULE}})
+ add_subdirectory( "${CMAKE_CURRENT_SOURCE_DIR}/${CURRENT_MODULE}")
+ endif()
+endforeach()
+
+add_subdirectory (fib-1.1)
+
+# navit cre
+set(NAVIT_SRC announcement.c atom.c attr.c cache.c callback.c command.c compass.c config_.c coord.c country.c data_window.c debug.c
+ event.c file.c graphics.c gui.c item.c layout.c log.c main.c map.c
+ linguistics.c mapset.c maptype.c menu.c messages.c bookmarks.c navit.c navigation.c osd.c param.c phrase.c plugin.c popup.c
+ profile.c projection.c roadprofile.c route.c routech.c search.c speech.c start_real.c sunriset.c transform.c track.c
+ util.c vehicle.c vehicleprofile.c xmlconfig.c )
+
+if(NOT USE_PLUGINS)
+ list(APPEND NAVIT_SRC builtin.c)
+endif(NOT USE_PLUGINS)
+
+if (${HAVE_GLIB})
+ list(APPEND NAVIT_SRC event_glib.c)
+endif()
+
+add_library (navit_core ${NAVIT_SRC} )
+target_link_libraries(navit_core ${MODULES_NAME} ${NAVIT_SUPPORT_LIBS} fib) # support_glib support_zlib support_win32 support_libpng support_wordexp
+set_target_properties(navit_core PROPERTIES COMPILE_DEFINITIONS "MODULE=navit;LIBDIR=\"${CMAKE_INSTALL_PREFIX}/${LIB_DIR}\";PREFIX=\"${CMAKE_INSTALL_PREFIX}\"")
+set_target_properties(navit_core PROPERTIES COMPILE_FLAGS ${NAVIT_COMPILE_FLAGS})
+
+# Subversion revision
+ADD_CUSTOM_TARGET(
+ version
+ cd ${CMAKE_CURRENT_SOURCE_DIR} && ${CMAKE_COMMAND} -D SRC=${CMAKE_CURRENT_SOURCE_DIR}/version.h.in
+ -D DST=${CMAKE_CURRENT_BINARY_DIR}/version.h
+ -P ${PROJECT_SOURCE_DIR}/cmake/version.cmake
+)
+
+ADD_CUSTOM_COMMAND(
+ OUTPUT builtin.c
+ COMMAND echo -e \"${MODULES_PROTOTYPE}\" > ${CMAKE_CURRENT_BINARY_DIR}/builtin.c
+ COMMAND echo -e \"extern void builtin_init(void)\;\\nvoid builtin_init(void) {\" >> ${CMAKE_CURRENT_BINARY_DIR}/builtin.c
+ COMMAND echo -e \"${MODULES_FUNC}\" >> ${CMAKE_CURRENT_BINARY_DIR}/builtin.c
+ COMMAND echo -e "\"}\"" >> ${CMAKE_CURRENT_BINARY_DIR}/builtin.c
+)
+
+ADD_CUSTOM_COMMAND(
+ OUTPUT navit.xml
+ DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/navit_shipped.xml
+ COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_CURRENT_SOURCE_DIR}/navit_shipped.xml ${CMAKE_CURRENT_BINARY_DIR}/navit.xml
+)
+
+
+#configure_file (${CMAKE_CURRENT_SOURCE_DIR}/version.h.in ${CMAKE_CURRENT_BINARY_DIR}/version.h)
+ADD_DEPENDENCIES(navit_core version)
+
+add_executable (navit start.c navit.xml)
+target_link_libraries (navit navit_core ${NAVIT_LIBS} m)
+set_target_properties(navit PROPERTIES COMPILE_DEFINITIONS "MODULE=${MODULE_NAME}")
+
+add_subdirectory (xpm)
+
+install(TARGETS navit
+ DESTINATION ${BIN_DIR}
+ PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
+
+install(FILES ${CMAKE_CURRENT_BINARY_DIR}/navit.xml
+ DESTINATION ${SHARE_DIR}
+ PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
diff --git a/navit/binding/dbus/CMakeLists.txt b/navit/binding/dbus/CMakeLists.txt
new file mode 100644
index 000000000..95fbd8267
--- /dev/null
+++ b/navit/binding/dbus/CMakeLists.txt
@@ -0,0 +1 @@
+module_add_library(binding_dbus binding_dbus.c)
diff --git a/navit/fib-1.1/CMakeLists.txt b/navit/fib-1.1/CMakeLists.txt
new file mode 100644
index 000000000..01ea1167a
--- /dev/null
+++ b/navit/fib-1.1/CMakeLists.txt
@@ -0,0 +1,5 @@
+add_library(fib fib.c)
+if (USE_PLUGINS)
+ SET_TARGET_PROPERTIES( fib PROPERTIES COMPILE_FLAGS -fPIC)
+endif()
+
diff --git a/navit/graphics/CMakeLists.txt b/navit/graphics/CMakeLists.txt
new file mode 100644
index 000000000..004accfc8
--- /dev/null
+++ b/navit/graphics/CMakeLists.txt
@@ -0,0 +1,11 @@
+# Create a library called "Hello" which includes the source file "hello.cxx".
+# The extension is already found. Any number of sources could be listed here.
+
+add_subdirectory (ezxml)
+
+if (HAVE_API_WIN32_BASE)
+add_subdirectory (glib)
+add_subdirectory (win32)
+endif (HAVE_API_WIN32_BASE)
+
+add_subdirectory (zlib)
diff --git a/navit/graphics/null/CMakeLists.txt b/navit/graphics/null/CMakeLists.txt
new file mode 100644
index 000000000..f9cd65ecf
--- /dev/null
+++ b/navit/graphics/null/CMakeLists.txt
@@ -0,0 +1 @@
+module_add_library(graphics_null graphics_null.c)
diff --git a/navit/graphics/opengl/CMakeLists.txt b/navit/graphics/opengl/CMakeLists.txt
new file mode 100644
index 000000000..335d27f5f
--- /dev/null
+++ b/navit/graphics/opengl/CMakeLists.txt
@@ -0,0 +1,2 @@
+module_add_library(graphics_opengl graphics_opengl.c)
+
diff --git a/navit/graphics/qt_qpainter/CMakeLists.txt b/navit/graphics/qt_qpainter/CMakeLists.txt
new file mode 100644
index 000000000..c87bb81ac
--- /dev/null
+++ b/navit/graphics/qt_qpainter/CMakeLists.txt
@@ -0,0 +1,10 @@
+# Create a library called "Hello" which includes the source file "hello.cxx".
+# The extension is already found. Any number of sources could be listed here.
+
+add_definitions( -DMODULE=graphics_qt_qpainter )
+
+QT4_GENERATE_MOC(graphics_qt_qpainter.cpp graphics_qt_qpainter.moc)
+
+include_directories(${CMAKE_CURRENT_BINARY_DIR})
+add_library(graphics_qt_qpainter ${MODULE_BUILD_TYPE} graphics_qt_qpainter.moc graphics_qt_qpainter.cpp )
+
diff --git a/navit/graphics/sdl/CMakeLists.txt b/navit/graphics/sdl/CMakeLists.txt
new file mode 100644
index 000000000..b8cad6025
--- /dev/null
+++ b/navit/graphics/sdl/CMakeLists.txt
@@ -0,0 +1,2 @@
+module_add_library(graphics_sdl graphics_sdl.c raster.c)
+
diff --git a/navit/graphics/win32/CMakeLists.txt b/navit/graphics/win32/CMakeLists.txt
new file mode 100644
index 000000000..68013dbd5
--- /dev/null
+++ b/navit/graphics/win32/CMakeLists.txt
@@ -0,0 +1 @@
+module_add_library(graphics_win32 graphics_win32.c xpm2bmp.c)
diff --git a/navit/gui/gtk/CMakeLists.txt b/navit/gui/gtk/CMakeLists.txt
new file mode 100644
index 000000000..33b5d3cb1
--- /dev/null
+++ b/navit/gui/gtk/CMakeLists.txt
@@ -0,0 +1,2 @@
+module_add_library(gui_gtk datawindow.c destination.c gui_gtk_statusbar.c gui_gtk_action.c gui_gtk_window.c)
+
diff --git a/navit/gui/internal/CMakeLists.txt b/navit/gui/internal/CMakeLists.txt
new file mode 100644
index 000000000..4b9133cac
--- /dev/null
+++ b/navit/gui/internal/CMakeLists.txt
@@ -0,0 +1 @@
+module_add_library(gui_internal gui_internal.c)
diff --git a/navit/gui/qml/CMakeLists.txt b/navit/gui/qml/CMakeLists.txt
new file mode 100644
index 000000000..531817e44
--- /dev/null
+++ b/navit/gui/qml/CMakeLists.txt
@@ -0,0 +1,14 @@
+# Create a library called "Hello" which includes the source file "hello.cxx".
+# The extension is already found. Any number of sources could be listed here.
+
+add_definitions( -DMODULE=gui_qml )
+QT4_GENERATE_MOC(proxy.h proxy.moc)
+QT4_GENERATE_MOC(ngqpoint.h ngqpoint.moc)
+QT4_GENERATE_MOC(searchProxy.h searchProxy.moc)
+QT4_GENERATE_MOC(bookmarksProxy.h bookmarksProxy.moc)
+QT4_GENERATE_MOC(vehicleProxy.h vehicleProxy.moc)
+QT4_GENERATE_MOC(navitProxy.h navitProxy.moc)
+QT4_GENERATE_MOC(guiProxy.h guiProxy.moc)
+QT4_GENERATE_MOC(gui_qml.cpp gui_qml.moc)
+add_library(gui_qml ${MODULE_BUILD_TYPE} gui_qml.cpp proxy.moc ngqpoint.moc searchProxy.moc bookmarksProxy.moc vehicleProxy.moc navitProxy.moc guiProxy.moc gui_qml.moc)
+
diff --git a/navit/gui/win32/CMakeLists.txt b/navit/gui/win32/CMakeLists.txt
new file mode 100644
index 000000000..16b653c9f
--- /dev/null
+++ b/navit/gui/win32/CMakeLists.txt
@@ -0,0 +1,2 @@
+module_add_library(gui_win32 gui_win32.c win32_gui_destination.c win32_gui_notify.c ceglue.c)
+
diff --git a/navit/map/binfile/CMakeLists.txt b/navit/map/binfile/CMakeLists.txt
new file mode 100644
index 000000000..9b5a6cc96
--- /dev/null
+++ b/navit/map/binfile/CMakeLists.txt
@@ -0,0 +1 @@
+module_add_library(map_binfile binfile.c)
diff --git a/navit/map/filter/CMakeLists.txt b/navit/map/filter/CMakeLists.txt
new file mode 100644
index 000000000..15da3f3c6
--- /dev/null
+++ b/navit/map/filter/CMakeLists.txt
@@ -0,0 +1 @@
+module_add_library(map_filter filter.c)
diff --git a/navit/map/mg/CMakeLists.txt b/navit/map/mg/CMakeLists.txt
new file mode 100644
index 000000000..5a2dd387c
--- /dev/null
+++ b/navit/map/mg/CMakeLists.txt
@@ -0,0 +1 @@
+module_add_library(map_mg map.c block.c town.c tree.c poly.c street.c)
diff --git a/navit/map/shapefile/CMakeLists.txt b/navit/map/shapefile/CMakeLists.txt
new file mode 100644
index 000000000..7401f7e11
--- /dev/null
+++ b/navit/map/shapefile/CMakeLists.txt
@@ -0,0 +1,6 @@
+set (map_shapefile_SRC shapefile.c)
+if (NOT HAVE_SYSTEM_SHAPEFILELIB)
+ set (map_shapefile_SRC ${map_shapefile_SRC} dbfopen.c shpopen.c shptree.c)
+endif()
+
+module_add_library(map_shapefile ${map_shapefile_SRC})
diff --git a/navit/map/textfile/CMakeLists.txt b/navit/map/textfile/CMakeLists.txt
new file mode 100644
index 000000000..00ef8211c
--- /dev/null
+++ b/navit/map/textfile/CMakeLists.txt
@@ -0,0 +1 @@
+module_add_library(map_textfile textfile.c)
diff --git a/navit/maptool/CMakeLists.txt b/navit/maptool/CMakeLists.txt
new file mode 100644
index 000000000..848e2c103
--- /dev/null
+++ b/navit/maptool/CMakeLists.txt
@@ -0,0 +1,12 @@
+
+if(BUILD_MAPTOOL)
+ add_definitions( -DMODULE=maptool )
+ add_library (maptool_core boundaries.c buffer.c ch.c coastline.c geom.c itembin.c itembin_buffer.c misc.c osm.c sourcesink.c tempfile.c tile.c zip.c )
+ add_executable (maptool maptool.c)
+ target_link_libraries(maptool maptool_core navit_core ${NAVIT_LIBS} m)
+
+ install(TARGETS maptool
+ DESTINATION ${BIN_DIR}
+ PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
+
+endif()
diff --git a/navit/osd/core/CMakeLists.txt b/navit/osd/core/CMakeLists.txt
new file mode 100644
index 000000000..84231464b
--- /dev/null
+++ b/navit/osd/core/CMakeLists.txt
@@ -0,0 +1 @@
+module_add_library(osd_core osd_core.c)
diff --git a/navit/speech/cmdline/CMakeLists.txt b/navit/speech/cmdline/CMakeLists.txt
new file mode 100644
index 000000000..f8c00ad4b
--- /dev/null
+++ b/navit/speech/cmdline/CMakeLists.txt
@@ -0,0 +1 @@
+module_add_library(speech_cmdline speech_cmdline.c)
diff --git a/navit/speech/dbus/CMakeLists.txt b/navit/speech/dbus/CMakeLists.txt
new file mode 100644
index 000000000..87413018a
--- /dev/null
+++ b/navit/speech/dbus/CMakeLists.txt
@@ -0,0 +1 @@
+module_add_library(speech_dbus speech_dbus.c)
diff --git a/navit/speech/speech_dispatcher/CMakeLists.txt b/navit/speech/speech_dispatcher/CMakeLists.txt
new file mode 100644
index 000000000..897a8c088
--- /dev/null
+++ b/navit/speech/speech_dispatcher/CMakeLists.txt
@@ -0,0 +1 @@
+module_add_library(speech_speech_dispatcher speech_speech_dispatcher.c)
diff --git a/navit/support/ezxml/CMakeLists.txt b/navit/support/ezxml/CMakeLists.txt
new file mode 100644
index 000000000..77cb571fd
--- /dev/null
+++ b/navit/support/ezxml/CMakeLists.txt
@@ -0,0 +1,2 @@
+add_definitions( -DMODULE=support_ezxml -DEZXML_NOMMAP )
+add_library(support_ezxml ezxml.c ezxml_init.c )
diff --git a/navit/support/glib/CMakeLists.txt b/navit/support/glib/CMakeLists.txt
new file mode 100644
index 000000000..658cac60c
--- /dev/null
+++ b/navit/support/glib/CMakeLists.txt
@@ -0,0 +1,4 @@
+add_definitions( -DMODULE=support_glib )
+add_library(support_glib STATIC fake.c galiasdef.c gatomic.c gerror.c ghash.c
+glib_init.c glist.c gmem.c gmessages.c gprimes.c gprintf.c gslice.c
+gstrfuncs.c gstring.c gutf8.c gutils.c)
diff --git a/navit/support/libpng/CMakeLists.txt b/navit/support/libpng/CMakeLists.txt
new file mode 100644
index 000000000..cb8ea6f01
--- /dev/null
+++ b/navit/support/libpng/CMakeLists.txt
@@ -0,0 +1,3 @@
+add_definitions( -DMODULE=support_libpng )
+add_library(support_libpng png.c pngerror.c pngget.c pngmem.c pngread.c pngrio.c pngrtran.c pngrutil.c pngset.c pngtrans.c libpng_init.c)
+
diff --git a/navit/support/win32/CMakeLists.txt b/navit/support/win32/CMakeLists.txt
new file mode 100644
index 000000000..2b1db52e9
--- /dev/null
+++ b/navit/support/win32/CMakeLists.txt
@@ -0,0 +1,3 @@
+add_definitions( -DMODULE=support_win32 )
+add_library(support_win32 mmap.c win32_init.c ConvertUTF.c)
+
diff --git a/navit/support/wordexp/CMakeLists.txt b/navit/support/wordexp/CMakeLists.txt
new file mode 100644
index 000000000..650c9d1de
--- /dev/null
+++ b/navit/support/wordexp/CMakeLists.txt
@@ -0,0 +1 @@
+supportlib_add_library(support_wordexp wordexp.c wordexp_init.c glob.c)
diff --git a/navit/support/zlib/CMakeLists.txt b/navit/support/zlib/CMakeLists.txt
new file mode 100644
index 000000000..80bcffd6e
--- /dev/null
+++ b/navit/support/zlib/CMakeLists.txt
@@ -0,0 +1,2 @@
+add_definitions( -DMODULE=support_zlib )
+add_library(support_zlib adler32.c crc32.c infback.c inffast.c inflate.c inftrees.c zutil.c zlib_init.c)
diff --git a/navit/vehicle/demo/CMakeLists.txt b/navit/vehicle/demo/CMakeLists.txt
new file mode 100644
index 000000000..e7f57f902
--- /dev/null
+++ b/navit/vehicle/demo/CMakeLists.txt
@@ -0,0 +1 @@
+module_add_library(vehicle_demo vehicle_demo.c)
diff --git a/navit/vehicle/file/CMakeLists.txt b/navit/vehicle/file/CMakeLists.txt
new file mode 100644
index 000000000..ed71e92f3
--- /dev/null
+++ b/navit/vehicle/file/CMakeLists.txt
@@ -0,0 +1,3 @@
+module_add_library(vehicle_file vehicle_file.c)
+module_add_library(vehicle_pipe vehicle_pipe.c)
+module_add_library(vehicle_socket vehicle_socket.c)
diff --git a/navit/vehicle/gpsd/CMakeLists.txt b/navit/vehicle/gpsd/CMakeLists.txt
new file mode 100644
index 000000000..913bc131a
--- /dev/null
+++ b/navit/vehicle/gpsd/CMakeLists.txt
@@ -0,0 +1,2 @@
+module_add_library(vehicle_gpsd vehicle_gpsd.c)
+
diff --git a/navit/vehicle/gpsd_dbus/CMakeLists.txt b/navit/vehicle/gpsd_dbus/CMakeLists.txt
new file mode 100644
index 000000000..435a987a0
--- /dev/null
+++ b/navit/vehicle/gpsd_dbus/CMakeLists.txt
@@ -0,0 +1,2 @@
+module_add_library(vehicle_gpsd_dbus vehicle_gpsd_dbus.c)
+
diff --git a/navit/vehicle/gypsy/CMakeLists.txt b/navit/vehicle/gypsy/CMakeLists.txt
new file mode 100644
index 000000000..a57a8fb7b
--- /dev/null
+++ b/navit/vehicle/gypsy/CMakeLists.txt
@@ -0,0 +1,2 @@
+module_add_library(vehicle_gypsy vehicle_gypsy.c)
+
diff --git a/navit/vehicle/wince/CMakeLists.txt b/navit/vehicle/wince/CMakeLists.txt
new file mode 100644
index 000000000..d35904a3e
--- /dev/null
+++ b/navit/vehicle/wince/CMakeLists.txt
@@ -0,0 +1 @@
+module_add_library(vehicle_wince vehicle_wince.c)
diff --git a/navit/version.h.in b/navit/version.h.in
new file mode 100644
index 000000000..cc58ebe24
--- /dev/null
+++ b/navit/version.h.in
@@ -0,0 +1,2 @@
+#cmakedefine SVN_VERSION "@SVN_VERSION@"
+#cmakedefine NAVIT_VARIANT "@NAVIT_VARIANT@"
diff --git a/navit/xpm/CMakeLists.txt b/navit/xpm/CMakeLists.txt
new file mode 100644
index 000000000..fad65ccbc
--- /dev/null
+++ b/navit/xpm/CMakeLists.txt
@@ -0,0 +1,80 @@
+macro(convert_svg2png IMAGE_INPUT IMAGE_OUTPUT SCALE)
+ if(${IMAGE_CONVERTER} MATCHES "rsvg-convert")
+ if (${SCALE} GREATER 0)
+ set(SCALE_ARGS --width=${SCALE} --height=${SCALE})
+ endif()
+ set(COMMAND_ARGS ${SCALE_ARGS} --output ${IMAGE_OUTPUT} ${IMAGE_INPUT})
+ elseif(${IMAGE_CONVERTER} MATCHES "ksvgtopng")
+ set (NEW_SCALE ${SCALE})
+ if (${SCALE} EQUAL 0)
+ file(STRINGS ${IMAGE_INPUT} NEW_SCALE_LINE REGEX "width=\"[0-9pxt.]*\"")
+ string(REGEX REPLACE ".*width=\"([0-9]*).*\"" "\\1" NEW_SCALE ${NEW_SCALE_LINE})
+ message(STATUS "newscale='${NEW_SCALE}'")
+ endif()
+ set(COMMAND_ARGS ${NEW_SCALE} ${NEW_SCALE} ${IMAGE_INPUT} --output ${IMAGE_OUTPUT})
+ else()
+ message(FATAL_ERROR "no svg2png converter defined here.")
+ endif()
+
+ add_custom_command (
+ OUTPUT ${IMAGE_OUTPUT}
+ DEPENDS ${IMAGE_INPUT}
+ COMMAND ${IMAGE_CONVERTER} ${COMMAND_ARGS}
+ )
+endmacro()
+
+macro(add_scale_targets IMAGE_NAME)
+ foreach (CURRENT_SCALE ${ARGN})
+ convert_svg2png(
+ ${CMAKE_CURRENT_SOURCE_DIR}/${SVG}
+ ${CMAKE_CURRENT_BINARY_DIR}/${IMAGE_NAME}_${CURRENT_SCALE}_${CURRENT_SCALE}.png
+ ${CURRENT_SCALE}
+ )
+ list(APPEND IMAGE_TARGETS ${CMAKE_CURRENT_BINARY_DIR}/${IMAGE_NAME}_${CURRENT_SCALE}_${CURRENT_SCALE}.png)
+ endforeach()
+endmacro()
+
+#install(FILES desktop_icons/navit.desktop DESTINATION share/applications)
+#install(FILES desktop_icons/22x22/navit.png DESTINATION share/icons/hicolor/22x22/apps)
+#install(FILES desktop_icons/128x128/navit.png DESTINATION share/icons/hicolor/128x128/apps)
+#install(FILES bench.xpm DESTINATION )
+
+FILE(GLOB XPM_FILES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "*.xpm")
+list(APPEND IMAGE_TARGETS ${XPM_FILES})
+
+if (USE_SVG OR SVG2PNG)
+ FILE(GLOB SVG_FILES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "*.svg")
+
+ if(USE_SVG)
+ list(APPEND IMAGE_TARGETS ${SVG_FILES})
+ endif(USE_SVG)
+
+ if (SVG2PNG)
+ foreach (SVG ${SVG_FILES})
+ string(REPLACE ".svg" "" IMAGE ${SVG})
+
+ if ( DEFINED svg2png_scaling_nav AND ${IMAGE} MATCHES "^nav_")
+ add_scale_targets(${IMAGE} ${svg2png_scaling_nav})
+ elseif( DEFINED svg2png_scaling_flag AND ${IMAGE} MATCHES "^country_")
+ add_scale_targets(${IMAGE} ${svg2png_scaling_flag})
+ elseif( DEFINED svg2png_scaling)
+ add_scale_targets(${IMAGE} ${svg2png_scaling})
+ endif()
+
+ convert_svg2png (
+ "${CMAKE_CURRENT_SOURCE_DIR}/${SVG}"
+ "${CMAKE_CURRENT_BINARY_DIR}/${IMAGE}.png"
+ 0
+ )
+ list(APPEND IMAGE_TARGETS "${CMAKE_CURRENT_BINARY_DIR}/${IMAGE}.png")
+ endforeach()
+ endif(SVG2PNG)
+endif(USE_SVG OR SVG2PNG)
+
+add_custom_target(images ALL DEPENDS ${IMAGE_TARGETS})
+
+install(
+ FILES ${IMAGE_TARGETS}
+ DESTINATION ${IMAGE_DIR}
+ PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
+)