#13795: Initial commit for sflphone-android

includes: libexpat libyaml libdbus-c++ commoncpp ccrtp
          libdbus (from android-4.0.4 sources)

TODO:
- git ignores "/jni/sflphone", sflphone repo should be cloned.
- sflphone-android only needs daemon directory. Ideally it should be possible
to clone it without cloning the whole sflphone project.
into sfl-android (commit 6a0fa7a "#13961: Fix cipher handling" has been used here)
- add pjsip-android project as a git submodule
- sflphone-android needs pjsip android project. Ideally daemon git repository
should not embed pjsip. Instead pjsip should be clone from official repositories.

Considering this, structure should have three distincts git repos:

sflphone-android/.git
sflphone-android/jni/ccrtp-1.8.0-android
sflphone-android/jni/commoncpp2-1.8.1-android
sflphone-android/jni/dbus
sflphone-android/jni/libdbus-c++-0.9.0-android
sflphone-android/jni/libexpat
sflphone-android/jni/libyaml

sflphone-android/jni/sflphone-daemon/.git
sflphone-android/jni/sflphone-daemon/src/audio
sflphone-android/jni/sflphone-daemon/src/config
sflphone-android/jni/sflphone-daemon/src/dbus
sflphone-android/jni/sflphone-daemon/src/history
sflphone-android/jni/sflphone-daemon/src/hooks
sflphone-android/jni/sflphone-daemon/src/iax
sflphone-android/jni/sflphone-daemon/src/sip
sflphone-android/jni/sflphone-daemon/src/video

sflphone-android/jni/pjsip-android/.git

Signed-off-by: Emeric Vigier <emeric.vigier@savoirfairelinux.com>
diff --git a/jni/dbus/cmake/modules/CPackInstallConfig.cmake b/jni/dbus/cmake/modules/CPackInstallConfig.cmake
new file mode 100644
index 0000000..f8073a2
--- /dev/null
+++ b/jni/dbus/cmake/modules/CPackInstallConfig.cmake
@@ -0,0 +1,44 @@
+
+if (DBUS_INSTALL_SYSTEM_LIBS)
+	if (MINGW)
+		if (DBUS_USE_EXPAT)
+			# expat
+			install_files(/bin FILES ${LIBEXPAT_LIBRARIES})	
+		else (DBUS_USE_EXPAT)
+			# xml2
+			install_files(/bin FILES ${LIBXML2_LIBRARIES})	
+			install_files(/bin FILES ${LIBICONV_LIBRARIES})	
+		endif (DBUS_USE_EXPAT)
+	else (MINGW)
+		INCLUDE(InstallRequiredSystemLibraries)
+	endif (MINGW)
+endif (DBUS_INSTALL_SYSTEM_LIBS)
+
+SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "D-BUS For Windows")
+SET(CPACK_PACKAGE_VENDOR "D-BUS Windows Team")
+SET(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_SOURCE_DIR}/../README")
+SET(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_SOURCE_DIR}/../COPYING")
+# duplicated from VERSION
+SET(CPACK_PACKAGE_VERSION_MAJOR ${VERSION_MAJOR})
+SET(CPACK_PACKAGE_VERSION_MINOR ${VERSION_MINOR})
+SET(CPACK_PACKAGE_VERSION_PATCH ${VERSION_PATCH})
+#SET(CPACK_PACKAGE_INSTALL_DIRECTORY "dbus ${CMake_VERSION_MAJOR}.${CMake_VERSION_MINOR}")
+SET(CPACK_PACKAGE_INSTALL_DIRECTORY "dbus")
+IF(WIN32 AND NOT UNIX)
+  SET(CPACK_GENERATOR NSIS ZIP)     # can be NSIS, STGZ, TBZ2, TGZ, TZ and ZIP
+  SET(CPACK_NSIS_COMPRESSOR "/SOLID lzma")
+  # There is a bug in NSI that does not handle full unix paths properly. Make
+  # sure there is at least one set of four (4) backlasshes.
+# SET(CPACK_PACKAGE_ICON "${CMake_SOURCE_DIR}/Utilities/Release\\\\InstallIcon.bmp")
+  SET(CPACK_NSIS_INSTALLED_ICON_NAME "bin\\\\dbus-launch.bat")
+  SET(CPACK_NSIS_DISPLAY_NAME "D-Bus for Windows")
+  SET(CPACK_NSIS_HELP_LINK "http:\\\\\\\\sourceforge.net/projects/windbus")
+  SET(CPACK_NSIS_URL_INFO_ABOUT "http:\\\\\\\\sourceforge.net/projects/windbus")
+  SET(CPACK_NSIS_CONTACT "me@my-personal-home-page.com")
+  SET(CPACK_NSIS_MODIFY_PATH ON)
+ELSE(WIN32 AND NOT UNIX)
+  SET(CPACK_STRIP_FILES "bin/MyExecutable")
+  SET(CPACK_SOURCE_STRIP_FILES "")
+ENDIF(WIN32 AND NOT UNIX)
+SET(CPACK_PACKAGE_EXECUTABLES "dbus-launch" "D-Bus Daemon")
+INCLUDE(CPack)
diff --git a/jni/dbus/cmake/modules/CheckForAbstractSockets.c b/jni/dbus/cmake/modules/CheckForAbstractSockets.c
new file mode 100644
index 0000000..062b846
--- /dev/null
+++ b/jni/dbus/cmake/modules/CheckForAbstractSockets.c
@@ -0,0 +1,33 @@
+#include <stdlib.h>
+#include <string.h>
+#include <stdio.h>
+#include <sys/socket.h>
+#include <sys/un.h>
+#include <errno.h>
+
+int main() {
+  int listen_fd;
+  struct sockaddr_un addr;
+
+  listen_fd = socket (PF_UNIX, SOCK_STREAM, 0);
+
+  if (listen_fd < 0)
+    {
+      fprintf (stderr, "socket() failed: %s\n", strerror (errno));
+      exit (1);
+    }
+
+  memset (&addr, '\0', sizeof (addr));
+  addr.sun_family = AF_UNIX;
+  strcpy (addr.sun_path, "X/tmp/dbus-fake-socket-path-used-in-configure-test");
+  addr.sun_path[0] = '\0'; /* this is what makes it abstract */
+
+  if (bind (listen_fd, (struct sockaddr*) &addr, SUN_LEN (&addr)) < 0)
+    {
+      fprintf (stderr, "Abstract socket namespace bind() failed: %s\n",
+                strerror (errno));
+      exit (1);
+    }
+  else
+    exit (0);
+}
\ No newline at end of file
diff --git a/jni/dbus/cmake/modules/CheckPrototypeExists.cmake b/jni/dbus/cmake/modules/CheckPrototypeExists.cmake
new file mode 100644
index 0000000..da319f1
--- /dev/null
+++ b/jni/dbus/cmake/modules/CheckPrototypeExists.cmake
@@ -0,0 +1,35 @@
+# - Check if the prototype for a function exists.
+# CHECK_PROTOTYPE_EXISTS (FUNCTION HEADER VARIABLE)
+#
+#  FUNCTION - the name of the function you are looking for
+#  HEADER - the header(s) where the prototype should be declared
+#  VARIABLE - variable to store the result
+#
+# The following variables may be set before calling this macro to
+# modify the way the check is run:
+#
+#  CMAKE_REQUIRED_FLAGS = string of compile command line flags
+#  CMAKE_REQUIRED_DEFINITIONS = list of macros to define (-DFOO=bar)
+#  CMAKE_REQUIRED_INCLUDES = list of include directories
+
+INCLUDE(CheckCXXSourceCompiles)
+
+MACRO (CHECK_PROTOTYPE_EXISTS _SYMBOL _HEADER _RESULT)
+   SET(_INCLUDE_FILES)
+   FOREACH (it ${_HEADER})
+      SET(_INCLUDE_FILES "${_INCLUDE_FILES}#include <${it}>\n")
+   ENDFOREACH (it)
+
+   SET(_CHECK_PROTO_EXISTS_SOURCE_CODE "
+${_INCLUDE_FILES}
+int main()
+{
+#ifndef ${_SYMBOL}
+   int i = sizeof(&${_SYMBOL});
+#endif
+  return 0;
+}
+")
+   CHECK_CXX_SOURCE_COMPILES("${_CHECK_PROTO_EXISTS_SOURCE_CODE}" ${_RESULT})
+ENDMACRO (CHECK_PROTOTYPE_EXISTS _SYMBOL _HEADER _RESULT)
+
diff --git a/jni/dbus/cmake/modules/CheckStructMember.cmake b/jni/dbus/cmake/modules/CheckStructMember.cmake
new file mode 100644
index 0000000..fd5d346
--- /dev/null
+++ b/jni/dbus/cmake/modules/CheckStructMember.cmake
@@ -0,0 +1,36 @@
+# - Check if the given struct or class has the specified member variable
+# CHECK_STRUCT_MEMBER (STRUCT MEMBER HEADER VARIABLE)
+#
+#  STRUCT - the name of the struct or class you are interested in
+#  MEMBER - the member which existence you want to check
+#  HEADER - the header(s) where the prototype should be declared
+#  VARIABLE - variable to store the result
+#
+# The following variables may be set before calling this macro to
+# modify the way the check is run:
+#
+#  CMAKE_REQUIRED_FLAGS = string of compile command line flags
+#  CMAKE_REQUIRED_DEFINITIONS = list of macros to define (-DFOO=bar)
+#  CMAKE_REQUIRED_INCLUDES = list of include directories
+
+INCLUDE(CheckCXXSourceCompiles)
+
+MACRO (CHECK_STRUCT_MEMBER _STRUCT _MEMBER _HEADER _RESULT)
+   SET(_INCLUDE_FILES)
+   FOREACH (it ${_HEADER})
+      SET(_INCLUDE_FILES "${_INCLUDE_FILES}#include <${it}>\n")
+   ENDFOREACH (it)
+
+   SET(_CHECK_STRUCT_MEMBER_SOURCE_CODE "
+${_INCLUDE_FILES}
+int main()
+{
+   ${_STRUCT}* tmp;
+   tmp->${_MEMBER};
+  return 0;
+}
+")
+   CHECK_CXX_SOURCE_COMPILES("${_CHECK_STRUCT_MEMBER_SOURCE_CODE}" ${_RESULT})
+
+ENDMACRO (CHECK_STRUCT_MEMBER)
+
diff --git a/jni/dbus/cmake/modules/FindDoxygen.cmake b/jni/dbus/cmake/modules/FindDoxygen.cmake
new file mode 100644
index 0000000..1767901
--- /dev/null
+++ b/jni/dbus/cmake/modules/FindDoxygen.cmake
@@ -0,0 +1,3 @@
+
+find_program(DOXYGEN_EXECUTABLE NAMES doxygen DOC "doxygen executable")
+mark_as_advanced(DOXYGEN_EXECUTABLE)
diff --git a/jni/dbus/cmake/modules/FindGLIB.cmake b/jni/dbus/cmake/modules/FindGLIB.cmake
new file mode 100644
index 0000000..1fdaee9
--- /dev/null
+++ b/jni/dbus/cmake/modules/FindGLIB.cmake
@@ -0,0 +1,42 @@
+# - Try to find the GLIB library
+# Once done this will define
+#
+#  GLIB_FOUND - system has GLIB
+#  GLIB_INCLUDES - the GLIB include directories
+#  GLIB_LIBRARIES - The libraries needed to use GLIB
+
+if (WIN32)
+
+INCLUDE(MacroGetenvWinPath)
+
+MACRO_GETENV_WIN_PATH(_program_FILES_DIR PROGRAMFILES)
+
+FIND_PATH(GLIB_INCLUDE_DIR glib.h
+   ${_program_FILES_DIR}/glib/include/glib-2.0
+)
+
+
+# search for GLIB in the default install directory for applications (default of (n)make install)
+FIND_LIBRARY(GLIB_LIBRARY NAMES glib-2.0
+   PATHS
+   ${_program_FILES_DIR}/glib/lib
+)
+
+if (GLIB_LIBRARY AND GLIB_INCLUDE_DIR)
+   set(GLIB_FOUND TRUE)
+   set(CMAKE_INCLUDE_PATH ${CMAKE_INCLUDE_PATH} ${GLIB_INCLUDES})
+   set(CMAKE_LIBRARY_PATH ${CMAKE_LIBRARY_PATH} ${GLIB_LIBRARIES})
+   
+endif (GLIB_LIBRARY AND GLIB_INCLUDE_DIR)
+
+if (GLIB_FOUND)
+   if (NOT GLIB_FIND_QUIETLY)
+      message(STATUS "Found GLIB: ${GLIB_LIBRARY}")
+   endif (NOT GLIB_FIND_QUIETLY)
+else (GLIB_FOUND)
+   if (GLIB_FIND_REQUIRED)
+      message(FATAL_ERROR "Could NOT find GLIB library")
+   endif (GLIB_FIND_REQUIRED)
+endif (GLIB_FOUND)
+
+endif (WIN32)
diff --git a/jni/dbus/cmake/modules/FindLibExpat.cmake b/jni/dbus/cmake/modules/FindLibExpat.cmake
new file mode 100644
index 0000000..a07c8de
--- /dev/null
+++ b/jni/dbus/cmake/modules/FindLibExpat.cmake
@@ -0,0 +1,61 @@
+# - Try to find LIBEXPAT
+# Once done this will define
+#
+#  LIBEXPAT_FOUND - system has LIBEXPAT
+#  LIBEXPAT_INCLUDE_DIR - the LIBEXPAT include directory
+#  LIBEXPAT_LIBRARIES - the libraries needed to use LIBEXPAT
+#  LIBEXPAT_DEFINITIONS - Compiler switches required for using LIBEXPAT
+
+if (LIBEXPAT_INCLUDE_DIR AND LIBEXPAT_LIBRARIES)
+
+    # in cache already
+    SET(LIBEXPAT_FOUND TRUE)
+
+else (LIBEXPAT_INCLUDE_DIR AND LIBEXPAT_LIBRARIES)
+
+    IF (WIN32)
+		file(TO_CMAKE_PATH "$ENV{PROGRAMFILES}" _progFiles)
+		find_FILE(LIBEXPAT_DIR expat Source/lib/expat.h
+   			PATHS
+   			"${_progFiles}"
+		)
+        if (LIBEXPAT_DIR)
+            set (_LIBEXPATIncDir  ${LIBEXPAT_DIR}/Source/lib)
+            set (_LIBEXPATLinkDir ${LIBEXPAT_DIR}/libs)
+        endif (LIBEXPAT_DIR)
+    ELSE (WIN32)
+        # use pkg-config to get the directories and then use these values
+        # in the FIND_PATH() and FIND_LIBRARY() calls
+        INCLUDE(UsePkgConfig)
+        PKGCONFIG(LIBEXPAT-2.0 _LIBEXPATIncDir _LIBEXPATLinkDir _LIBEXPATLinkFlags _LiIconvCflags)
+        SET(LIBEXPAT_DEFINITIONS ${_LIBEXPATCflags})
+    ENDIF (WIN32)
+
+    FIND_PATH(LIBEXPAT_INCLUDE_DIR expat.h
+      PATHS
+     ${_LIBEXPATIncDir}
+      PATH_SUFFIXES LIBEXPAT
+    )
+
+    FIND_LIBRARY(LIBEXPAT_LIBRARIES NAMES expat libexpat
+      PATHS
+      ${_LIBEXPATLinkDir}
+    )
+
+    if (LIBEXPAT_INCLUDE_DIR AND LIBEXPAT_LIBRARIES)
+       set(LIBEXPAT_FOUND TRUE)
+    endif (LIBEXPAT_INCLUDE_DIR AND LIBEXPAT_LIBRARIES)
+
+    if (LIBEXPAT_FOUND)
+      if (NOT LIBEXPAT_FIND_QUIETLY)
+        message(STATUS "Found libexpat: ${LIBEXPAT_LIBRARIES}")
+      endif (NOT LIBEXPAT_FIND_QUIETLY)
+    else (LIBEXPAT_FOUND)
+      if (LIBEXPAT_FIND_REQUIRED)
+        message(SEND_ERROR "Could NOT find libexpat")
+      endif (LIBEXPAT_FIND_REQUIRED)
+    endif (LIBEXPAT_FOUND)
+
+    MARK_AS_ADVANCED(LIBEXPAT_INCLUDE_DIR LIBEXPAT_LIBRARIES)
+
+endif (LIBEXPAT_INCLUDE_DIR AND LIBEXPAT_LIBRARIES)
diff --git a/jni/dbus/cmake/modules/FindLibIconv.cmake b/jni/dbus/cmake/modules/FindLibIconv.cmake
new file mode 100644
index 0000000..dac6344
--- /dev/null
+++ b/jni/dbus/cmake/modules/FindLibIconv.cmake
@@ -0,0 +1,52 @@
+# - Try to find LibIconv
+# Once done this will define
+#
+#  LIBICONV_FOUND - system has LibIconv
+#  LIBICONV_INCLUDE_DIR - the LibIconv include directory
+#  LIBICONV_LIBRARIES - the libraries needed to use LibIconv
+#  LIBICONV_DEFINITIONS - Compiler switches required for using LibIconv
+
+if (LIBICONV_INCLUDE_DIR AND LIBICONV_LIBRARIES)
+
+    # in cache already
+    SET(LIBICONV_FOUND TRUE)
+
+else (LIBICONV_INCLUDE_DIR AND LIBICONV_LIBRARIES)
+
+    IF (NOT WIN32)
+        MESSAGE(FATAL_ERROR "Please set this to the correct values!")
+        # use pkg-config to get the directories and then use these values
+        # in the FIND_PATH() and FIND_LIBRARY() calls
+        INCLUDE(UsePkgConfig)
+        PKGCONFIG(libiconv-1.9 _LibIconvIncDir _LibIconvLinkDir _LibIconvLinkFlags _LiIconvCflags)
+        SET(LIBICONV_DEFINITIONS ${_LibIconvCflags})
+    ENDIF (NOT WIN32)
+
+    FIND_PATH(LIBICONV_INCLUDE_DIR iconv.h
+      PATHS
+     ${_LibIconvIncDir}
+      PATH_SUFFIXES libiconv
+    )
+
+    FIND_LIBRARY(LIBICONV_LIBRARIES NAMES iconv libiconv
+      PATHS
+      ${_LibIconvLinkDir}
+    )
+
+    if (LIBICONV_INCLUDE_DIR AND LIBICONV_LIBRARIES)
+       set(LIBICONV_FOUND TRUE)
+    endif (LIBICONV_INCLUDE_DIR AND LIBICONV_LIBRARIES)
+
+    if (LIBICONV_FOUND)
+      if (NOT LibIconv_FIND_QUIETLY)
+        message(STATUS "Found LibIconv: ${LIBICONV_LIBRARIES}")
+      endif (NOT LibIconv_FIND_QUIETLY)
+    else (LIBICONV_FOUND)
+      if (LibIconv_FIND_REQUIRED)
+        message(SEND_ERROR "Could NOT find LibIconv")
+      endif (LibIconv_FIND_REQUIRED)
+    endif (LIBICONV_FOUND)
+
+    MARK_AS_ADVANCED(LIBICONV_INCLUDE_DIR LIBICONV_LIBRARIES)
+
+endif (LIBICONV_INCLUDE_DIR AND LIBICONV_LIBRARIES)
diff --git a/jni/dbus/cmake/modules/MacroGetenvWinPath.cmake b/jni/dbus/cmake/modules/MacroGetenvWinPath.cmake
new file mode 100644
index 0000000..b18f7f6
--- /dev/null
+++ b/jni/dbus/cmake/modules/MacroGetenvWinPath.cmake
@@ -0,0 +1,5 @@
+
+MACRO (MACRO_GETENV_WIN_PATH var name)
+   set(${var} $ENV{${name}})
+   STRING(REGEX REPLACE "\\\\" "/" ${var} "${${var}}")
+ENDMACRO (MACRO_GETENV_WIN_PATH var name)
diff --git a/jni/dbus/cmake/modules/MacroLibrary.cmake b/jni/dbus/cmake/modules/MacroLibrary.cmake
new file mode 100644
index 0000000..6523530
--- /dev/null
+++ b/jni/dbus/cmake/modules/MacroLibrary.cmake
@@ -0,0 +1,9 @@
+# - include MacroLibrary offers a collection of macros which extend the built-in cmake commands
+# OPTIONAL_FIND_PACKAGE( <name> [QUIT] )
+
+INCLUDE(MacroOptionalFindPackage)
+#INCLUDE(MacroAdditionalCleanFiles)
+#INCLUDE(MacroAddFileDependencies)
+#INCLUDE(MacroGetenvWinPath)
+#INCLUDE(MacroEnsureOutOfSourceBuild)
+
diff --git a/jni/dbus/cmake/modules/MacroOptionalFindPackage.cmake b/jni/dbus/cmake/modules/MacroOptionalFindPackage.cmake
new file mode 100644
index 0000000..7068131
--- /dev/null
+++ b/jni/dbus/cmake/modules/MacroOptionalFindPackage.cmake
@@ -0,0 +1,22 @@
+# - MACRO_OPTIONAL_FIND_PACKAGE() combines FIND_PACKAGE() with an OPTION()
+# MACRO_OPTIONAL_FIND_PACKAGE( <name> [QUIT] )
+# This macro is a combination of OPTION() and FIND_PACKAGE(), it
+# works like FIND_PACKAGE(), but additionally it automatically creates
+# an option name WITH_<name>, which can be disabled via the cmake GUI.
+# or via -DWITH_<name>=OFF
+# The standard <name>_FOUND variables can be used in the same way
+# as when using the normal FIND_PACKAGE()
+
+MACRO (MACRO_OPTIONAL_FIND_PACKAGE _name )
+   OPTION(WITH_${_name} "Search for ${_name} package" ON)
+   if (WITH_${_name})
+      FIND_PACKAGE(${_name} ${ARGN})
+   else (WITH_${_name})
+      set(${_name}_FOUND)
+      set(${_name}_INCLUDE_DIR)
+      set(${_name}_INCLUDES)
+      set(${_name}_LIBRARY)
+      set(${_name}_LIBRARIES)
+   endif (WITH_${_name})
+ENDMACRO (MACRO_OPTIONAL_FIND_PACKAGE)
+
diff --git a/jni/dbus/cmake/modules/ProjectSourceGroup.cmake b/jni/dbus/cmake/modules/ProjectSourceGroup.cmake
new file mode 100644
index 0000000..713a67a
--- /dev/null
+++ b/jni/dbus/cmake/modules/ProjectSourceGroup.cmake
@@ -0,0 +1,18 @@
+# folders in the msvc projects
+# mode==flat  : headers and ourses in no folders
+# mode==split : standard behavior of cmake, split headers and sources
+# mode== <other values" : code is in this folder
+macro(project_source_group mode sources headers)
+	#message(STATUS ${mode})
+	#message(STATUS ${sources} ${headers})
+	if(${mode} MATCHES "flat")
+		source_group("Source Files" Files)
+		source_group("Header Files" Files)
+		source_group("cmake" FILES CMakeLists.txt)
+	else(${mode} MATCHES "flat")
+		if(NOT ${mode} MATCHES "split")
+			source_group("${mode}" FILES ${${sources}} ${${headers}})
+		endif(NOT ${mode} MATCHES "split")
+	endif(${mode} MATCHES "flat")
+endmacro(project_source_group mode sources headers)
+
diff --git a/jni/dbus/cmake/modules/Win32Macros.cmake b/jni/dbus/cmake/modules/Win32Macros.cmake
new file mode 100644
index 0000000..4385cc9
--- /dev/null
+++ b/jni/dbus/cmake/modules/Win32Macros.cmake
@@ -0,0 +1,44 @@
+#
+# win32 macros 
+# 
+# Copyright (c) 2006-2007, Ralf Habacker
+#
+# Redistribution and use is allowed according to the terms of the BSD license.
+#
+
+if (WIN32)
+    #
+    # addExplorerWrapper creates batch files for fast access 
+    # to the build environment from the win32 explorer. 
+    # 
+    # For mingw and nmake projects it's opens a command shell,
+    # for Visual Studio IDE's (at least tested with VS 8 2005) it
+    # opens the related .sln file with paths setting specified at 
+    # configure time. 
+    #
+    MACRO (addExplorerWrapper _projectname)
+        # write explorer wrappers
+        get_filename_component(CMAKE_BIN_PATH ${CMAKE_COMMAND} PATH)
+        set (ADD_PATH "${CMAKE_BIN_PATH}")
+
+        if (QT_QMAKE_EXECUTABLE)
+            get_filename_component(QT_BIN_PATH ${QT_QMAKE_EXECUTABLE} PATH)
+            set (ADD_PATH "${ADD_PATH};${QT_BIN_PATH}")
+        endif (QT_QMAKE_EXECUTABLE)
+        
+        # add here more pathes 
+        
+        if (MINGW)
+            get_filename_component(MINGW_BIN_PATH ${CMAKE_CXX_COMPILER} PATH)
+            set (ADD_PATH "${ADD_PATH};${MINGW_BIN_PATH}")
+            write_file (${CMAKE_BINARY_DIR}/${_projectname}-shell.bat "set PATH=${ADD_PATH};%PATH%\ncmd.exe")
+        else (MINGW)
+            if (CMAKE_BUILD_TOOL STREQUAL  "nmake")
+                get_filename_component(VC_BIN_PATH ${CMAKE_CXX_COMPILER} PATH)
+                write_file (${CMAKE_BINARY_DIR}/${_projectname}-shell.bat "set PATH=${ADD_PATH};%PATH%\ncall \"${VC_BIN_PATH}\\vcvars32.bat\"\ncmd.exe")
+            else (CMAKE_BUILD_TOOL STREQUAL  "nmake")
+                write_file (${CMAKE_BINARY_DIR}/${_projectname}-sln.bat "set PATH=${ADD_PATH};%PATH%\nstart ${_projectname}.sln")
+            endif (CMAKE_BUILD_TOOL STREQUAL  "nmake")
+        endif (MINGW)
+    ENDMACRO (addExplorerWrapper)
+endif(WIN32)