diff options
| author | cyberbotx <cyberbotx@5417fbe8-f217-4b02-8779-1006273d7864> | 2008-12-23 07:38:22 +0000 |
|---|---|---|
| committer | cyberbotx <cyberbotx@5417fbe8-f217-4b02-8779-1006273d7864> | 2008-12-23 07:38:22 +0000 |
| commit | e802b6dfe8ef0105389b69e17e7faa2e4c92d756 (patch) | |
| tree | 7556cf902a0f943cb4bbc3b47b89fb13797ad4e1 /src/tools | |
| parent | 40ec6f0854c2210e670199f701636d9d78ffa6c0 (diff) | |
Some more Windows fixes, both in CMake and in the code itself. (I don't like the const casting for the latter, but it's only until we get rid of use of strchr)
Added CPack setup to automate generation of source package for *nix and NSIS installer for Windows.
Some other minor CMake fixes.
Converted docs/README and docs/WIN32.txt from Unix linefeeds to DOS linefeeds so they show up right in Notepad under Windows.
Added small fix for Visual Studio 2008, CMake doesn't detect the Express version correctly and it must be explicitly defined.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@1861 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'src/tools')
| -rw-r--r-- | src/tools/CMakeLists.txt | 10 | ||||
| -rw-r--r-- | src/tools/db-convert.c | 2 |
2 files changed, 9 insertions, 3 deletions
diff --git a/src/tools/CMakeLists.txt b/src/tools/CMakeLists.txt index f995de04f..05c535863 100644 --- a/src/tools/CMakeLists.txt +++ b/src/tools/CMakeLists.txt @@ -21,8 +21,14 @@ foreach(SRC ${TOOLS_SRCS}) add_dependencies(${EXE} ${PROGRAM_NAME}) # Set the executable to be installed to the tools directory under the bin directory install(TARGETS ${EXE} - DESTINATION "${INSTDIR}/tools" + DESTINATION tools ) + if(IN_SOURCE) + # Add the executable to the list of files for CPack to ignore + get_target_property(EXE_BINARY ${EXE} LOCATION) + get_filename_component(EXE_BINARY ${EXE_BINARY} NAME) + add_to_cpack_ignored_files("${EXE_BINARY}$" TRUE) + endif(IN_SOURCE) endforeach(SRC) # Only for Windows, set anopesmtp to require the wsock32 library @@ -32,5 +38,5 @@ endif(WIN32) # On non-Windows platforms, if RUNGROUP is set, change the permissions of the tools directory if(NOT WIN32 AND RUNGROUP) - install(CODE "execute_process(COMMAND ${CHMOD} 2770 \"${INSTDIR}/tools\")") + install(CODE "execute_process(COMMAND ${CHMOD} 2770 \"\${CMAKE_INSTALL_PREFIX}/tools\")") endif(NOT WIN32 AND RUNGROUP) diff --git a/src/tools/db-convert.c b/src/tools/db-convert.c index d561c5333..084091142 100644 --- a/src/tools/db-convert.c +++ b/src/tools/db-convert.c @@ -1582,7 +1582,7 @@ int b64_decode(const char *src, char *target, size_t targsize) if (ch == Pad64) break; - pos = strchr(Base64, ch); + pos = const_cast<char *>(strchr(Base64, ch)); if (pos == 0) /* A non-base64 character. */ return (-1); |
