diff options
Diffstat (limited to '3rdparty')
-rw-r--r-- | 3rdparty/CMakeLists.txt | 1 | ||||
-rw-r--r-- | 3rdparty/cmake/FindFunctionLibrary.cmake | 47 | ||||
-rw-r--r-- | 3rdparty/cmake/FindMYSQL.cmake (renamed from 3rdparty/mysql/FindMYSQL.cmake) | 2 | ||||
-rw-r--r-- | 3rdparty/cmake/FindPCRE.cmake (renamed from 3rdparty/pcre/FindPCRE.cmake) | 5 | ||||
-rw-r--r-- | 3rdparty/msinttypes/CMakeLists.txt | 5 | ||||
-rw-r--r-- | 3rdparty/msinttypes/include/stdint.h | 4 | ||||
-rw-r--r-- | 3rdparty/mysql/CMakeLists.txt | 1 | ||||
-rw-r--r-- | 3rdparty/pcre/CMakeLists.txt | 1 | ||||
-rw-r--r-- | 3rdparty/pcre/lib/libpcre.dll.a | bin | 0 -> 19068 bytes |
9 files changed, 60 insertions, 6 deletions
diff --git a/3rdparty/CMakeLists.txt b/3rdparty/CMakeLists.txt index 3e7cb4cc4..ebbac481a 100644 --- a/3rdparty/CMakeLists.txt +++ b/3rdparty/CMakeLists.txt @@ -47,6 +47,7 @@ macro( CONFIGURE_WITH_LOCAL_OR_SYSTEM name ) endmacro( CONFIGURE_WITH_LOCAL_OR_SYSTEM ) +set( CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake CACHE INTERNAL "" ) add_subdirectory( msinttypes ) add_subdirectory( mt19937ar ) add_subdirectory( mysql ) diff --git a/3rdparty/cmake/FindFunctionLibrary.cmake b/3rdparty/cmake/FindFunctionLibrary.cmake new file mode 100644 index 000000000..f1d32001e --- /dev/null +++ b/3rdparty/cmake/FindFunctionLibrary.cmake @@ -0,0 +1,47 @@ +# - Check which library is needed to link a C function +# find_function_library( <function> <variable> [<library> ...] ) +# +# Check which library provides the <function>. +# Sets <variable> to 0 if found in the global libraries. +# Sets <variable> to the library path if found in the provided libraries. +# Raises a FATAL_ERROR if not found. +# +# 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 +# CMAKE_REQUIRED_LIBRARIES = list of libraries to link +include( CheckFunctionExists ) + +macro( find_function_library FUNC VAR ) + if( "${VAR}" MATCHES "^${VAR}$" ) + CHECK_FUNCTION_EXISTS( ${FUNC} ${VAR} ) + if( ${VAR} ) + message( STATUS "Found ${FUNC} in global libraries" ) + set( ${VAR} 0 CACHE INTERNAL "Found ${FUNC} in global libraries" )# global + else() + foreach( LIB IN ITEMS ${ARGN} ) + message( STATUS "Looking for ${FUNC} in ${LIB}" ) + find_library( ${LIB}_LIBRARY ${LIB} ) + mark_as_advanced( ${LIB}_LIBRARY ) + if( ${LIB}_LIBRARY ) + unset( ${VAR} CACHE ) + set( CMAKE_REQUIRED_LIBRARIES ${${LIB}_LIBRARY} ) + CHECK_FUNCTION_EXISTS( ${FUNC} ${VAR} ) + set( CMAKE_REQUIRED_LIBRARIES ) + if( ${VAR} ) + message( STATUS "Found ${FUNC} in ${LIB}: ${${LIB}_LIBRARY}" ) + set( ${VAR} ${${LIB}_LIBRARY} CACHE INTERNAL "Found ${FUNC} in ${LIB}" )# lib + break() + endif() + endif() + endforeach() + if( NOT ${VAR} ) + message( FATAL_ERROR "Function ${FUNC} not found" ) + endif() + endif() + endif() +endmacro( find_function_library ) + diff --git a/3rdparty/mysql/FindMYSQL.cmake b/3rdparty/cmake/FindMYSQL.cmake index 0a07f3612..c18e8d637 100644 --- a/3rdparty/mysql/FindMYSQL.cmake +++ b/3rdparty/cmake/FindMYSQL.cmake @@ -10,6 +10,7 @@ find_path( MYSQL_INCLUDE_DIRS "mysql.h" PATHS "/usr/include/mysql" "/usr/local/include/mysql" + "/usr/mysql/include/mysql" "$ENV{PROGRAMFILES}/MySQL/*/include" "$ENV{SYSTEMDRIVE}/MySQL/*/include" ) @@ -18,6 +19,7 @@ find_library( MYSQL_LIBRARIES PATHS "/usr/lib/mysql" "/usr/local/lib/mysql" + "/usr/mysql/lib/mysql" "$ENV{PROGRAMFILES}/MySQL/*/lib" "$ENV{SYSTEMDRIVE}/MySQL/*/lib" ) mark_as_advanced( MYSQL_LIBRARIES MYSQL_INCLUDE_DIRS ) diff --git a/3rdparty/pcre/FindPCRE.cmake b/3rdparty/cmake/FindPCRE.cmake index cb4d9177b..2215451d1 100644 --- a/3rdparty/pcre/FindPCRE.cmake +++ b/3rdparty/cmake/FindPCRE.cmake @@ -6,8 +6,9 @@ # 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 ) find_library( PCRE_LIBRARY NAMES ${PCRE_NAMES} ) mark_as_advanced( PCRE_LIBRARY PCRE_INCLUDE_DIR ) diff --git a/3rdparty/msinttypes/CMakeLists.txt b/3rdparty/msinttypes/CMakeLists.txt index f17c6f596..c11c1d72a 100644 --- a/3rdparty/msinttypes/CMakeLists.txt +++ b/3rdparty/msinttypes/CMakeLists.txt @@ -1,8 +1,9 @@ -if( WIN32 ) +if( MSVC ) find_path( MSINTTYPES_INCLUDE_DIRS "inttypes.h" PATHS "${CMAKE_CURRENT_SOURCE_DIR}/include" NO_DEFAULT_PATH ) mark_as_advanced( MSINTTYPES_INCLUDE_DIRS ) -set( GLOBAL_INCLUDE_DIRS ${GLOBAL_INCLUDE_DIRS} ${MSINTTYPES_INCLUDE_DIRS} CACHE INTERNAL "" ) +message( STATUS "Adding global include directory: ${MSINTTYPES_INCLUDE_DIRS}" ) +set_property( CACHE GLOBAL_INCLUDE_DIRS PROPERTY VALUE ${GLOBAL_INCLUDE_DIRS} ${MSINTTYPES_INCLUDE_DIRS} ) endif() diff --git a/3rdparty/msinttypes/include/stdint.h b/3rdparty/msinttypes/include/stdint.h index d02608a59..cbb023bf9 100644 --- a/3rdparty/msinttypes/include/stdint.h +++ b/3rdparty/msinttypes/include/stdint.h @@ -47,8 +47,12 @@ // or compiler give many errors like this: // error C2733: second C linkage of overloaded function 'wmemchr' not allowed #ifdef __cplusplus +#if _MSC_VER < 1300 +extern "C++" { +#else extern "C" { #endif +#endif # include <wchar.h> #ifdef __cplusplus } diff --git a/3rdparty/mysql/CMakeLists.txt b/3rdparty/mysql/CMakeLists.txt index f4996907f..e85fd626d 100644 --- a/3rdparty/mysql/CMakeLists.txt +++ b/3rdparty/mysql/CMakeLists.txt @@ -44,7 +44,6 @@ endif( WIN32 ) message( STATUS "Detecting system MYSQL" ) unset( MYSQL_LIBRARIES CACHE ) unset( MYSQL_INCLUDE_DIRS CACHE ) -set( CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_MODULE_PATH} ) find_package( MYSQL ) set( MYSQL_SYSTEM_LIBRARIES "${MYSQL_LIBRARIES}" CACHE PATH "system mysql libraries" ) diff --git a/3rdparty/pcre/CMakeLists.txt b/3rdparty/pcre/CMakeLists.txt index 70448d40e..57465a46c 100644 --- a/3rdparty/pcre/CMakeLists.txt +++ b/3rdparty/pcre/CMakeLists.txt @@ -39,7 +39,6 @@ endif( WIN32 ) # system # message( STATUS "Detecting system PCRE" ) -set( CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_MODULE_PATH} ) unset( PCRE_LIBRARIES CACHE ) unset( PCRE_INCLUDE_DIRS CACHE ) find_package( PCRE ) diff --git a/3rdparty/pcre/lib/libpcre.dll.a b/3rdparty/pcre/lib/libpcre.dll.a Binary files differnew file mode 100644 index 000000000..fe69e4e57 --- /dev/null +++ b/3rdparty/pcre/lib/libpcre.dll.a |