1
0
mirror of https://github.com/VCMP-SqMod/SqMod.git synced 2025-06-22 18:17:11 +02:00

Update POCO library.

This commit is contained in:
Sandu Liviu Catalin
2023-03-23 20:19:11 +02:00
parent 8d15f4b6e9
commit 233fc103f9
2521 changed files with 257092 additions and 72789 deletions

View File

@ -33,6 +33,7 @@ macro(check_for_cxx11_compiler _VAR)
endif()
if(_COMPILER_TEST_RESULT AND ((MSVC AND (MSVC10 OR MSVC11 OR MSVC12 OR MSVC14)) OR
(CMAKE_COMPILER_IS_GNUCXX AND NOT ${CMAKE_CXX_COMPILER_VERSION} VERSION_LESS 4.8.1) OR
(CMAKE_CXX_COMPILER_ID STREQUAL "QCC" AND NOT ${CMAKE_CXX_COMPILER_VERSION} VERSION_LESS 4.8.1) OR
(CMAKE_CXX_COMPILER_ID STREQUAL "Clang" AND NOT ${CMAKE_CXX_COMPILER_VERSION} VERSION_LESS 3.3) OR
(CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang")))
set(${_VAR} 1)
@ -57,6 +58,7 @@ macro(check_for_cxx14_compiler _VAR)
endif()
if(_COMPILER_TEST_RESULT AND ((MSVC AND (MSVC14)) OR
(CMAKE_COMPILER_IS_GNUCXX AND NOT ${CMAKE_CXX_COMPILER_VERSION} VERSION_LESS 4.9.2) OR
(CMAKE_CXX_COMPILER_ID STREQUAL "QCC" AND NOT ${CMAKE_CXX_COMPILER_VERSION} VERSION_LESS 4.9.2) OR
(CMAKE_CXX_COMPILER_ID STREQUAL "Clang" AND NOT ${CMAKE_CXX_COMPILER_VERSION} VERSION_LESS 3.4) OR
(CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang")))
set(${_VAR} 1)

View File

@ -28,9 +28,13 @@ if(MSVC)
CMAKE_CXX_FLAGS
CMAKE_CXX_FLAGS_DEBUG
CMAKE_CXX_FLAGS_RELEASE
CMAKE_CXX_FLAGS_RELWITHDEBINFO
CMAKE_CXX_FLAGS_MINSIZEREL
CMAKE_C_FLAGS
CMAKE_C_FLAGS_DEBUG
CMAKE_C_FLAGS_RELEASE
CMAKE_C_FLAGS_RELWITHDEBINFO
CMAKE_C_FLAGS_MINSIZEREL
)
foreach(CompilerFlag ${CompilerFlags})
string(REPLACE "/MD" "/MT" ${CompilerFlag} "${${CompilerFlag}}")

View File

@ -26,7 +26,13 @@ pkg_check_modules(PC_MARIADB QUIET mariadb)
SET(BINDIR32_ENV_NAME "ProgramFiles(x86)")
SET(BINDIR32 $ENV{${BINDIR32_ENV_NAME}})
find_path(MYSQL_INCLUDE_DIR mysql/mysql.h
if (MINGW)
SET(PREFERED_MYSQL_HEADER mysql/mysql.h)
else()
SET(PREFERED_MYSQL_HEADER mysql.h)
endif()
find_path(MYSQL_INCLUDE_DIR ${PREFERED_MYSQL_HEADER}
HINTS
${MYSQL_ROOT_DIR}/include
${MYSQL_ROOT_INCLUDE_DIRS}
@ -35,8 +41,11 @@ find_path(MYSQL_INCLUDE_DIR mysql/mysql.h
${PC_MARIADB_INCLUDE_DIRS}
/usr/include
/usr/local/include
/opt/mysql/mysql/include
/usr/local/mysql/include
/usr/mysql/include
/usr/local/mysql/include
/usr/local/opt/mysql-client/include
/opt/local/include
/opt/mysql/include
$ENV{MYSQL_INCLUDE_DIR}
$ENV{MYSQL_DIR}/include
$ENV{ProgramFiles}/MySQL/*/include
@ -68,6 +77,13 @@ if (MSVC)
PATHS
${PC_MYSQL_LIBRARY_DIRS}
${PC_MARIADB_LIBRARY_DIRS}
/usr/local/lib
/usr/local/lib$(LIB64SUFFIX)/mysql
/usr/lib$(LIB64SUFFIX)/mysql
/usr/mysql/lib$(LIB64SUFFIX)
/usr/mysql/lib$(LIB64SUFFIX)/mysql
/usr/local/mysql/lib$(LIB64SUFFIX)
/usr/local/opt/mysql-client/lib
$ENV{MYSQL_DIR}/lib
$ENV{MYSQL_DIR}/libmysql
$ENV{MYSQL_DIR}/client

View File

@ -22,9 +22,10 @@ include(FindPackageHandleStandardArgs)
find_package(PkgConfig QUIET)
pkg_check_modules(PC_ODBC QUIET odbc)
if(WIN32)
if(WIN32 AND NOT MINGW)
get_filename_component(kit_dir "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows Kits\\Installed Roots;KitsRoot]" REALPATH)
get_filename_component(kit81_dir "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows Kits\\Installed Roots;KitsRoot81]" REALPATH)
set(_odbc_kit_include_dirs "${kit_dir}/Include/um" "${kit81_dir}/Include/um")
endif()
find_path(ODBC_INCLUDE_DIR
@ -42,8 +43,7 @@ find_path(ODBC_INCLUDE_DIR
"C:/Program Files/Microsoft SDKs/Windows/v7.0/include"
"C:/Program Files/Microsoft SDKs/Windows/v6.0a/include"
"C:/ODBC/include"
"${kit_dir}/Include/um"
"${kit81_dir}/Include/um"
${_odbc_kit_include_dirs}
PATH_SUFFIXES
odbc
iodbc

View File

@ -1,107 +0,0 @@
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
# file Copyright.txt or https://cmake.org/licensing for details.
#[=======================================================================[.rst:
FindPCRE
-------
Finds the PCRE library.
Imported Targets
^^^^^^^^^^^^^^^^
This module provides the following imported targets, if found:
``Pcre::Pcre``
The PCRE library
Result Variables
^^^^^^^^^^^^^^^^
This will define the following variables:
``PCRE_FOUND``
True if the system has the PCRE library.
``PCRE_VERSION``
The version of the PCRE library which was found.
``PCRE_INCLUDE_DIRS``
Include directories needed to use PCRE.
``PCRE_LIBRARIES``
Libraries needed to link to PCRE.
Cache Variables
^^^^^^^^^^^^^^^
The following cache variables may also be set:
``PCRE_INCLUDE_DIR``
The directory containing ``foo.h``.
``PCRE_LIBRARY``
The path to the PCRE library.
Hints
^^^^^
``PCRE_ROOT_DIR``
The path to the root directory of a PCRE installation.
``PCRE_ROOT_INCLUDE_DIRS``
The path to the include directory of a PCRE installation.
``PCRE_ROOT_LIBRARY_DIRS``
The path to the library directory of a PCRE installation.
#]=======================================================================]#
include(FindPackageHandleStandardArgs)
find_package(PkgConfig QUIET)
pkg_check_modules(PC_PCRE QUIET pcre)
find_path(PCRE_INCLUDE_DIR
NAMES pcre.h
HINTS
${PCRE_ROOT_DIR}/include
${PCRE_ROOT_INCLUDE_DIRS}
PATHS
${PC_PCRE_INCLUDE_DIRS}
DOC "Specify the include directory containing pcre.h"
)
find_library(PCRE_LIBRARY
NAMES pcre
HINTS
${PCRE_ROOT_DIR}/lib
${PCRE_ROOT_LIBRARY_DIRS}
PATHS
${PC_PCRE_LIBRARY_DIRS}
DOC "Specify the lib directory containing pcre"
)
set(PCRE_VERSION ${PC_PCRE_VERSION})
find_package_handle_standard_args(PCRE
FOUND_VAR PCRE_FOUND
REQUIRED_VARS
PCRE_LIBRARY
PCRE_INCLUDE_DIR
VERSION_VAR PCRE_VERSION
)
if(PCRE_FOUND)
set(PCRE_LIBRARIES ${PCRE_LIBRARY})
set(PCRE_INCLUDE_DIRS ${PCRE_INCLUDE_DIR})
set(PCRE_DEFINITIONS ${PC_PCRE_CFLAGS_OTHER})
endif()
if(PCRE_FOUND AND NOT TARGET Pcre::Pcre)
add_library(Pcre::Pcre UNKNOWN IMPORTED)
set_target_properties(Pcre::Pcre PROPERTIES
IMPORTED_LOCATION "${PCRE_LIBRARY}"
INTERFACE_COMPILE_OPTIONS "${PC_PCRE_CFLAGS_OTHER}"
INTERFACE_INCLUDE_DIRECTORIES "${PCRE_INCLUDE_DIR}"
)
endif()
mark_as_advanced(
PCRE_INCLUDE_DIR
PCRE_LIBRARY
)

107
vendor/POCO/cmake/FindPCRE2.cmake vendored Normal file
View File

@ -0,0 +1,107 @@
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
# file Copyright.txt or https://cmake.org/licensing for details.
#[=======================================================================[.rst:
FindPCRE2
---------
Finds the PCRE2 library.
Imported Targets
^^^^^^^^^^^^^^^^
This module provides the following imported targets, if found:
``Pcre2::Pcre2``
The PCRE2 library
Result Variables
^^^^^^^^^^^^^^^^
This will define the following variables:
``PCRE2_FOUND``
True if the system has the PCRE2 library.
``PCRE2_VERSION``
The version of the PCRE2 library which was found.
``PCRE2_INCLUDE_DIRS``
Include directories needed to use PCRE2.
``PCRE2_LIBRARIES``
Libraries needed to link to PCRE2.
Cache Variables
^^^^^^^^^^^^^^^
The following cache variables may also be set:
``PCRE2_INCLUDE_DIR``
The directory containing ``pcre2.h``.
``PCRE2_LIBRARY``
The path to the PCRE2 library.
Hints
^^^^^
``PCRE2_ROOT_DIR``
The path to the root directory of a PCRE2 installation.
``PCRE2_ROOT_INCLUDE_DIRS``
The path to the include directory of a PCRE2 installation.
``PCRE2_ROOT_LIBRARY_DIRS``
The path to the library directory of a PCRE2 installation.
#]=======================================================================]#
include(FindPackageHandleStandardArgs)
find_package(PkgConfig QUIET)
pkg_check_modules(PC_PCRE2 QUIET pcre2)
find_path(PCRE2_INCLUDE_DIR
NAMES pcre2.h
HINTS
${PCRE2_ROOT_DIR}/include
${PCRE2_ROOT_INCLUDE_DIRS}
PATHS
${PC_PCRE2_INCLUDE_DIRS}
DOC "Specify the include directory containing pcre2.h"
)
find_library(PCRE2_LIBRARY
NAMES pcre2-8
HINTS
${PCRE2_ROOT_DIR}/lib
${PCRE2_ROOT_LIBRARY_DIRS}
PATHS
${PC_PCRE2_LIBRARY_DIRS}
DOC "Specify the lib directory containing pcre2"
)
set(PCRE2_VERSION ${PC_PCRE2_VERSION})
find_package_handle_standard_args(PCRE2
FOUND_VAR PCRE2_FOUND
REQUIRED_VARS
PCRE2_LIBRARY
PCRE2_INCLUDE_DIR
VERSION_VAR PCRE2_VERSION
)
if(PCRE2_FOUND)
set(PCRE2_LIBRARIES ${PCRE2_LIBRARY})
set(PCRE2_INCLUDE_DIRS ${PCRE2_INCLUDE_DIR})
set(PCRE2_DEFINITIONS ${PC_PCRE2_CFLAGS_OTHER})
endif()
if(PCRE2_FOUND AND NOT TARGET Pcre2::Pcre2)
add_library(Pcre2::Pcre2 UNKNOWN IMPORTED)
set_target_properties(Pcre2::Pcre2 PROPERTIES
IMPORTED_LOCATION "${PCRE2_LIBRARY}"
INTERFACE_COMPILE_OPTIONS "${PC_PCRE2_CFLAGS_OTHER}"
INTERFACE_INCLUDE_DIRECTORIES "${PCRE2_INCLUDE_DIR}"
)
endif()
mark_as_advanced(
PCRE2_INCLUDE_DIR
PCRE2_LIBRARY
)

View File

@ -39,21 +39,14 @@ if(WIN32)
endif()
endforeach()
endif(X64)
find_program(CMAKE_MC_COMPILER mc.exe HINTS "${sdk_bindir}" "${kit_bindir}" "${kit81_bindir}" ${kit10_bindir}
DOC "path to message compiler")
elseif ("${CMAKE_GENERATOR}" MATCHES "MSYS" OR "${CMAKE_GENERATOR}" MATCHES "^(CodeBlocks)?.*(MinGW)?.*")
get_filename_component(MINGW_BIN_PATH ${CMAKE_C_COMPILER} DIRECTORY REALPATH)
if(NOT IS_DIRECTORY ${MINGW_BIN_PATH})
get_filename_component(MINGW_BIN_PATH ${CMAKE_CXX_COMPILER} DIRECTORY REALPATH)
endif()
find_program(CMAKE_MC_COMPILER windmc.exe HINTS "${MINGW_BIN_PATH}"
DOC "path to message compiler")
endif()
if(NOT CMAKE_MC_COMPILER)
message(FATAL_ERROR "message compiler not found: required to build")
endif(NOT CMAKE_MC_COMPILER)
message(STATUS "Found message compiler: ${CMAKE_MC_COMPILER}")
mark_as_advanced(CMAKE_MC_COMPILER)
endif()
find_program(CMAKE_MC_COMPILER mc.exe HINTS "${sdk_bindir}" "${kit_bindir}" "${kit81_bindir}" ${kit10_bindir}
DOC "path to message compiler")
if(NOT CMAKE_MC_COMPILER)
message(FATAL_ERROR "message compiler not found: required to build")
endif(NOT CMAKE_MC_COMPILER)
message(STATUS "Found message compiler: ${CMAKE_MC_COMPILER}")
mark_as_advanced(CMAKE_MC_COMPILER)
endif(WIN32)
#===============================================================================
@ -240,7 +233,7 @@ configure_file("cmake/Poco${target_name}Config.cmake"
if(WIN32)
set(PocoConfigPackageLocation "cmake")
else()
set(PocoConfigPackageLocation "lib${LIB_SUFFIX}/cmake/${PROJECT_NAME}")
set(PocoConfigPackageLocation "${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}")
endif()
install(
@ -281,6 +274,7 @@ install(
LIBRARY DESTINATION lib${LIB_SUFFIX}
ARCHIVE DESTINATION lib${LIB_SUFFIX}
RUNTIME DESTINATION bin
BUNDLE DESTINATION bin
INCLUDES DESTINATION include
)

View File

@ -29,8 +29,8 @@ if(NOT EXISTS "${PROJECT_SOURCE_DIR}/openssl/build")
message(STATUS "Use internal OpenSSL binaries but ${PROJECT_SOURCE_DIR}/openssl/build doesn't exists. Try to checkout ...")
find_package(Git REQUIRED)
execute_process(
COMMAND ${GIT_EXECUTABLE} submodule update --init --recursive --remote openssl
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
COMMAND ${GIT_EXECUTABLE} submodule update --init --recursive --remote openssl
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
RESULT_VARIABLE EXITCODE)
if(NOT "${EXITCODE}" STREQUAL "0")
message(FATAL_ERROR "Checkout ${PROJECT_SOURCE_DIR}/openssl FAILED!")