* CMake: added search for math.h, added search for socket/nsl library. (tested with Solaris-201011-x86)
* Added missing include to socket.c. git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@14903 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
parent
9535126f93
commit
13a4063735
2
3rdparty/cmake/FindMYSQL.cmake
vendored
2
3rdparty/cmake/FindMYSQL.cmake
vendored
@ -10,6 +10,7 @@ find_path( MYSQL_INCLUDE_DIRS "mysql.h"
|
|||||||
PATHS
|
PATHS
|
||||||
"/usr/include/mysql"
|
"/usr/include/mysql"
|
||||||
"/usr/local/include/mysql"
|
"/usr/local/include/mysql"
|
||||||
|
"/usr/mysql/include/mysql"
|
||||||
"$ENV{PROGRAMFILES}/MySQL/*/include"
|
"$ENV{PROGRAMFILES}/MySQL/*/include"
|
||||||
"$ENV{SYSTEMDRIVE}/MySQL/*/include" )
|
"$ENV{SYSTEMDRIVE}/MySQL/*/include" )
|
||||||
|
|
||||||
@ -18,6 +19,7 @@ find_library( MYSQL_LIBRARIES
|
|||||||
PATHS
|
PATHS
|
||||||
"/usr/lib/mysql"
|
"/usr/lib/mysql"
|
||||||
"/usr/local/lib/mysql"
|
"/usr/local/lib/mysql"
|
||||||
|
"/usr/mysql/lib/mysql"
|
||||||
"$ENV{PROGRAMFILES}/MySQL/*/lib"
|
"$ENV{PROGRAMFILES}/MySQL/*/lib"
|
||||||
"$ENV{SYSTEMDRIVE}/MySQL/*/lib" )
|
"$ENV{SYSTEMDRIVE}/MySQL/*/lib" )
|
||||||
mark_as_advanced( MYSQL_LIBRARIES MYSQL_INCLUDE_DIRS )
|
mark_as_advanced( MYSQL_LIBRARIES MYSQL_INCLUDE_DIRS )
|
||||||
|
5
3rdparty/cmake/FindPCRE.cmake
vendored
5
3rdparty/cmake/FindPCRE.cmake
vendored
@ -6,8 +6,9 @@
|
|||||||
# PCRE_FOUND - True if pcre found.
|
# PCRE_FOUND - True if pcre found.
|
||||||
|
|
||||||
|
|
||||||
find_path( PCRE_INCLUDE_DIR pcre.h )
|
find_path( PCRE_INCLUDE_DIR pcre.h
|
||||||
|
PATHS
|
||||||
|
"/usr/include/pcre" )
|
||||||
set( PCRE_NAMES pcre )
|
set( PCRE_NAMES pcre )
|
||||||
find_library( PCRE_LIBRARY NAMES ${PCRE_NAMES} )
|
find_library( PCRE_LIBRARY NAMES ${PCRE_NAMES} )
|
||||||
mark_as_advanced( PCRE_LIBRARY PCRE_INCLUDE_DIR )
|
mark_as_advanced( PCRE_LIBRARY PCRE_INCLUDE_DIR )
|
||||||
|
@ -40,11 +40,12 @@ elseif( "${CMAKE_CURRENT_SOURCE_DIR}" STREQUAL "${CMAKE_CURRENT_BINARY_DIR}" )
|
|||||||
message( FATAL_ERROR
|
message( FATAL_ERROR
|
||||||
"Do not use the source directory to build your files, instead delete CMakeCache.txt, create a separate folder and build there.\n"
|
"Do not use the source directory to build your files, instead delete CMakeCache.txt, create a separate folder and build there.\n"
|
||||||
"Example: (build in subdir 'build' and install to source dir)\n"
|
"Example: (build in subdir 'build' and install to source dir)\n"
|
||||||
|
" rm -f CMakeCache.txt\n"
|
||||||
" mkdir build && cd build\n"
|
" mkdir build && cd build\n"
|
||||||
" cmake -G\"Unix Makefiles\" -DINSTALL_TO_SOURCE:bool=ON ..\n"
|
" cmake -G\"Unix Makefiles\" -DINSTALL_TO_SOURCE=ON -DCMAKE_BUILD_TYPE=RelWithDebInfo ..\n"
|
||||||
" make install\n"
|
" make install\n"
|
||||||
" cd .. && rm -rf build\n"
|
" cd .. && rm -rf build\n"
|
||||||
"To skip this check, set ALLOW_SAME_DIRECTORY to ON (-DALLOW_SAME_DIRECTORY:bool=ON)" )
|
"To skip this check, set ALLOW_SAME_DIRECTORY to ON (-DALLOW_SAME_DIRECTORY=ON)" )
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
||||||
@ -96,17 +97,23 @@ endif()
|
|||||||
# SVNVERSION
|
# SVNVERSION
|
||||||
#
|
#
|
||||||
if( SVNVERSION_EXECUTABLE )
|
if( SVNVERSION_EXECUTABLE )
|
||||||
|
message( STATUS "Getting svn version" )
|
||||||
execute_process( COMMAND ${SVNVERSION_EXECUTABLE} ${PROJECT_SOURCE_DIR}
|
execute_process( COMMAND ${SVNVERSION_EXECUTABLE} ${PROJECT_SOURCE_DIR}
|
||||||
OUTPUT_VARIABLE SVNVERSION
|
OUTPUT_VARIABLE SVNVERSION
|
||||||
OUTPUT_STRIP_TRAILING_WHITESPACE )
|
OUTPUT_STRIP_TRAILING_WHITESPACE )
|
||||||
string( REGEX REPLACE "[^1234567890MSexported]" "_" SVNVERSION ${SVNVERSION} )
|
string( REGEX REPLACE "[^1234567890MSexported]" "_" SVNVERSION ${SVNVERSION} )
|
||||||
|
message( STATUS "Found version: ${SVNVERSION}" )
|
||||||
|
message( STATUS "Getting svn version - done" )
|
||||||
endif()
|
endif()
|
||||||
if( Subversion_FOUND AND SVNVERSION )
|
if( Subversion_FOUND AND SVNVERSION )
|
||||||
|
message( STATUS "Getting svn branch" )
|
||||||
Subversion_WC_INFO( ${PROJECT_SOURCE_DIR} eAthena )
|
Subversion_WC_INFO( ${PROJECT_SOURCE_DIR} eAthena )
|
||||||
if( eAthena_WC_URL )
|
if( eAthena_WC_URL )
|
||||||
string( REGEX MATCH "[^/]+$" BRANCH ${eAthena_WC_URL} )
|
string( REGEX MATCH "[^/]+$" BRANCH ${eAthena_WC_URL} )
|
||||||
set( SVNVERSION "${BRANCH}-${SVNVERSION}" )
|
set( SVNVERSION "${BRANCH}-${SVNVERSION}" )
|
||||||
|
message( STATUS "Found branch: ${BRANCH}" )
|
||||||
endif()
|
endif()
|
||||||
|
message( STATUS "Getting svn branch - done" )
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
||||||
@ -115,15 +122,19 @@ endif()
|
|||||||
#
|
#
|
||||||
add_subdirectory( 3rdparty )
|
add_subdirectory( 3rdparty )
|
||||||
include( FindFunctionLibrary )
|
include( FindFunctionLibrary )
|
||||||
|
include( CheckIncludeFile )
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# math library (FreeBSD/Linux)
|
# math library (FreeBSD/Linux/Solaris)
|
||||||
#
|
#
|
||||||
message( STATUS "Detecting m library (math)" )
|
message( STATUS "Detecting m library (math)" )
|
||||||
|
CHECK_INCLUDE_FILE( math.h HAVE_MATH_H )
|
||||||
|
if( NOT HAVE_MATH_H )
|
||||||
|
message( FATAL_ERROR "math.h not found" )
|
||||||
|
endif()
|
||||||
set( CMAKE_REQUIRED_LIBRARIES ${GLOBAL_LIBRARIES} )
|
set( CMAKE_REQUIRED_LIBRARIES ${GLOBAL_LIBRARIES} )
|
||||||
find_function_library( floor FUNCTION_FLOOR_LIBRARIES m )
|
find_function_library( floor FUNCTION_FLOOR_LIBRARIES m )
|
||||||
mark_as_advanced( FUNCTION_FLOOR_LIBRARIES )
|
|
||||||
if( FUNCTION_FLOOR_LIBRARIES )
|
if( FUNCTION_FLOOR_LIBRARIES )
|
||||||
message( STATUS "Adding global library: ${FUNCTION_FLOOR_LIBRARIES}" )
|
message( STATUS "Adding global library: ${FUNCTION_FLOOR_LIBRARIES}" )
|
||||||
list( APPEND GLOBAL_LIBRARIES ${FUNCTION_FLOOR_LIBRARIES} )
|
list( APPEND GLOBAL_LIBRARIES ${FUNCTION_FLOOR_LIBRARIES} )
|
||||||
@ -138,7 +149,6 @@ if( NOT WIN32 )
|
|||||||
message( STATUS "Detecting dl library (dynamic loading)" )
|
message( STATUS "Detecting dl library (dynamic loading)" )
|
||||||
set( CMAKE_REQUIRED_LIBRARIES ${GLOBAL_LIBRARIES} )
|
set( CMAKE_REQUIRED_LIBRARIES ${GLOBAL_LIBRARIES} )
|
||||||
find_function_library( dlopen FUNCTION_DLOPEN_LIBRARIES dl )
|
find_function_library( dlopen FUNCTION_DLOPEN_LIBRARIES dl )
|
||||||
mark_as_advanced( FUNCTION_DLOPEN_LIBRARIES )
|
|
||||||
if( FUNCTION_DLOPEN_LIBRARIES )
|
if( FUNCTION_DLOPEN_LIBRARIES )
|
||||||
message( STATUS "Adding global library: ${FUNCTION_DLOPEN_LIBRARIES}" )
|
message( STATUS "Adding global library: ${FUNCTION_DLOPEN_LIBRARIES}" )
|
||||||
list( APPEND GLOBAL_LIBRARIES ${FUNCTION_DLOPEN_LIBRARIES} )
|
list( APPEND GLOBAL_LIBRARIES ${FUNCTION_DLOPEN_LIBRARIES} )
|
||||||
@ -147,6 +157,27 @@ message( STATUS "Detecting dl library (dynamic loading) - done" )
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
||||||
|
#
|
||||||
|
# socket/nsl library (Solaris)
|
||||||
|
#
|
||||||
|
if( NOT WIN32 )
|
||||||
|
message( STATUS "Detecting socket/nsl library (networking)" )
|
||||||
|
set( CMAKE_REQUIRED_LIBRARIES ${GLOBAL_LIBRARIES} )
|
||||||
|
find_function_library( bind FUNCTION_BIND_LIBRARIES socket )
|
||||||
|
if( FUNCTION_BIND_LIBRARIES )
|
||||||
|
message( STATUS "Adding global library: ${FUNCTION_BIND_LIBRARIES}" )
|
||||||
|
list( APPEND GLOBAL_LIBRARIES ${FUNCTION_BIND_LIBRARIES} )
|
||||||
|
endif()
|
||||||
|
set( CMAKE_REQUIRED_LIBRARIES ${GLOBAL_LIBRARIES} )
|
||||||
|
find_function_library( gethostbyname FUNCTION_GETHOSTBYNAME_LIBRARIES nsl )
|
||||||
|
if( FUNCTION_GETHOSTBYNAME_LIBRARIES )
|
||||||
|
message( STATUS "Adding global library: ${FUNCTION_GETHOSTBYNAME_LIBRARIES}" )
|
||||||
|
list( APPEND GLOBAL_LIBRARIES ${FUNCTION_GETHOSTBYNAME_LIBRARIES} )
|
||||||
|
endif()
|
||||||
|
message( STATUS "Detecting socket/nsl library (networking) - done" )
|
||||||
|
endif()
|
||||||
|
|
||||||
|
|
||||||
#####################################################################
|
#####################################################################
|
||||||
# package stuff
|
# package stuff
|
||||||
#
|
#
|
||||||
|
@ -2,6 +2,8 @@ Date Added
|
|||||||
|
|
||||||
2011/07/12
|
2011/07/12
|
||||||
* CMake: set project language to C, added module FindFunctionLibrary, added search for dl library. (tested with debian-wheezy-i386) [FlavioJS]
|
* CMake: set project language to C, added module FindFunctionLibrary, added search for dl library. (tested with debian-wheezy-i386) [FlavioJS]
|
||||||
|
* CMake: added search for math.h, added search for socket/nsl library. (tested with Solaris-201011-x86)
|
||||||
|
* Added missing include to socket.c.
|
||||||
2011/07/11
|
2011/07/11
|
||||||
* Rev. 14901 Added bonus3 bAddClassDropItem, care of Epoque. [L0ne_W0lf]
|
* Rev. 14901 Added bonus3 bAddClassDropItem, care of Epoque. [L0ne_W0lf]
|
||||||
2011/07/10
|
2011/07/10
|
||||||
|
@ -32,6 +32,9 @@
|
|||||||
#ifndef SIOCGIFCONF
|
#ifndef SIOCGIFCONF
|
||||||
#include <sys/sockio.h> // SIOCGIFCONF on Solaris, maybe others? [Shinomori]
|
#include <sys/sockio.h> // SIOCGIFCONF on Solaris, maybe others? [Shinomori]
|
||||||
#endif
|
#endif
|
||||||
|
#ifndef FIONBIO
|
||||||
|
#include <sys/filio.h> // FIONBIO on Solaris [FlavioJS]
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_SETRLIMIT
|
#ifdef HAVE_SETRLIMIT
|
||||||
#include <sys/resource.h>
|
#include <sys/resource.h>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user