Skip to content
This repository has been archived by the owner on Feb 29, 2024. It is now read-only.

Commit

Permalink
Core/Dep/Build: Multiple updates, read following patch notes.
Browse files Browse the repository at this point in the history
Patch notes:
 - MySQL Removal.
   Removal of MySQL from build effects windows users,
   it decreases the size and build time of the project,
   also wasn't needed to build the core,
   nor was the MySQL version compatible with MSVS.

 * Note: Windows users will now be required to download
   and install mysql server with headers and libraries.

 - Fixed MSVS strict build version.
   We require at least Visual Studio 2017 for windows builds.

 * NOTE - this is a strict build type.
   so everyone is on the same page with their building tools,
   now we all know what version of MSVS everyone is using
   when asking for assistance, less frustration on our side,
   and better help to those that would need it.

 - Updated .gitignore to filter out more useless
   files I keep seeing, we don't want that in our repo :)

 - Removed an old project name that was still lingering around.

 - Added location for new OpenSSL versions.

 ** Credits to Shauren and Trinity-Core for MySQL removal.

Signed-off-by: Bootz <bootz@projectskyfire.org>
  • Loading branch information
Bootz committed Jul 8, 2017
1 parent 9be9bff commit 5f6233e
Show file tree
Hide file tree
Showing 286 changed files with 25 additions and 198,740 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@

build*/
Win32*/
x64*/
.directory
.mailmap
*.orig
Expand Down
5 changes: 1 addition & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,7 @@ find_package(PCHSupport)
find_package(ACE REQUIRED)
find_package(OpenSSL REQUIRED)
find_package(Threads REQUIRED)

if( NOT USE_MYSQL_SOURCES )
find_package(MySQL REQUIRED)
endif()
find_package(MySQL REQUIRED)

if( UNIX )
find_package(Readline)
Expand Down
2 changes: 1 addition & 1 deletion cmake/compiler/msvc/settings.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ endif()
set(MSVC_EXPECTED_VERSION 18.0)

if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS MSVC_EXPECTED_VERSION)
message(FATAL_ERROR "MSVC: SkyFire requires version ${MSVC_EXPECTED_VERSION} (MSVC 2013) to build but found ${CMAKE_CXX_COMPILER_VERSION}")
message(FATAL_ERROR "MSVC: SkyFire requires version ${MSVC_EXPECTED_VERSION} (MSVC 2017) to build but found ${CMAKE_CXX_COMPILER_VERSION}")
endif()

# set up output paths ofr static libraries etc (commented out - shown here as an example only)
Expand Down
2 changes: 1 addition & 1 deletion cmake/macros/FindACE.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ if ( UNIX )
include(EnsureVersion)
ENSURE_VERSION( "${ACE_EXPECTED_VERSION}" "${ACE_VERSION}" ACE_FOUND)
if (NOT ACE_FOUND)
message(FATAL_ERROR "TrinityCore needs ACE version ${ACE_EXPECTED_VERSION} but found version ${ACE_VERSION}")
message(FATAL_ERROR "SkyFireEMU needs ACE version ${ACE_EXPECTED_VERSION} but found version ${ACE_VERSION}")
endif()

message( STATUS "Found ACE library: ${ACE_LIBRARY}")
Expand Down
3 changes: 2 additions & 1 deletion cmake/macros/FindOpenSSL.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ ELSE()
SET(_OPENSSL_ROOT_PATHS
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\OpenSSL (32-bit)_is1;InstallLocation]"
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\OpenSSL (32-bit)_is1;InstallLocation]"
"C:/OpenSSL-Win32/"
"C:/OpenSSL/"
)
ENDIF()
Expand Down Expand Up @@ -231,7 +232,7 @@ if (OPENSSL_INCLUDE_DIR)
include(EnsureVersion)
ENSURE_VERSION( "${OPENSSL_EXPECTED_VERSION}" "${OPENSSL_VERSION}" OPENSSL_VERSION_OK)
if (NOT OPENSSL_VERSION_OK)
message(FATAL_ERROR "TrinityCore needs OpenSSL version ${OPENSSL_EXPECTED_VERSION} but found version ${OPENSSL_VERSION}")
message(FATAL_ERROR "SkyFire needs OpenSSL version ${OPENSSL_EXPECTED_VERSION} but found version ${OPENSSL_VERSION}")
endif()
endif (OPENSSL_INCLUDE_DIR)

Expand Down
20 changes: 5 additions & 15 deletions cmake/platform/win/settings.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -9,26 +9,16 @@
# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

# Platform-specfic options
option(USE_MYSQL_SOURCES "Use included MySQL-sources to build libraries" 1)

# Package overloads
set(ACE_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/dep/acelite)
set(ACE_LIBRARY "ace")
set(BZIP2_LIBRARIES "bzip2")
set(ZLIB_LIBRARIES "zlib")

if((MSVC_VERSION EQUAL 1900) OR (MSVC_VERSION GREATER 1900))
set( USE_MYSQL_SOURCES 0 )
message(STATUS "MySQL: Disabled supplied MySQL sources")
endif((MSVC_VERSION EQUAL 1900) OR (MSVC_VERSION GREATER 1900))

if( USE_MYSQL_SOURCES )
set(MYSQL_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/dep/mysqllite/include)
set(MYSQL_LIBRARY "libmysql")
set( MYSQL_FOUND 1 )
message(STATUS "Using supplied MySQL sources")
endif()

# We require at least Visual Studio 15 2017(aka 14.0) which has version nr 1900.
IF(NOT FORCE_UNSUPPORTED_COMPILER AND MSVC_VERSION LESS 1900)
MESSAGE(FATAL_ERROR "Visual Studio 15 2017 or newer is required!")
ENDIF()

# check the CMake preload parameters (commented out by default)

Expand Down
3 changes: 0 additions & 3 deletions dep/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,6 @@ endif()

if(CMAKE_SYSTEM_NAME MATCHES "Windows")
add_subdirectory(acelite)
if(USE_MYSQL_SOURCES)
add_subdirectory(mysqllite)
endif()
if(TOOLS)
add_subdirectory(bzip2)
endif()
Expand Down
6 changes: 1 addition & 5 deletions dep/PackageList.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,7 @@ G3D (a commercial-grade C++ 3D engine available as Open Source (BSD License)
jemalloc (a general-purpose scalable concurrent malloc-implementation)
http://www.canonware.com/jemalloc/
Version: 3.3.1

MySQL (the world's most popular open source database software)
http://www.mysql.com/
Version: 5.5.9 (GA)


SFMT (SIMD-oriented Fast Mersenne Twister)
Based on http://agner.org/random/
Version: 2010-Aug-03
Expand Down
262 changes: 12 additions & 250 deletions dep/mysqllite/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,254 +8,16 @@
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

# Include the platform-specific file.
include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/os/Windows.cmake)

# Add macros
include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/character_sets.cmake)
include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/mysql_version.cmake)

# Advanced options (mostly useless, but usually still in config.h, so they need to be set...)
set(CYBOZU OFF)
set(BACKUP_TEST OFF)
set(ENABLED_LOCAL_INFILE ON)
set(WITH_FAST_MUTEXES OFF)

# Handle useful options - hardcode to ON/OFF
set(ENABLED_PROFILING OFF)
set_directory_properties(PROPERTIES COMPILE_DEFINITIONS_DEBUG ENABLED_DEBUG_SYNC)

# Set DBUG_OFF and other optional release-only flags for non-debug project types
foreach(BUILD_TYPE RELEASE RELWITHDEBINFO MINSIZEREL)
set_directory_properties(PROPERTIES COMPILE_DEFINITIONS_${BUILD_TYPE} DBUG_OFF)
if(WITH_FAST_MUTEXES)
set_directory_properties(PROPERTIES COMPILE_DEFINITIONS_${BUILD_TYPE} "MY_PTHREAD_FASTMUTEX=1")
endif()
endforeach()

# Set commonly used variables
set(DEFAULT_MYSQL_HOME "C:/Program Files/MySQL/MySQL Server ${MYSQL_BASE_VERSION}" )
set(SHAREDIR share)
set(DEFAULT_BASEDIR "${DEFAULT_MYSQL_HOME}")
set(MYSQL_DATADIR "${DEFAULT_MYSQL_HOME}/data")
set(DEFAULT_CHARSET_HOME "${DEFAULT_MYSQL_HOME}")
set(PLUGINDIR "${DEFAULT_MYSQL_HOME}/lib/plugin")

set(COMPILATION_COMMENT "Source distribution lite for TrinityCore")

# Run platform tests
include(${CMAKE_CURRENT_SOURCE_DIR}/configure.cmake)

# Use system openssl.
add_definitions(-DHAVE_OPENSSL)

include_directories(
${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_BINARY_DIR}
${OPENSSL_INCLUDE_DIR}
${CMAKE_SOURCE_DIR}/dep/zlib
${CMAKE_CURRENT_SOURCE_DIR}/include
${CMAKE_CURRENT_SOURCE_DIR}/include/internal
${CMAKE_CURRENT_SOURCE_DIR}/dbug
${CMAKE_CURRENT_SOURCE_DIR}/strings
${CMAKE_CURRENT_SOURCE_DIR}/mysys
${CMAKE_CURRENT_SOURCE_DIR}/libmysql
)

set(DBUG_SOURCES
${CMAKE_CURRENT_SOURCE_DIR}/dbug/dbug.c
)

set(STRINGS_SOURCES
${CMAKE_CURRENT_SOURCE_DIR}/strings/bchange.c
${CMAKE_CURRENT_SOURCE_DIR}/strings/bmove_upp.c
${CMAKE_CURRENT_SOURCE_DIR}/strings/ctype-big5.c
${CMAKE_CURRENT_SOURCE_DIR}/strings/ctype-bin.c
${CMAKE_CURRENT_SOURCE_DIR}/strings/ctype-cp932.c
${CMAKE_CURRENT_SOURCE_DIR}/strings/ctype-czech.c
${CMAKE_CURRENT_SOURCE_DIR}/strings/ctype-euc_kr.c
${CMAKE_CURRENT_SOURCE_DIR}/strings/ctype-extra.c
${CMAKE_CURRENT_SOURCE_DIR}/strings/ctype-gb2312.c
${CMAKE_CURRENT_SOURCE_DIR}/strings/ctype-gbk.c
${CMAKE_CURRENT_SOURCE_DIR}/strings/ctype-latin1.c
${CMAKE_CURRENT_SOURCE_DIR}/strings/ctype-mb.c
${CMAKE_CURRENT_SOURCE_DIR}/strings/ctype-simple.c
${CMAKE_CURRENT_SOURCE_DIR}/strings/ctype-tis620.c
${CMAKE_CURRENT_SOURCE_DIR}/strings/ctype-uca.c
${CMAKE_CURRENT_SOURCE_DIR}/strings/ctype-ucs2.c
${CMAKE_CURRENT_SOURCE_DIR}/strings/ctype-utf8.c
${CMAKE_CURRENT_SOURCE_DIR}/strings/ctype-win1250ch.c
${CMAKE_CURRENT_SOURCE_DIR}/strings/ctype.c
${CMAKE_CURRENT_SOURCE_DIR}/strings/decimal.c
${CMAKE_CURRENT_SOURCE_DIR}/strings/dtoa.c
${CMAKE_CURRENT_SOURCE_DIR}/strings/int2str.c
${CMAKE_CURRENT_SOURCE_DIR}/strings/is_prefix.c
${CMAKE_CURRENT_SOURCE_DIR}/strings/llstr.c
${CMAKE_CURRENT_SOURCE_DIR}/strings/longlong2str.c
${CMAKE_CURRENT_SOURCE_DIR}/strings/my_strtoll10.c
${CMAKE_CURRENT_SOURCE_DIR}/strings/my_vsnprintf.c
${CMAKE_CURRENT_SOURCE_DIR}/strings/str2int.c
${CMAKE_CURRENT_SOURCE_DIR}/strings/str_alloc.c
${CMAKE_CURRENT_SOURCE_DIR}/strings/strcend.c
${CMAKE_CURRENT_SOURCE_DIR}/strings/strend.c
${CMAKE_CURRENT_SOURCE_DIR}/strings/strfill.c
${CMAKE_CURRENT_SOURCE_DIR}/strings/strmake.c
${CMAKE_CURRENT_SOURCE_DIR}/strings/strmov.c
${CMAKE_CURRENT_SOURCE_DIR}/strings/strnmov.c
${CMAKE_CURRENT_SOURCE_DIR}/strings/strxmov.c
${CMAKE_CURRENT_SOURCE_DIR}/strings/strxnmov.c
${CMAKE_CURRENT_SOURCE_DIR}/strings/xml.c
${CMAKE_CURRENT_SOURCE_DIR}/strings/my_strchr.c
${CMAKE_CURRENT_SOURCE_DIR}/strings/strcont.c
${CMAKE_CURRENT_SOURCE_DIR}/strings/strappend.c
)
if(NOT HAVE_STRNLEN)
# OSX does not have strnlen
set(STRINGS_SOURCES ${STRINGS_SOURCES} ${CMAKE_CURRENT_SOURCE_DIR}/strings/strnlen.c)
endif()

set(VIO_SOURCES
${CMAKE_CURRENT_SOURCE_DIR}/vio/vio.c
${CMAKE_CURRENT_SOURCE_DIR}/vio/viosocket.c
${CMAKE_CURRENT_SOURCE_DIR}/vio/viossl.c
${CMAKE_CURRENT_SOURCE_DIR}/vio/viosslfactories.c
)

set(MYSYS_SOURCES
${CMAKE_CURRENT_SOURCE_DIR}/mysys/array.c
${CMAKE_CURRENT_SOURCE_DIR}/mysys/charset-def.c
${CMAKE_CURRENT_SOURCE_DIR}/mysys/charset.c
${CMAKE_CURRENT_SOURCE_DIR}/mysys/checksum.c
${CMAKE_CURRENT_SOURCE_DIR}/mysys/default.c
${CMAKE_CURRENT_SOURCE_DIR}/mysys/errors.c
${CMAKE_CURRENT_SOURCE_DIR}/mysys/hash.c
${CMAKE_CURRENT_SOURCE_DIR}/mysys/list.c
${CMAKE_CURRENT_SOURCE_DIR}/mysys/md5.c
${CMAKE_CURRENT_SOURCE_DIR}/mysys/mf_cache.c
${CMAKE_CURRENT_SOURCE_DIR}/mysys/mf_dirname.c
${CMAKE_CURRENT_SOURCE_DIR}/mysys/mf_fn_ext.c
${CMAKE_CURRENT_SOURCE_DIR}/mysys/mf_format.c
${CMAKE_CURRENT_SOURCE_DIR}/mysys/mf_getdate.c
${CMAKE_CURRENT_SOURCE_DIR}/mysys/mf_iocache.c
${CMAKE_CURRENT_SOURCE_DIR}/mysys/mf_iocache2.c
${CMAKE_CURRENT_SOURCE_DIR}/mysys/mf_keycache.c
${CMAKE_CURRENT_SOURCE_DIR}/mysys/mf_keycaches.c
${CMAKE_CURRENT_SOURCE_DIR}/mysys/mf_loadpath.c
${CMAKE_CURRENT_SOURCE_DIR}/mysys/mf_pack.c
${CMAKE_CURRENT_SOURCE_DIR}/mysys/mf_path.c
${CMAKE_CURRENT_SOURCE_DIR}/mysys/mf_qsort.c
${CMAKE_CURRENT_SOURCE_DIR}/mysys/mf_qsort2.c
${CMAKE_CURRENT_SOURCE_DIR}/mysys/mf_radix.c
${CMAKE_CURRENT_SOURCE_DIR}/mysys/mf_same.c
${CMAKE_CURRENT_SOURCE_DIR}/mysys/mf_sort.c
${CMAKE_CURRENT_SOURCE_DIR}/mysys/mf_soundex.c
${CMAKE_CURRENT_SOURCE_DIR}/mysys/mf_arr_appstr.c
${CMAKE_CURRENT_SOURCE_DIR}/mysys/mf_tempdir.c
${CMAKE_CURRENT_SOURCE_DIR}/mysys/mf_tempfile.c
${CMAKE_CURRENT_SOURCE_DIR}/mysys/mf_unixpath.c
${CMAKE_CURRENT_SOURCE_DIR}/mysys/mf_wcomp.c
${CMAKE_CURRENT_SOURCE_DIR}/mysys/mulalloc.c
${CMAKE_CURRENT_SOURCE_DIR}/mysys/my_access.c
${CMAKE_CURRENT_SOURCE_DIR}/mysys/my_aes.c
${CMAKE_CURRENT_SOURCE_DIR}/mysys/my_alloc.c
${CMAKE_CURRENT_SOURCE_DIR}/mysys/my_bit.c
${CMAKE_CURRENT_SOURCE_DIR}/mysys/my_bitmap.c
${CMAKE_CURRENT_SOURCE_DIR}/mysys/my_chsize.c
${CMAKE_CURRENT_SOURCE_DIR}/mysys/my_compress.c
${CMAKE_CURRENT_SOURCE_DIR}/mysys/my_copy.c
${CMAKE_CURRENT_SOURCE_DIR}/mysys/my_create.c
${CMAKE_CURRENT_SOURCE_DIR}/mysys/my_delete.c
${CMAKE_CURRENT_SOURCE_DIR}/mysys/my_div.c
${CMAKE_CURRENT_SOURCE_DIR}/mysys/my_error.c
${CMAKE_CURRENT_SOURCE_DIR}/mysys/my_file.c
${CMAKE_CURRENT_SOURCE_DIR}/mysys/my_fopen.c
${CMAKE_CURRENT_SOURCE_DIR}/mysys/my_fstream.c
${CMAKE_CURRENT_SOURCE_DIR}/mysys/my_gethostbyname.c
${CMAKE_CURRENT_SOURCE_DIR}/mysys/my_gethwaddr.c
${CMAKE_CURRENT_SOURCE_DIR}/mysys/my_getopt.c
${CMAKE_CURRENT_SOURCE_DIR}/mysys/my_getsystime.c
${CMAKE_CURRENT_SOURCE_DIR}/mysys/my_getwd.c
${CMAKE_CURRENT_SOURCE_DIR}/mysys/my_handler.c
${CMAKE_CURRENT_SOURCE_DIR}/mysys/my_init.c
${CMAKE_CURRENT_SOURCE_DIR}/mysys/my_lib.c
${CMAKE_CURRENT_SOURCE_DIR}/mysys/my_lock.c
${CMAKE_CURRENT_SOURCE_DIR}/mysys/my_malloc.c
${CMAKE_CURRENT_SOURCE_DIR}/mysys/my_mess.c
${CMAKE_CURRENT_SOURCE_DIR}/mysys/my_mkdir.c
${CMAKE_CURRENT_SOURCE_DIR}/mysys/my_mmap.c
${CMAKE_CURRENT_SOURCE_DIR}/mysys/my_once.c
${CMAKE_CURRENT_SOURCE_DIR}/mysys/my_open.c
${CMAKE_CURRENT_SOURCE_DIR}/mysys/my_pread.c
${CMAKE_CURRENT_SOURCE_DIR}/mysys/my_pthread.c
${CMAKE_CURRENT_SOURCE_DIR}/mysys/my_quick.c
${CMAKE_CURRENT_SOURCE_DIR}/mysys/my_read.c
${CMAKE_CURRENT_SOURCE_DIR}/mysys/my_redel.c
${CMAKE_CURRENT_SOURCE_DIR}/mysys/my_rename.c
${CMAKE_CURRENT_SOURCE_DIR}/mysys/my_seek.c
${CMAKE_CURRENT_SOURCE_DIR}/mysys/my_sleep.c
${CMAKE_CURRENT_SOURCE_DIR}/mysys/my_static.c
${CMAKE_CURRENT_SOURCE_DIR}/mysys/my_symlink.c
${CMAKE_CURRENT_SOURCE_DIR}/mysys/my_symlink2.c
${CMAKE_CURRENT_SOURCE_DIR}/mysys/my_sync.c
${CMAKE_CURRENT_SOURCE_DIR}/mysys/my_thr_init.c
${CMAKE_CURRENT_SOURCE_DIR}/mysys/my_write.c
${CMAKE_CURRENT_SOURCE_DIR}/mysys/ptr_cmp.c
${CMAKE_CURRENT_SOURCE_DIR}/mysys/queues.c
${CMAKE_CURRENT_SOURCE_DIR}/mysys/stacktrace.c
${CMAKE_CURRENT_SOURCE_DIR}/mysys/rijndael.c
${CMAKE_CURRENT_SOURCE_DIR}/mysys/sha1.c
${CMAKE_CURRENT_SOURCE_DIR}/mysys/string.c
${CMAKE_CURRENT_SOURCE_DIR}/mysys/thr_alarm.c
${CMAKE_CURRENT_SOURCE_DIR}/mysys/thr_lock.c
${CMAKE_CURRENT_SOURCE_DIR}/mysys/thr_mutex.c
${CMAKE_CURRENT_SOURCE_DIR}/mysys/thr_rwlock.c
${CMAKE_CURRENT_SOURCE_DIR}/mysys/tree.c
${CMAKE_CURRENT_SOURCE_DIR}/mysys/typelib.c
${CMAKE_CURRENT_SOURCE_DIR}/mysys/base64.c
${CMAKE_CURRENT_SOURCE_DIR}/mysys/my_memmem.c
${CMAKE_CURRENT_SOURCE_DIR}/mysys/my_getpagesize.c
${CMAKE_CURRENT_SOURCE_DIR}/mysys/lf_alloc-pin.c
${CMAKE_CURRENT_SOURCE_DIR}/mysys/lf_dynarray.c
${CMAKE_CURRENT_SOURCE_DIR}/mysys/lf_hash.c
${CMAKE_CURRENT_SOURCE_DIR}/mysys/my_atomic.c
${CMAKE_CURRENT_SOURCE_DIR}/mysys/my_getncpus.c
${CMAKE_CURRENT_SOURCE_DIR}/mysys/my_rdtsc.c
${CMAKE_CURRENT_SOURCE_DIR}/mysys/my_winthread.c
${CMAKE_CURRENT_SOURCE_DIR}/mysys/my_wincond.c
${CMAKE_CURRENT_SOURCE_DIR}/mysys/my_winerr.c
${CMAKE_CURRENT_SOURCE_DIR}/mysys/my_winfile.c
${CMAKE_CURRENT_SOURCE_DIR}/mysys/my_windac.c
${CMAKE_CURRENT_SOURCE_DIR}/mysys/my_conio.c
)
if(HAVE_ALARM)
set(MYSYS_SOURCES ${MYSYS_SOURCES} ${CMAKE_CURRENT_SOURCE_DIR}/mysys/my_alarm.c)
endif()
if(HAVE_LARGE_PAGES)
set(MYSYS_SOURCES ${MYSYS_SOURCES} ${CMAKE_CURRENT_SOURCE_DIR}/mysys/my_largepage.c)
endif()
if(HAVE_MLOCK)
set(MYSYS_SOURCES ${MYSYS_SOURCES} ${CMAKE_CURRENT_SOURCE_DIR}/mysys/my_lockmem.c)
endif()

set(CLIENT_SOURCES
${CMAKE_CURRENT_SOURCE_DIR}/libmysql/get_password.c
${CMAKE_CURRENT_SOURCE_DIR}/libmysql/libmysql.c
${CMAKE_CURRENT_SOURCE_DIR}/libmysql/errmsg.c
${CMAKE_CURRENT_SOURCE_DIR}/sql-common/client.c
${CMAKE_CURRENT_SOURCE_DIR}/sql-common/my_time.c
${CMAKE_CURRENT_SOURCE_DIR}/sql-common/client_plugin.c
${CMAKE_CURRENT_SOURCE_DIR}/sql/net_serv.cc
${CMAKE_CURRENT_SOURCE_DIR}/sql-common/pack.c
${CMAKE_CURRENT_SOURCE_DIR}/sql/password.c
)

configure_file(config.h.cmake ${CMAKE_BINARY_DIR}/my_config.h)
configure_file(config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config.h)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/include/internal/mysql_version.h.in ${CMAKE_BINARY_DIR}/mysql_version.h)

add_version_info(libmysql CLIENT_SOURCES)
add_library(libmysql SHARED ${CLIENT_SOURCES} ${DBUG_SOURCES} ${MYSYS_SOURCES} ${STRINGS_SOURCES} ${VIO_SOURCES} ${CMAKE_CURRENT_SOURCE_DIR}/libmysql/libmysql_exports.def)
target_link_libraries(libmysql zlib ${OPENSSL_LIBRARIES} ${OPENSSL_EXTRA_LIBRARIES} ws2_32)

install(TARGETS libmysql RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}")
if (NOT MYSQL_FOUND)
message(FATAL_ERROR "MySQL wasn't found on your system but it's required to build the servers!")
endif()

add_library(mysql STATIC IMPORTED GLOBAL)

set_target_properties(mysql
PROPERTIES
IMPORTED_LOCATION
"${MYSQL_LIBRARY}"
INTERFACE_INCLUDE_DIRECTORIES
"${MYSQL_INCLUDE_DIR}")
Loading

1 comment on commit 5f6233e

@Bootz
Copy link
Contributor Author

@Bootz Bootz commented on 5f6233e Feb 12, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Important notice
Non-Visual Studio users, might need boost to build oracle's mysql package,
this was just relayed to me...
the build process for this library is handled outside of our project,
please take the steps required for building their package (wiki, build installation is provided by sources)
check our package list for there site links.

Please sign in to comment.