summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt10
-rw-r--r--cmake/toolchain-mingw32.cmake16
-rw-r--r--navit/CMakeLists.txt8
-rw-r--r--navit/speech/espeak/CMakeLists.txt2
-rw-r--r--navit/support/espeak/CMakeLists.txt5
5 files changed, 36 insertions, 5 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 11b5cdd55..552c97da3 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -78,6 +78,10 @@ if(WIN32)
set_with_reason(speech/espeak "win32" TRUE)
set_with_reason(support/espeak "win32" TRUE)
+ # workaround for crosscompiling. need to get rid of pkg_config or
+ # change its search path
+ set_with_reason(binding/dbus "win32" FALSE)
+
# vehicle_file is broken for windows. use vehicle_wince instead
set_with_reason(vehicle/wince "win32: replace broken vehicle_file" TRUE)
set_with_reason(vehicle/file "win32: currently broken" FALSE)
@@ -85,8 +89,8 @@ if(WIN32)
# plugins currently not supported on windows
set_with_reason(USE_PLUGINS "win32: currently not supported" FALSE)
- set_with_reason(HAVE_API_WIN32_BASE 1)
- set_with_reason(HAVE_API_WIN32 1)
+ set(HAVE_API_WIN32_BASE 1)
+ set(HAVE_API_WIN32 1)
# Image stuff
set_with_reason(USE_SVG "win32: urrently not supported" TRUE)
@@ -101,6 +105,8 @@ if(WIN32)
set(LOCALE_DIR ./)
set(IMAGE_DIR xpm)
+ list(APPEND NAVIT_LIBS winmm)
+
endif()
foreach(PLUMO ${ALL_PLUGINS} ${ALL_MODULES} USE_PLUGINS USE_ROUTING BUILD_MAPTOOL USE_SVG SVG2PNG DBUS_USE_SYSTEM_BUS)
diff --git a/cmake/toolchain-mingw32.cmake b/cmake/toolchain-mingw32.cmake
new file mode 100644
index 000000000..b884771ce
--- /dev/null
+++ b/cmake/toolchain-mingw32.cmake
@@ -0,0 +1,16 @@
+SET(CMAKE_SYSTEM_NAME Windows)
+
+FIND_PROGRAM(CMAKE_C_COMPILER NAMES i686-mingw32-gcc i586-mingw32-gcc mingw32-gcc)
+FIND_PROGRAM(CMAKE_CXX_COMPILER NAMES i686-mingw32-g++ i586-mingw32-gcc mingw32-g++)
+
+EXECUTE_PROCESS(
+ COMMAND ${CMAKE_C_COMPILER} -print-sysroot
+ OUTPUT_VARIABLE CMAKE_FIND_ROOT_PATH
+)
+
+# Does not work - don't know why
+SET(ENV{PKG_CONFIG_SYSROOT_DIR} ${CMAKE_FIND_ROOT_PATH})
+
+set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
+set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
+set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
diff --git a/navit/CMakeLists.txt b/navit/CMakeLists.txt
index d7064753d..25e618b38 100644
--- a/navit/CMakeLists.txt
+++ b/navit/CMakeLists.txt
@@ -67,9 +67,11 @@ if (${HAVE_GLIB})
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
+target_link_libraries(navit_core ${MODULES_NAME} ${NAVIT_SUPPORT_LIBS} fib ${NAVIT_LIBS} m) # 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})
+if (DEFINED NAVIT_COMPILE_FLAGS)
+ set_target_properties(navit_core PROPERTIES COMPILE_FLAGS ${NAVIT_COMPILE_FLAGS})
+endif()
# Subversion revision
ADD_CUSTOM_TARGET(
@@ -98,7 +100,7 @@ ADD_CUSTOM_COMMAND(
ADD_DEPENDENCIES(navit_core version)
add_executable (navit start.c navit.xml)
-target_link_libraries (navit navit_core ${NAVIT_LIBS} m)
+target_link_libraries (navit navit_core)
set_target_properties(navit PROPERTIES COMPILE_DEFINITIONS "MODULE=${MODULE_NAME}")
add_subdirectory (xpm)
diff --git a/navit/speech/espeak/CMakeLists.txt b/navit/speech/espeak/CMakeLists.txt
new file mode 100644
index 000000000..f08e35090
--- /dev/null
+++ b/navit/speech/espeak/CMakeLists.txt
@@ -0,0 +1,2 @@
+module_add_library(speech_espeak speak.c)
+target_link_libraries(speech_espeak support_espeak)
diff --git a/navit/support/espeak/CMakeLists.txt b/navit/support/espeak/CMakeLists.txt
new file mode 100644
index 000000000..066266045
--- /dev/null
+++ b/navit/support/espeak/CMakeLists.txt
@@ -0,0 +1,5 @@
+supportlib_add_library(support_espeak compiledict.c dictionary.c intonation.c readclause.c setlengths.c
+ numbers.c synth_mbrola.c synthdata.c synthesize.c translate.c tr_languages.c voices.c wavegen.c
+ phonemelist.c klatt.c speak_init.c)
+
+install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/espeak-data DESTINATION ${SHARE_DIR})