- bugfix to compile with libircclient 1.6 and beyond

This commit is contained in:
Mark Vejvoda 2012-01-23 20:36:15 +00:00
parent 0d880a8692
commit 84f06d3cbd
3 changed files with 37 additions and 8 deletions

View File

@ -19,16 +19,16 @@ mkdir -p "$RELEASEDIR"
project_parent_dir="$(basename $(readlink -f -- "$(dirname -- "$0")/../../") )"
# echo "$project_parent_dir"
if [[ $project_parent_dir == trunk* ]] ;
then
echo 'this is the trunk!'
else
echo '*NOTE: This script currently only works on the trunk, aborting!'
exit
fi
#if [[ $project_parent_dir == trunk* ]] ;
#then
# echo 'this is the trunk!'
#else
# echo '*NOTE: This script currently only works on the trunk, aborting!'
# exit
#fi
# copy data
svn export --force "$CURRENTDIR/../../../trunk-data-source" "$RELEASEDIR/data-source/"
svn export --force "$CURRENTDIR/../../../../tags/release-data-source-3.6.0.3" "$RELEASEDIR/data-source/"
echo "creating $PACKAGE"
[[ -f "$release/$PACKAGE" ]] && rm "release/$PACKAGE"

View File

@ -293,6 +293,30 @@ IF(BUILD_MEGAGLEST_MODEL_VIEWER OR BUILD_MEGAGLEST_MAP_EDITOR OR BUILD_MEGAGLEST
SET(EXTERNAL_LIBS ${EXTERNAL_LIBS} ${IRCCLIENT_LIBRARY})
endif()
set(CMAKE_REQUIRED_INCLUDES "${IRCCLIENT_INCLUDE_DIR}")
set(CMAKE_REQUIRED_LIBRARIES "${IRCCLIENT_LIBRARY}")
check_cxx_source_runs("
#include <stdio.h>
#include <stdlib.h>
#include <libircclient.h>
int main()
{
unsigned int high = 0;
unsigned int low = 0;
irc_get_version(&high,&low);
if( (high == 1 && low >= 6) || (high > 1)) {
return 0;
}
throw 1;
}"
HAS_LIBIRCCLIENT_1_6)
IF(HAS_LIBIRCCLIENT_1_6)
message(STATUS "Found HAS_LIBIRCCLIENT_1_6: ${HAS_LIBIRCCLIENT_1_6}")
ELSE()
ADD_DEFINITIONS(-DLIBIRCCLIENT_PRE1_6)
ENDIF()
IF(WIN32)
SET(MG_SOURCE_FILES ${MG_SOURCE_FILES} ${PROJECT_SOURCE_DIR}/source/shared_lib/sources/platform/posix/socket.cpp)
SET(MG_SOURCE_FILES ${MG_SOURCE_FILES} ${PROJECT_SOURCE_DIR}/source/shared_lib/sources/platform/posix/ircclient.cpp)

View File

@ -15,6 +15,11 @@
#include "platform_common.h"
#include "libircclient.h"
// upstream moved some defines into new headers as of 1.6
#ifndef LIBIRCCLIENT_PRE1_6
#include "libirc_rfcnumeric.h"
#endif
#include <stdio.h>
#include <stdarg.h>
#include <string.h>