windows compiler, mysql depends ssl

This commit is contained in:
ruanshudong 2020-02-25 21:00:54 +08:00
parent cbaa99c283
commit 9062f061cc
5 changed files with 32 additions and 5400 deletions

View File

@ -42,6 +42,7 @@ add_custom_target(thirdparty)
include(ExternalProject)
if(TARS_PROTOBUF)
set(PROTOBUF_DIR_INC "${THIRDPARTY_PATH}/protobuf-lib/src")
set(PROTOBUF_DIR_LIB "${THIRDPARTY_PATH}/protobuf-lib")
@ -64,7 +65,7 @@ if(TARS_PROTOBUF)
BUILD_COMMAND make -j4 libprotoc
LOG_CONFIGURE 1
LOG_BUILD 1
INSTALL_COMMAND ${CMAKE_COMMAND} -E echo "install"
INSTALL_COMMAND cmake -E echo "install"
URL_MD5 fb59398329002c98d4d92238324c4187
)
@ -79,6 +80,7 @@ if(TARS_SSL)
include_directories(${SSL_DIR_INC})
link_directories(${SSL_DIR_LIB})
if(WIN32)
set(LIB_SSL "libssl")
set(LIB_CRYPTO "libcrypto")
@ -94,7 +96,7 @@ if(TARS_SSL)
BUILD_COMMAND nmake
LOG_CONFIGURE 1
LOG_BUILD 1
INSTALL_COMMAND nmake install
INSTALL_COMMAND cmake -P ${RUN_SSL_INSTALL_FILE}
URL_MD5 3be209000dbc7e1b95bcdf47980a3baa
)
@ -119,6 +121,13 @@ if(TARS_SSL)
endif()
SET(RUN_SSL_INSTALL_FILE "${PROJECT_BINARY_DIR}/run-ssl-install.cmake")
FILE(WRITE ${RUN_SSL_INSTALL_FILE} "EXECUTE_PROCESS(COMMAND cmake -E make_directory ${CMAKE_BINARY_DIR}/src/openssl)\n")
FILE(APPEND ${RUN_SSL_INSTALL_FILE} "EXECUTE_PROCESS(COMMAND cmake -E make_directory ${CMAKE_BINARY_DIR}/src/openssl/lib)\n")
FILE(APPEND ${RUN_SSL_INSTALL_FILE} "EXECUTE_PROCESS(COMMAND cmake -E copy ${CMAKE_BINARY_DIR}/src/openssl-lib/${LIB_SSL}.lib ${CMAKE_BINARY_DIR}/src/openssl/lib)\n")
FILE(APPEND ${RUN_SSL_INSTALL_FILE} "EXECUTE_PROCESS(COMMAND cmake -E copy ${CMAKE_BINARY_DIR}/src/openssl-lib/${LIB_CRYPTO}.lib ${CMAKE_BINARY_DIR}/src/openssl/lib)\n")
FILE(APPEND ${RUN_SSL_INSTALL_FILE} "EXECUTE_PROCESS(COMMAND cmake -E copy ${CMAKE_BINARY_DIR}/src/openssl-lib/include/openssl ${CMAKE_BINARY_DIR}/src/openssl)\n")
INSTALL(DIRECTORY ${CMAKE_BINARY_DIR}/src/openssl DESTINATION include)
add_dependencies(thirdparty ADD_${LIB_SSL})
@ -132,6 +141,13 @@ if(TARS_MYSQL)
if(WIN32)
set(LIB_MYSQL "libmysql")
SET(RUN_MYSQL_INSTALL_FILE "${PROJECT_BINARY_DIR}/run-mysql-install.cmake")
FILE(WRITE ${RUN_MYSQL_INSTALL_FILE} "EXECUTE_PROCESS(COMMAND cmake -E make_directory ${CMAKE_BINARY_DIR}/src/mysql)\n")
FILE(APPEND ${RUN_MYSQL_INSTALL_FILE} "EXECUTE_PROCESS(COMMAND cmake -E make_directory ${CMAKE_BINARY_DIR}/src/mysql/lib)\n")
FILE(APPEND ${RUN_MYSQL_INSTALL_FILE} "EXECUTE_PROCESS(COMMAND cmake -E copy ${CMAKE_BINARY_DIR}/src/mysql-lib/libmysql/${LIB_MYSQL}.dll ${CMAKE_BINARY_DIR}/src/mysql/lib)\n")
FILE(APPEND ${RUN_MYSQL_INSTALL_FILE} "EXECUTE_PROCESS(COMMAND cmake -E copy ${CMAKE_BINARY_DIR}/src/mysql-lib/libmysql/${LIB_MYSQL}.lib ${CMAKE_BINARY_DIR}/src/mysql/lib)\n")
FILE(APPEND ${RUN_MYSQL_INSTALL_FILE} "EXECUTE_PROCESS(COMMAND cmake -E copy ${CMAKE_BINARY_DIR}/src/mysql-lib/include ${CMAKE_BINARY_DIR}/src/mysql)\n")
ExternalProject_Add(ADD_${LIB_MYSQL}
URL http://cdn.tarsyun.com/src/mysql-5.6.46.zip
DEPENDS ADD_${LIB_SSL}
@ -143,12 +159,19 @@ if(TARS_MYSQL)
BUILD_COMMAND cmake --build . --config ${CMAKE_BUILD_TYPE} --target mysqlclient
LOG_CONFIGURE 1
LOG_BUILD 1
INSTALL_COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/src/mysql-lib/include ${CMAKE_BINARY_DIR}/src/mysql
# INSTALL_COMMAND ${CMAKE_COMMAND} -E copy ${LIB_MYSQL}.dll ${CMAKE_BINARY_DIR}/src/mysql/lib
INSTALL_COMMAND cmake -P ${RUN_MYSQL_INSTALL_FILE}
URL_MD5 851be8973981979041ad422f7e5f693a
)
else()
set(LIB_MYSQL "mysqlclient")
SET(RUN_MYSQL_INSTALL_FILE "${PROJECT_BINARY_DIR}/run-mysql-install.cmake")
FILE(WRITE ${RUN_MYSQL_INSTALL_FILE} "EXECUTE_PROCESS(COMMAND cmake -E make_directory ${CMAKE_BINARY_DIR}/src/mysql)\n")
FILE(APPEND ${RUN_MYSQL_INSTALL_FILE} "EXECUTE_PROCESS(COMMAND cmake -E make_directory ${CMAKE_BINARY_DIR}/src/mysql/lib)\n")
FILE(APPEND ${RUN_MYSQL_INSTALL_FILE} "EXECUTE_PROCESS(COMMAND cmake -E copy ${CMAKE_BINARY_DIR}/src/mysql-lib/libmysql/lib${LIB_MYSQL}.dll ${CMAKE_BINARY_DIR}/src/mysql/lib)\n")
FILE(APPEND ${RUN_MYSQL_INSTALL_FILE} "EXECUTE_PROCESS(COMMAND cmake -E copy ${CMAKE_BINARY_DIR}/src/mysql-lib/libmysql/lib${LIB_MYSQL}.lib ${CMAKE_BINARY_DIR}/src/mysql/lib)\n")
FILE(APPEND ${RUN_MYSQL_INSTALL_FILE} "EXECUTE_PROCESS(COMMAND cmake -E copy ${CMAKE_BINARY_DIR}/src/mysql-lib/include ${CMAKE_BINARY_DIR}/src/mysql)\n")
ExternalProject_Add(ADD_${LIB_MYSQL}
URL http://cdn.tarsyun.com/src/mysql-5.6.26.tar.gz
PREFIX ${CMAKE_BINARY_DIR}
@ -159,12 +182,13 @@ if(TARS_MYSQL)
BUILD_COMMAND make mysqlclient
LOG_CONFIGURE 1
LOG_BUILD 1
INSTALL_COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/src/mysql-lib/include/mysql ${CMAKE_BINARY_DIR}/src/mysql
INSTALL_COMMAND cmake -E copy ${CMAKE_BINARY_DIR}/src/mysql-lib/include/mysql ${CMAKE_BINARY_DIR}/src/mysql
URL_MD5 c537c08c1276abc79d76e8e562bbcea5
#URL_MD5 9d225528742c882d5b1e4a40b0877690
)
endif()
INSTALL(DIRECTORY ${CMAKE_BINARY_DIR}/src/mysql-lib/include/mysql DESTINATION include)
if(WIN32)
INSTALL(FILES ${CMAKE_BINARY_DIR}/src/mysql-lib/libmysql/${LIB_MYSQL}.dll DESTINATION lib)
@ -212,7 +236,7 @@ if(TARS_HTTP2)
LOG_BUILD 1
LOG_CONFIGURE 1
BUILD_COMMAND make
INSTALL_COMMAND ${CMAKE_COMMAND} -E echo "install"
INSTALL_COMMAND cmake -E echo "install"
URL_MD5 5df375bbd532fcaa7cd4044b54b1188d
)
endif()

@ -1 +1 @@
Subproject commit 7c22d46777d76c8c08c2161f7cb4d9f0f45991d7
Subproject commit b84624baa43088b77e7bb016bc833027a6d9f219

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,97 +0,0 @@
/* A Bison parser, made by GNU Bison 3.2.2. */
/* Bison interface for Yacc-like parsers in C
Copyright (C) 1984, 1989-1990, 2000-2015, 2018 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
/* As a special exception, you may create a larger work that contains
part or all of the Bison parser skeleton and distribute that work
under terms of your choice, so long as that work isn't itself a
parser generator using the skeleton or a modified version thereof
as a parser skeleton. Alternatively, if you modify or redistribute
the parser skeleton itself, you may (at your option) remove this
special exception, which will cause the skeleton and the resulting
Bison output files to be licensed under the GNU General Public
License without this special exception.
This special exception was added by the Free Software Foundation in
version 2.2 of Bison. */
/* Undocumented macros, especially those whose name start with YY_,
are private implementation details. Do not rely on them. */
#ifndef YY_YY_TARS_TAB_HPP_INCLUDED
# define YY_YY_TARS_TAB_HPP_INCLUDED
/* Debug traces. */
#ifndef YYDEBUG
# define YYDEBUG 1
#endif
#if YYDEBUG
extern int yydebug;
#endif
/* Token type. */
#ifndef YYTOKENTYPE
# define YYTOKENTYPE
enum yytokentype
{
TARS_VOID = 258,
TARS_STRUCT = 259,
TARS_BOOL = 260,
TARS_BYTE = 261,
TARS_SHORT = 262,
TARS_INT = 263,
TARS_DOUBLE = 264,
TARS_FLOAT = 265,
TARS_LONG = 266,
TARS_STRING = 267,
TARS_VECTOR = 268,
TARS_MAP = 269,
TARS_NAMESPACE = 270,
TARS_INTERFACE = 271,
TARS_IDENTIFIER = 272,
TARS_OUT = 273,
TARS_OP = 274,
TARS_KEY = 275,
TARS_ROUTE_KEY = 276,
TARS_REQUIRE = 277,
TARS_OPTIONAL = 278,
TARS_CONST_INTEGER = 279,
TARS_CONST_FLOAT = 280,
TARS_FALSE = 281,
TARS_TRUE = 282,
TARS_STRING_LITERAL = 283,
TARS_SCOPE_DELIMITER = 284,
TARS_CONST = 285,
TARS_ENUM = 286,
TARS_UNSIGNED = 287,
BAD_CHAR = 288
};
#endif
/* Value type. */
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
typedef int YYSTYPE;
# define YYSTYPE_IS_TRIVIAL 1
# define YYSTYPE_IS_DECLARED 1
#endif
extern YYSTYPE yylval;
int yyparse (void);
#endif /* !YY_YY_TARS_TAB_HPP_INCLUDED */