summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--navit/CMakeLists.txt2
-rw-r--r--navit/main.c3
2 files changed, 4 insertions, 1 deletions
diff --git a/navit/CMakeLists.txt b/navit/CMakeLists.txt
index 1234bd0cb..5f7ee3cd7 100644
--- a/navit/CMakeLists.txt
+++ b/navit/CMakeLists.txt
@@ -3,6 +3,8 @@ include_directories( "${PROJECT_SOURCE_DIR}")
include_directories( "${CMAKE_CURRENT_SOURCE_DIR}")
include_directories( "${CMAKE_CURRENT_BINARY_DIR}")
include_directories( "${CMAKE_CURRENT_SOURCE_DIR}/support")
+file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/THIS_IS_THE_NAVIT_WORKING_DIR "\r\nThis File should never appear on binary distributions\r\n" )
+file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/THIS_IS_THE_NAVIT_WORKING_DIR "\r\nOnly Devs should ever see this file" )
# navit core
set(NAVIT_SRC announcement.c atom.c attr.c cache.c callback.c command.c config_.c coord.c country.c data_window.c debug.c
diff --git a/navit/main.c b/navit/main.c
index 84ec577aa..0faf44485 100644
--- a/navit/main.c
+++ b/navit/main.c
@@ -355,7 +355,8 @@ void main_init(const char *program) {
setlocale(LC_NUMERIC,"C");
#endif
#if !defined _WIN32 && !defined _WIN32_WCE
- if (file_exists("navit.c") || file_exists("navit.o") || file_exists("navit.lo") || file_exists("version.h")) {
+ if (file_exists("navit.c") || file_exists("navit.o") || file_exists("navit.lo")
+ || file_exists("THIS_IS_THE_NAVIT_WORKING_DIR")) {
char buffer[PATH_MAX];
printf("%s",_("Running from source directory\n"));
if(getcwd(buffer, PATH_MAX)==NULL) { /*libc of navit returns "dummy" */