mirror of
https://github.com/anope/anope.git
synced 2026-07-10 20:43:15 +02:00
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
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user