2022-01-17 11:46:33 +00:00
cmake_minimum_required ( VERSION 3.14 )
2021-12-05 17:54:36 +00:00
project ( Darkflame )
2022-01-03 15:00:21 +00:00
include ( CTest )
2021-12-05 17:54:36 +00:00
# Read variables from file
FILE ( READ "${CMAKE_SOURCE_DIR}/CMakeVariables.txt" variables )
string ( REPLACE "\\\n" "" variables ${ variables } )
string ( REPLACE "\n" ";" variables ${ variables } )
# Set the cmake variables, formatted as "VARIABLE #" in variables
foreach ( variable ${ variables } )
# If the string contains a #, skip it
if ( "${variable}" MATCHES "#" )
continue ( )
endif ( )
# Split the variable into name and value
string ( REPLACE "=" ";" variable ${ variable } )
# Check that the length of the variable is 2 (name and value)
list ( LENGTH variable length )
if ( NOT ${ length } EQUAL 2 )
continue ( )
endif ( )
list ( GET variable 0 variable_name )
list ( GET variable 1 variable_value )
# Set the variable
set ( ${ variable_name } ${ variable_value } )
# Add compiler definition
set ( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D${variable_name}=${variable_value}" )
message ( STATUS "Variable: ${variable_name} = ${variable_value}" )
endforeach ( )
# On windows it's better to build this from source, as there's no way FindZLIB is gonna find it
if ( NOT WIN32 )
find_package ( ZLIB REQUIRED )
endif ( )
# Fetch External (Non-Submodule) Libraries
if ( WIN32 )
include ( FetchContent )
FetchContent_Declare (
z l i b
2022-02-12 17:43:34 +00:00
U R L h t t p s : / / g i t h u b . c o m / m a d l e r / z l i b / a r c h i v e / r e f s / t a g s / v 1 . 2 . 1 1 . z i p
2021-12-05 17:54:36 +00:00
U R L _ H A S H M D 5 = 9 d 6 a 6 2 7 6 9 3 1 6 3 b b b f 3 f 2 6 4 0 3 a 3 a 0 b 0 b 1
)
FetchContent_MakeAvailable ( zlib )
set ( ZLIB_INCLUDE_DIRS ${ zlib_SOURCE_DIR } ${ zlib_BINARY_DIR } )
set_target_properties ( zlib PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${ZLIB_INCLUDE_DIRS}" ) # Why?
add_library ( ZLIB::ZLIB ALIAS zlib ) # You're welcome
endif ( WIN32 )
Add Aarch64 support (#231)
* added mariadb-connector-cpp submodule
* raknet aarch64 support
* fix compile errors
* mariadb connector swap (in progress)
* update CMakeLists, add preprocessor definition to switch between mysql and mariadb connectors
* update types with missing aarch64 check
* corrected adding extra flag to properly compile mariadbconn in CMakeLists
* updated readme with arm builds section
* fix build failure if test folder does not exist
* Remove mysql connector from all builds, add mariadbconnector to windows build
* readd Linux check for backtrace lib to CMakeLists.txt
* Separate system specific mariadbconncpp extra compile flags
* Copy dlls to exes directory once built
* fetch prebuilt binaries on windows so that ClangCL can be used
* Delay load dll so that plugin directory is set correctly
* Fixed typo in glibcxx compile flag
* whitespacing, spaces -> tabs
* Updated README.md, included instructions to update
* Updated README.md
added libssl-dev requirement and removed mysql connector references from macOS builds section
* apple compile fixes for zlib and shared library name
* add windows arm64 checks to raknet
* remove extra . in shared library location
* Setup plugins directory for the connector to search in, pass openssl_root_dir on for apple
* Fix copy paths for single config generators and non windows
* change plugin folder location, another single config generator fix
* GENERATOR_IS_MULTI_CONFIG is a property not a variable
* Fixed a few errors after merge
* Fix plugin directory path, force windows to look at the right folder
* fixed directory name for make_directory command
* Update README.md
Updated MacOS, Windows build instructions.
* set INSTALL_PLUGINDIR so that the right directory is used
* Support for relative rpath for docker build
* added mariadb-connector-cpp submodule
* raknet aarch64 support
* fix compile errors
* mariadb connector swap (in progress)
* update CMakeLists, add preprocessor definition to switch between mysql and mariadb connectors
* update types with missing aarch64 check
* corrected adding extra flag to properly compile mariadbconn in CMakeLists
* updated readme with arm builds section
* fix build failure if test folder does not exist
* Remove mysql connector from all builds, add mariadbconnector to windows build
* readd Linux check for backtrace lib to CMakeLists.txt
* Separate system specific mariadbconncpp extra compile flags
* Copy dlls to exes directory once built
* fetch prebuilt binaries on windows so that ClangCL can be used
* Delay load dll so that plugin directory is set correctly
* Fixed typo in glibcxx compile flag
* whitespacing, spaces -> tabs
* Updated README.md, included instructions to update
* Updated README.md
added libssl-dev requirement and removed mysql connector references from macOS builds section
* apple compile fixes for zlib and shared library name
* add windows arm64 checks to raknet
* Setup plugins directory for the connector to search in, pass openssl_root_dir on for apple
* Fix copy paths for single config generators and non windows
* change plugin folder location, another single config generator fix
* GENERATOR_IS_MULTI_CONFIG is a property not a variable
* Fixed a few errors after merge
* Fix plugin directory path, force windows to look at the right folder
* fixed directory name for make_directory command
* Update README.md
Updated MacOS, Windows build instructions.
* set INSTALL_PLUGINDIR so that the right directory is used
* Support for relative rpath for docker build
* Rebase on main
* Remove extra git submodule
* Update CMakeLists.txt
* Remove CMakeLists.txt file from mariadb
Remove the CMakeLists.txt file from the mariaDBConnector so we dont build the tests. Also add a config option to the CMakeVariables.txt so you can build the connector with multiple jobs
* Compile on windows
Specify the mariadbcpp.dll file location with a defined absolute path so windows knows it actually exists.
* default to 1 job
Default mariadb jobs running in parallel to 1 instead of 4
* Move mariadbcpp.dll file to the expected directory on windows
* Changed plugin
Updated the plugin location from the project binary directory to the expected location, the mariadb binary directory.
* Addressed windows dll issues by moving files to the expected directory instead of a directory that wouldnt get created
* Update README
Co-authored-by: Aaron Kimbrell <aronwk.aaron@gmail.com>
Co-authored-by: EmosewaMC <39972741+EmosewaMC@users.noreply.github.com>
2022-07-04 04:33:05 +00:00
if ( UNIX AND NOT APPLE )
include ( FetchContent )
if ( __include_backtrace__ AND __compile_backtrace__ )
FetchContent_Declare (
b a c k t r a c e
G I T _ R E P O S I T O R Y h t t p s : / / g i t h u b . c o m / i a n l a n c e t a y l o r / l i b b a c k t r a c e . g i t
)
2021-12-05 17:54:36 +00:00
Add Aarch64 support (#231)
* added mariadb-connector-cpp submodule
* raknet aarch64 support
* fix compile errors
* mariadb connector swap (in progress)
* update CMakeLists, add preprocessor definition to switch between mysql and mariadb connectors
* update types with missing aarch64 check
* corrected adding extra flag to properly compile mariadbconn in CMakeLists
* updated readme with arm builds section
* fix build failure if test folder does not exist
* Remove mysql connector from all builds, add mariadbconnector to windows build
* readd Linux check for backtrace lib to CMakeLists.txt
* Separate system specific mariadbconncpp extra compile flags
* Copy dlls to exes directory once built
* fetch prebuilt binaries on windows so that ClangCL can be used
* Delay load dll so that plugin directory is set correctly
* Fixed typo in glibcxx compile flag
* whitespacing, spaces -> tabs
* Updated README.md, included instructions to update
* Updated README.md
added libssl-dev requirement and removed mysql connector references from macOS builds section
* apple compile fixes for zlib and shared library name
* add windows arm64 checks to raknet
* remove extra . in shared library location
* Setup plugins directory for the connector to search in, pass openssl_root_dir on for apple
* Fix copy paths for single config generators and non windows
* change plugin folder location, another single config generator fix
* GENERATOR_IS_MULTI_CONFIG is a property not a variable
* Fixed a few errors after merge
* Fix plugin directory path, force windows to look at the right folder
* fixed directory name for make_directory command
* Update README.md
Updated MacOS, Windows build instructions.
* set INSTALL_PLUGINDIR so that the right directory is used
* Support for relative rpath for docker build
* added mariadb-connector-cpp submodule
* raknet aarch64 support
* fix compile errors
* mariadb connector swap (in progress)
* update CMakeLists, add preprocessor definition to switch between mysql and mariadb connectors
* update types with missing aarch64 check
* corrected adding extra flag to properly compile mariadbconn in CMakeLists
* updated readme with arm builds section
* fix build failure if test folder does not exist
* Remove mysql connector from all builds, add mariadbconnector to windows build
* readd Linux check for backtrace lib to CMakeLists.txt
* Separate system specific mariadbconncpp extra compile flags
* Copy dlls to exes directory once built
* fetch prebuilt binaries on windows so that ClangCL can be used
* Delay load dll so that plugin directory is set correctly
* Fixed typo in glibcxx compile flag
* whitespacing, spaces -> tabs
* Updated README.md, included instructions to update
* Updated README.md
added libssl-dev requirement and removed mysql connector references from macOS builds section
* apple compile fixes for zlib and shared library name
* add windows arm64 checks to raknet
* Setup plugins directory for the connector to search in, pass openssl_root_dir on for apple
* Fix copy paths for single config generators and non windows
* change plugin folder location, another single config generator fix
* GENERATOR_IS_MULTI_CONFIG is a property not a variable
* Fixed a few errors after merge
* Fix plugin directory path, force windows to look at the right folder
* fixed directory name for make_directory command
* Update README.md
Updated MacOS, Windows build instructions.
* set INSTALL_PLUGINDIR so that the right directory is used
* Support for relative rpath for docker build
* Rebase on main
* Remove extra git submodule
* Update CMakeLists.txt
* Remove CMakeLists.txt file from mariadb
Remove the CMakeLists.txt file from the mariaDBConnector so we dont build the tests. Also add a config option to the CMakeVariables.txt so you can build the connector with multiple jobs
* Compile on windows
Specify the mariadbcpp.dll file location with a defined absolute path so windows knows it actually exists.
* default to 1 job
Default mariadb jobs running in parallel to 1 instead of 4
* Move mariadbcpp.dll file to the expected directory on windows
* Changed plugin
Updated the plugin location from the project binary directory to the expected location, the mariadb binary directory.
* Addressed windows dll issues by moving files to the expected directory instead of a directory that wouldnt get created
* Update README
Co-authored-by: Aaron Kimbrell <aronwk.aaron@gmail.com>
Co-authored-by: EmosewaMC <39972741+EmosewaMC@users.noreply.github.com>
2022-07-04 04:33:05 +00:00
FetchContent_MakeAvailable ( backtrace )
2021-12-05 17:54:36 +00:00
Add Aarch64 support (#231)
* added mariadb-connector-cpp submodule
* raknet aarch64 support
* fix compile errors
* mariadb connector swap (in progress)
* update CMakeLists, add preprocessor definition to switch between mysql and mariadb connectors
* update types with missing aarch64 check
* corrected adding extra flag to properly compile mariadbconn in CMakeLists
* updated readme with arm builds section
* fix build failure if test folder does not exist
* Remove mysql connector from all builds, add mariadbconnector to windows build
* readd Linux check for backtrace lib to CMakeLists.txt
* Separate system specific mariadbconncpp extra compile flags
* Copy dlls to exes directory once built
* fetch prebuilt binaries on windows so that ClangCL can be used
* Delay load dll so that plugin directory is set correctly
* Fixed typo in glibcxx compile flag
* whitespacing, spaces -> tabs
* Updated README.md, included instructions to update
* Updated README.md
added libssl-dev requirement and removed mysql connector references from macOS builds section
* apple compile fixes for zlib and shared library name
* add windows arm64 checks to raknet
* remove extra . in shared library location
* Setup plugins directory for the connector to search in, pass openssl_root_dir on for apple
* Fix copy paths for single config generators and non windows
* change plugin folder location, another single config generator fix
* GENERATOR_IS_MULTI_CONFIG is a property not a variable
* Fixed a few errors after merge
* Fix plugin directory path, force windows to look at the right folder
* fixed directory name for make_directory command
* Update README.md
Updated MacOS, Windows build instructions.
* set INSTALL_PLUGINDIR so that the right directory is used
* Support for relative rpath for docker build
* added mariadb-connector-cpp submodule
* raknet aarch64 support
* fix compile errors
* mariadb connector swap (in progress)
* update CMakeLists, add preprocessor definition to switch between mysql and mariadb connectors
* update types with missing aarch64 check
* corrected adding extra flag to properly compile mariadbconn in CMakeLists
* updated readme with arm builds section
* fix build failure if test folder does not exist
* Remove mysql connector from all builds, add mariadbconnector to windows build
* readd Linux check for backtrace lib to CMakeLists.txt
* Separate system specific mariadbconncpp extra compile flags
* Copy dlls to exes directory once built
* fetch prebuilt binaries on windows so that ClangCL can be used
* Delay load dll so that plugin directory is set correctly
* Fixed typo in glibcxx compile flag
* whitespacing, spaces -> tabs
* Updated README.md, included instructions to update
* Updated README.md
added libssl-dev requirement and removed mysql connector references from macOS builds section
* apple compile fixes for zlib and shared library name
* add windows arm64 checks to raknet
* Setup plugins directory for the connector to search in, pass openssl_root_dir on for apple
* Fix copy paths for single config generators and non windows
* change plugin folder location, another single config generator fix
* GENERATOR_IS_MULTI_CONFIG is a property not a variable
* Fixed a few errors after merge
* Fix plugin directory path, force windows to look at the right folder
* fixed directory name for make_directory command
* Update README.md
Updated MacOS, Windows build instructions.
* set INSTALL_PLUGINDIR so that the right directory is used
* Support for relative rpath for docker build
* Rebase on main
* Remove extra git submodule
* Update CMakeLists.txt
* Remove CMakeLists.txt file from mariadb
Remove the CMakeLists.txt file from the mariaDBConnector so we dont build the tests. Also add a config option to the CMakeVariables.txt so you can build the connector with multiple jobs
* Compile on windows
Specify the mariadbcpp.dll file location with a defined absolute path so windows knows it actually exists.
* default to 1 job
Default mariadb jobs running in parallel to 1 instead of 4
* Move mariadbcpp.dll file to the expected directory on windows
* Changed plugin
Updated the plugin location from the project binary directory to the expected location, the mariadb binary directory.
* Addressed windows dll issues by moving files to the expected directory instead of a directory that wouldnt get created
* Update README
Co-authored-by: Aaron Kimbrell <aronwk.aaron@gmail.com>
Co-authored-by: EmosewaMC <39972741+EmosewaMC@users.noreply.github.com>
2022-07-04 04:33:05 +00:00
if ( NOT EXISTS ${ backtrace_SOURCE_DIR } /.libs )
set ( backtrace_make_cmd "${backtrace_SOURCE_DIR}/configure --prefix=\" /usr\ " --enable-shared --with-system-libunwind" )
2021-12-05 17:54:36 +00:00
Add Aarch64 support (#231)
* added mariadb-connector-cpp submodule
* raknet aarch64 support
* fix compile errors
* mariadb connector swap (in progress)
* update CMakeLists, add preprocessor definition to switch between mysql and mariadb connectors
* update types with missing aarch64 check
* corrected adding extra flag to properly compile mariadbconn in CMakeLists
* updated readme with arm builds section
* fix build failure if test folder does not exist
* Remove mysql connector from all builds, add mariadbconnector to windows build
* readd Linux check for backtrace lib to CMakeLists.txt
* Separate system specific mariadbconncpp extra compile flags
* Copy dlls to exes directory once built
* fetch prebuilt binaries on windows so that ClangCL can be used
* Delay load dll so that plugin directory is set correctly
* Fixed typo in glibcxx compile flag
* whitespacing, spaces -> tabs
* Updated README.md, included instructions to update
* Updated README.md
added libssl-dev requirement and removed mysql connector references from macOS builds section
* apple compile fixes for zlib and shared library name
* add windows arm64 checks to raknet
* remove extra . in shared library location
* Setup plugins directory for the connector to search in, pass openssl_root_dir on for apple
* Fix copy paths for single config generators and non windows
* change plugin folder location, another single config generator fix
* GENERATOR_IS_MULTI_CONFIG is a property not a variable
* Fixed a few errors after merge
* Fix plugin directory path, force windows to look at the right folder
* fixed directory name for make_directory command
* Update README.md
Updated MacOS, Windows build instructions.
* set INSTALL_PLUGINDIR so that the right directory is used
* Support for relative rpath for docker build
* added mariadb-connector-cpp submodule
* raknet aarch64 support
* fix compile errors
* mariadb connector swap (in progress)
* update CMakeLists, add preprocessor definition to switch between mysql and mariadb connectors
* update types with missing aarch64 check
* corrected adding extra flag to properly compile mariadbconn in CMakeLists
* updated readme with arm builds section
* fix build failure if test folder does not exist
* Remove mysql connector from all builds, add mariadbconnector to windows build
* readd Linux check for backtrace lib to CMakeLists.txt
* Separate system specific mariadbconncpp extra compile flags
* Copy dlls to exes directory once built
* fetch prebuilt binaries on windows so that ClangCL can be used
* Delay load dll so that plugin directory is set correctly
* Fixed typo in glibcxx compile flag
* whitespacing, spaces -> tabs
* Updated README.md, included instructions to update
* Updated README.md
added libssl-dev requirement and removed mysql connector references from macOS builds section
* apple compile fixes for zlib and shared library name
* add windows arm64 checks to raknet
* Setup plugins directory for the connector to search in, pass openssl_root_dir on for apple
* Fix copy paths for single config generators and non windows
* change plugin folder location, another single config generator fix
* GENERATOR_IS_MULTI_CONFIG is a property not a variable
* Fixed a few errors after merge
* Fix plugin directory path, force windows to look at the right folder
* fixed directory name for make_directory command
* Update README.md
Updated MacOS, Windows build instructions.
* set INSTALL_PLUGINDIR so that the right directory is used
* Support for relative rpath for docker build
* Rebase on main
* Remove extra git submodule
* Update CMakeLists.txt
* Remove CMakeLists.txt file from mariadb
Remove the CMakeLists.txt file from the mariaDBConnector so we dont build the tests. Also add a config option to the CMakeVariables.txt so you can build the connector with multiple jobs
* Compile on windows
Specify the mariadbcpp.dll file location with a defined absolute path so windows knows it actually exists.
* default to 1 job
Default mariadb jobs running in parallel to 1 instead of 4
* Move mariadbcpp.dll file to the expected directory on windows
* Changed plugin
Updated the plugin location from the project binary directory to the expected location, the mariadb binary directory.
* Addressed windows dll issues by moving files to the expected directory instead of a directory that wouldnt get created
* Update README
Co-authored-by: Aaron Kimbrell <aronwk.aaron@gmail.com>
Co-authored-by: EmosewaMC <39972741+EmosewaMC@users.noreply.github.com>
2022-07-04 04:33:05 +00:00
execute_process (
C O M M A N D b a s h - c " c d $ { b a c k t r a c e _ S O U R C E _ D I R } & & $ { b a c k t r a c e _ m a k e _ c m d } & & m a k e & & c d $ { C M A K E _ S O U R C E _ D I R } "
)
endif ( )
2021-12-05 17:54:36 +00:00
Add Aarch64 support (#231)
* added mariadb-connector-cpp submodule
* raknet aarch64 support
* fix compile errors
* mariadb connector swap (in progress)
* update CMakeLists, add preprocessor definition to switch between mysql and mariadb connectors
* update types with missing aarch64 check
* corrected adding extra flag to properly compile mariadbconn in CMakeLists
* updated readme with arm builds section
* fix build failure if test folder does not exist
* Remove mysql connector from all builds, add mariadbconnector to windows build
* readd Linux check for backtrace lib to CMakeLists.txt
* Separate system specific mariadbconncpp extra compile flags
* Copy dlls to exes directory once built
* fetch prebuilt binaries on windows so that ClangCL can be used
* Delay load dll so that plugin directory is set correctly
* Fixed typo in glibcxx compile flag
* whitespacing, spaces -> tabs
* Updated README.md, included instructions to update
* Updated README.md
added libssl-dev requirement and removed mysql connector references from macOS builds section
* apple compile fixes for zlib and shared library name
* add windows arm64 checks to raknet
* remove extra . in shared library location
* Setup plugins directory for the connector to search in, pass openssl_root_dir on for apple
* Fix copy paths for single config generators and non windows
* change plugin folder location, another single config generator fix
* GENERATOR_IS_MULTI_CONFIG is a property not a variable
* Fixed a few errors after merge
* Fix plugin directory path, force windows to look at the right folder
* fixed directory name for make_directory command
* Update README.md
Updated MacOS, Windows build instructions.
* set INSTALL_PLUGINDIR so that the right directory is used
* Support for relative rpath for docker build
* added mariadb-connector-cpp submodule
* raknet aarch64 support
* fix compile errors
* mariadb connector swap (in progress)
* update CMakeLists, add preprocessor definition to switch between mysql and mariadb connectors
* update types with missing aarch64 check
* corrected adding extra flag to properly compile mariadbconn in CMakeLists
* updated readme with arm builds section
* fix build failure if test folder does not exist
* Remove mysql connector from all builds, add mariadbconnector to windows build
* readd Linux check for backtrace lib to CMakeLists.txt
* Separate system specific mariadbconncpp extra compile flags
* Copy dlls to exes directory once built
* fetch prebuilt binaries on windows so that ClangCL can be used
* Delay load dll so that plugin directory is set correctly
* Fixed typo in glibcxx compile flag
* whitespacing, spaces -> tabs
* Updated README.md, included instructions to update
* Updated README.md
added libssl-dev requirement and removed mysql connector references from macOS builds section
* apple compile fixes for zlib and shared library name
* add windows arm64 checks to raknet
* Setup plugins directory for the connector to search in, pass openssl_root_dir on for apple
* Fix copy paths for single config generators and non windows
* change plugin folder location, another single config generator fix
* GENERATOR_IS_MULTI_CONFIG is a property not a variable
* Fixed a few errors after merge
* Fix plugin directory path, force windows to look at the right folder
* fixed directory name for make_directory command
* Update README.md
Updated MacOS, Windows build instructions.
* set INSTALL_PLUGINDIR so that the right directory is used
* Support for relative rpath for docker build
* Rebase on main
* Remove extra git submodule
* Update CMakeLists.txt
* Remove CMakeLists.txt file from mariadb
Remove the CMakeLists.txt file from the mariaDBConnector so we dont build the tests. Also add a config option to the CMakeVariables.txt so you can build the connector with multiple jobs
* Compile on windows
Specify the mariadbcpp.dll file location with a defined absolute path so windows knows it actually exists.
* default to 1 job
Default mariadb jobs running in parallel to 1 instead of 4
* Move mariadbcpp.dll file to the expected directory on windows
* Changed plugin
Updated the plugin location from the project binary directory to the expected location, the mariadb binary directory.
* Addressed windows dll issues by moving files to the expected directory instead of a directory that wouldnt get created
* Update README
Co-authored-by: Aaron Kimbrell <aronwk.aaron@gmail.com>
Co-authored-by: EmosewaMC <39972741+EmosewaMC@users.noreply.github.com>
2022-07-04 04:33:05 +00:00
link_directories ( ${ backtrace_SOURCE_DIR } /.libs/ )
include_directories ( ${ backtrace_SOURCE_DIR } )
endif ( __include_backtrace__ )
2021-12-05 17:54:36 +00:00
endif ( )
# Set the version
set ( PROJECT_VERSION "${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}" )
set ( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DPROJECT_VERSION=${PROJECT_VERSION}" )
# Echo the version
message ( STATUS "Version: ${PROJECT_VERSION}" )
set ( CMAKE_CXX_STANDARD 17 )
if ( WIN32 )
add_compile_definitions ( _CRT_SECURE_NO_WARNINGS )
endif ( WIN32 )
# Our output dir
set ( CMAKE_BINARY_DIR ${ PROJECT_BINARY_DIR } )
# Create a /res directory
make_directory ( ${ CMAKE_BINARY_DIR } /res )
# Create a /locale directory
make_directory ( ${ CMAKE_BINARY_DIR } /locale )
2021-12-13 15:57:43 +00:00
# Create a /logs directory
make_directory ( ${ CMAKE_BINARY_DIR } /logs )
2021-12-05 17:54:36 +00:00
# Copy ini files on first build
if ( NOT EXISTS ${ PROJECT_BINARY_DIR } /authconfig.ini )
configure_file (
$ { C M A K E _ S O U R C E _ D I R } / r e s o u r c e s / a u t h c o n f i g . i n i $ { P R O J E C T _ B I N A R Y _ D I R } / a u t h c o n f i g . i n i
C O P Y O N L Y
)
endif ( )
if ( NOT EXISTS ${ PROJECT_BINARY_DIR } /chatconfig.ini )
configure_file (
$ { C M A K E _ S O U R C E _ D I R } / r e s o u r c e s / c h a t c o n f i g . i n i $ { P R O J E C T _ B I N A R Y _ D I R } / c h a t c o n f i g . i n i
C O P Y O N L Y
)
endif ( )
if ( NOT EXISTS ${ PROJECT_BINARY_DIR } /worldconfig.ini )
configure_file (
$ { C M A K E _ S O U R C E _ D I R } / r e s o u r c e s / w o r l d c o n f i g . i n i $ { P R O J E C T _ B I N A R Y _ D I R } / w o r l d c o n f i g . i n i
C O P Y O N L Y
)
endif ( )
if ( NOT EXISTS ${ PROJECT_BINARY_DIR } /masterconfig.ini )
configure_file (
$ { C M A K E _ S O U R C E _ D I R } / r e s o u r c e s / m a s t e r c o n f i g . i n i $ { P R O J E C T _ B I N A R Y _ D I R } / m a s t e r c o n f i g . i n i
C O P Y O N L Y
)
endif ( )
# Copy files to output
configure_file ( "${CMAKE_SOURCE_DIR}/vanity/CREDITS.md" "${CMAKE_BINARY_DIR}/vanity/CREDITS.md" COPYONLY )
configure_file ( "${CMAKE_SOURCE_DIR}/vanity/INFO.md" "${CMAKE_BINARY_DIR}/vanity/INFO.md" COPYONLY )
configure_file ( "${CMAKE_SOURCE_DIR}/vanity/TESTAMENT.md" "${CMAKE_BINARY_DIR}/vanity/TESTAMENT.md" COPYONLY )
configure_file ( "${CMAKE_SOURCE_DIR}/vanity/NPC.xml" "${CMAKE_BINARY_DIR}/vanity/NPC.xml" COPYONLY )
# 3rdparty includes
include_directories ( ${ PROJECT_SOURCE_DIR } /thirdparty/raknet/Source/ )
Add Aarch64 support (#231)
* added mariadb-connector-cpp submodule
* raknet aarch64 support
* fix compile errors
* mariadb connector swap (in progress)
* update CMakeLists, add preprocessor definition to switch between mysql and mariadb connectors
* update types with missing aarch64 check
* corrected adding extra flag to properly compile mariadbconn in CMakeLists
* updated readme with arm builds section
* fix build failure if test folder does not exist
* Remove mysql connector from all builds, add mariadbconnector to windows build
* readd Linux check for backtrace lib to CMakeLists.txt
* Separate system specific mariadbconncpp extra compile flags
* Copy dlls to exes directory once built
* fetch prebuilt binaries on windows so that ClangCL can be used
* Delay load dll so that plugin directory is set correctly
* Fixed typo in glibcxx compile flag
* whitespacing, spaces -> tabs
* Updated README.md, included instructions to update
* Updated README.md
added libssl-dev requirement and removed mysql connector references from macOS builds section
* apple compile fixes for zlib and shared library name
* add windows arm64 checks to raknet
* remove extra . in shared library location
* Setup plugins directory for the connector to search in, pass openssl_root_dir on for apple
* Fix copy paths for single config generators and non windows
* change plugin folder location, another single config generator fix
* GENERATOR_IS_MULTI_CONFIG is a property not a variable
* Fixed a few errors after merge
* Fix plugin directory path, force windows to look at the right folder
* fixed directory name for make_directory command
* Update README.md
Updated MacOS, Windows build instructions.
* set INSTALL_PLUGINDIR so that the right directory is used
* Support for relative rpath for docker build
* added mariadb-connector-cpp submodule
* raknet aarch64 support
* fix compile errors
* mariadb connector swap (in progress)
* update CMakeLists, add preprocessor definition to switch between mysql and mariadb connectors
* update types with missing aarch64 check
* corrected adding extra flag to properly compile mariadbconn in CMakeLists
* updated readme with arm builds section
* fix build failure if test folder does not exist
* Remove mysql connector from all builds, add mariadbconnector to windows build
* readd Linux check for backtrace lib to CMakeLists.txt
* Separate system specific mariadbconncpp extra compile flags
* Copy dlls to exes directory once built
* fetch prebuilt binaries on windows so that ClangCL can be used
* Delay load dll so that plugin directory is set correctly
* Fixed typo in glibcxx compile flag
* whitespacing, spaces -> tabs
* Updated README.md, included instructions to update
* Updated README.md
added libssl-dev requirement and removed mysql connector references from macOS builds section
* apple compile fixes for zlib and shared library name
* add windows arm64 checks to raknet
* Setup plugins directory for the connector to search in, pass openssl_root_dir on for apple
* Fix copy paths for single config generators and non windows
* change plugin folder location, another single config generator fix
* GENERATOR_IS_MULTI_CONFIG is a property not a variable
* Fixed a few errors after merge
* Fix plugin directory path, force windows to look at the right folder
* fixed directory name for make_directory command
* Update README.md
Updated MacOS, Windows build instructions.
* set INSTALL_PLUGINDIR so that the right directory is used
* Support for relative rpath for docker build
* Rebase on main
* Remove extra git submodule
* Update CMakeLists.txt
* Remove CMakeLists.txt file from mariadb
Remove the CMakeLists.txt file from the mariaDBConnector so we dont build the tests. Also add a config option to the CMakeVariables.txt so you can build the connector with multiple jobs
* Compile on windows
Specify the mariadbcpp.dll file location with a defined absolute path so windows knows it actually exists.
* default to 1 job
Default mariadb jobs running in parallel to 1 instead of 4
* Move mariadbcpp.dll file to the expected directory on windows
* Changed plugin
Updated the plugin location from the project binary directory to the expected location, the mariadb binary directory.
* Addressed windows dll issues by moving files to the expected directory instead of a directory that wouldnt get created
* Update README
Co-authored-by: Aaron Kimbrell <aronwk.aaron@gmail.com>
Co-authored-by: EmosewaMC <39972741+EmosewaMC@users.noreply.github.com>
2022-07-04 04:33:05 +00:00
if ( APPLE )
include_directories ( /usr/local/include/ )
endif ( APPLE )
2021-12-05 17:54:36 +00:00
include_directories ( ${ PROJECT_SOURCE_DIR } /thirdparty/tinyxml2/ )
include_directories ( ${ PROJECT_SOURCE_DIR } /thirdparty/recastnavigation/Recast/Include )
include_directories ( ${ PROJECT_SOURCE_DIR } /thirdparty/recastnavigation/Detour/Include )
include_directories ( ${ ZLIB_INCLUDE_DIRS } )
# Bcrypt
if ( NOT WIN32 )
include_directories ( ${ PROJECT_SOURCE_DIR } /thirdparty/libbcrypt )
include_directories ( ${ PROJECT_SOURCE_DIR } /thirdparty/libbcrypt/include/bcrypt )
else ( )
include_directories ( ${ PROJECT_SOURCE_DIR } /thirdparty/libbcrypt/include )
endif ( )
# Our includes
include_directories ( ${ PROJECT_BINARY_DIR } )
include_directories ( ${ PROJECT_SOURCE_DIR } /dChatFilter/ )
include_directories ( ${ PROJECT_SOURCE_DIR } /dCommon/ )
include_directories ( ${ PROJECT_SOURCE_DIR } /dGame/ )
include_directories ( ${ PROJECT_SOURCE_DIR } /dGame/dBehaviors )
include_directories ( ${ PROJECT_SOURCE_DIR } /dGame/dComponents )
include_directories ( ${ PROJECT_SOURCE_DIR } /dGame/dGameMessages )
include_directories ( ${ PROJECT_SOURCE_DIR } /dGame/dInventory )
include_directories ( ${ PROJECT_SOURCE_DIR } /dGame/dMission )
include_directories ( ${ PROJECT_SOURCE_DIR } /dGame/dEntity )
include_directories ( ${ PROJECT_SOURCE_DIR } /dGame/dUtilities )
include_directories ( ${ PROJECT_SOURCE_DIR } /dPhysics/ )
include_directories ( ${ PROJECT_SOURCE_DIR } /dZoneManager/ )
include_directories ( ${ PROJECT_SOURCE_DIR } /dDatabase/ )
include_directories ( ${ PROJECT_SOURCE_DIR } /dDatabase/Tables/ )
include_directories ( ${ PROJECT_SOURCE_DIR } /thirdparty/SQLite/ )
include_directories ( ${ PROJECT_SOURCE_DIR } /thirdparty/cpplinq/ )
include_directories ( ${ PROJECT_SOURCE_DIR } /dNet/ )
include_directories ( ${ PROJECT_SOURCE_DIR } /dScripts/ )
# Lib folders:
link_directories ( ${ PROJECT_BINARY_DIR } )
# Source Code
file (
G L O B S O U R C E S
L I S T _ D I R E C T O R I E S f a l s e
R E L A T I V E " $ { C M A K E _ C U R R E N T _ S O U R C E _ D I R } "
$ { P R O J E C T _ S O U R C E _ D I R } / d W o r l d S e r v e r / * . c p p
)
# Source Code for AuthServer
file (
G L O B S O U R C E S _ A U T H
L I S T _ D I R E C T O R I E S f a l s e
R E L A T I V E " $ { C M A K E _ C U R R E N T _ S O U R C E _ D I R } "
$ { P R O J E C T _ S O U R C E _ D I R } / d A u t h S e r v e r / * . c p p
)
# Source Code for MasterServer
file (
G L O B S O U R C E S _ M A S T E R
L I S T _ D I R E C T O R I E S f a l s e
R E L A T I V E " $ { C M A K E _ C U R R E N T _ S O U R C E _ D I R } "
$ { P R O J E C T _ S O U R C E _ D I R } / d M a s t e r S e r v e r / * . c p p
)
# Source Code for ChatServer
file (
G L O B S O U R C E S _ C H A T
L I S T _ D I R E C T O R I E S f a l s e
R E L A T I V E " $ { C M A K E _ C U R R E N T _ S O U R C E _ D I R } "
$ { P R O J E C T _ S O U R C E _ D I R } / d C h a t S e r v e r / * . c p p
)
# Source Code for raknet
file (
G L O B S O U R C E S _ R A K N E T
L I S T _ D I R E C T O R I E S f a l s e
R E L A T I V E " $ { C M A K E _ C U R R E N T _ S O U R C E _ D I R } "
$ { P R O J E C T _ S O U R C E _ D I R } / t h i r d p a r t y / r a k n e t / S o u r c e / * . c p p
)
# Source Code for recast
file (
G L O B S O U R C E S _ R E C A S T
L I S T _ D I R E C T O R I E S f a l s e
R E L A T I V E " $ { C M A K E _ C U R R E N T _ S O U R C E _ D I R } "
$ { P R O J E C T _ S O U R C E _ D I R } / t h i r d p a r t y / r e c a s t n a v i g a t i o n / R e c a s t / S o u r c e / * . c p p
)
# Source Code for detour
file (
G L O B S O U R C E S _ D E T O U R
L I S T _ D I R E C T O R I E S f a l s e
R E L A T I V E " $ { C M A K E _ C U R R E N T _ S O U R C E _ D I R } "
$ { P R O J E C T _ S O U R C E _ D I R } / t h i r d p a r t y / r e c a s t n a v i g a t i o n / D e t o u r / S o u r c e / * . c p p
)
# Source Code for tinyxml2
file (
G L O B S O U R C E S _ T I N Y X M L 2
L I S T _ D I R E C T O R I E S f a l s e
R E L A T I V E " $ { C M A K E _ C U R R E N T _ S O U R C E _ D I R } "
$ { P R O J E C T _ S O U R C E _ D I R } / t h i r d p a r t y / t i n y x m l 2 / t i n y x m l 2 . c p p
)
# Source Code for libbcrypt
file (
G L O B S O U R C E S _ L I B B C R Y P T
L I S T _ D I R E C T O R I E S f a l s e
R E L A T I V E " $ { C M A K E _ C U R R E N T _ S O U R C E _ D I R } "
$ { P R O J E C T _ S O U R C E _ D I R } / t h i r d p a r t y / l i b b c r y p t / * . c
$ { P R O J E C T _ S O U R C E _ D I R } / t h i r d p a r t y / l i b b c r y p t / s r c / * . c
)
# Source Code for dCommon
file (
G L O B S O U R C E S _ D C O M M O N
L I S T _ D I R E C T O R I E S f a l s e
R E L A T I V E " $ { C M A K E _ C U R R E N T _ S O U R C E _ D I R } "
$ { P R O J E C T _ S O U R C E _ D I R } / d C o m m o n / * . c p p
)
# Source Code for dChatFilter
file (
G L O B S O U R C E S _ D C H A T F I L T E R
L I S T _ D I R E C T O R I E S f a l s e
R E L A T I V E " $ { C M A K E _ C U R R E N T _ S O U R C E _ D I R } "
$ { P R O J E C T _ S O U R C E _ D I R } / d C h a t F i l t e r / * . c p p
)
# Source Code for dDatabase
file (
G L O B S O U R C E S _ D D A T A B A S E
L I S T _ D I R E C T O R I E S f a l s e
R E L A T I V E " $ { C M A K E _ C U R R E N T _ S O U R C E _ D I R } "
$ { P R O J E C T _ S O U R C E _ D I R } / d D a t a b a s e / * . c p p
$ { P R O J E C T _ S O U R C E _ D I R } / d D a t a b a s e / T a b l e s / * . c p p
$ { P R O J E C T _ S O U R C E _ D I R } / t h i r d p a r t y / S Q L i t e / * . c p p
$ { P R O J E C T _ S O U R C E _ D I R } / t h i r d p a r t y / S Q L i t e / * . c
)
# Source Code for dNet
file (
G L O B S O U R C E S _ D N E T
L I S T _ D I R E C T O R I E S f a l s e
R E L A T I V E " $ { C M A K E _ C U R R E N T _ S O U R C E _ D I R } "
$ { P R O J E C T _ S O U R C E _ D I R } / d N e t / * . c p p
)
# Source Code for dGame
file (
G L O B S O U R C E S _ D G A M E
L I S T _ D I R E C T O R I E S f a l s e
R E L A T I V E " $ { C M A K E _ C U R R E N T _ S O U R C E _ D I R } "
$ { P R O J E C T _ S O U R C E _ D I R } / d G a m e / * . c p p
$ { P R O J E C T _ S O U R C E _ D I R } / d G a m e / d B e h a v i o r s / * . c p p
$ { P R O J E C T _ S O U R C E _ D I R } / d G a m e / d C o m p o n e n t s / * . c p p
$ { P R O J E C T _ S O U R C E _ D I R } / d G a m e / d G a m e M e s s a g e s / * . c p p
$ { P R O J E C T _ S O U R C E _ D I R } / d G a m e / d I n v e n t o r y / * . c p p
$ { P R O J E C T _ S O U R C E _ D I R } / d G a m e / d M i s s i o n / * . c p p
$ { P R O J E C T _ S O U R C E _ D I R } / d G a m e / d E n t i t y / * . c p p
$ { P R O J E C T _ S O U R C E _ D I R } / d G a m e / d U t i l i t i e s / * . c p p
$ { P R O J E C T _ S O U R C E _ D I R } / d S c r i p t s / * . c p p
)
# Source Code for dZoneManager
file (
G L O B S O U R C E S _ D Z M
L I S T _ D I R E C T O R I E S f a l s e
R E L A T I V E " $ { C M A K E _ C U R R E N T _ S O U R C E _ D I R } "
$ { P R O J E C T _ S O U R C E _ D I R } / d Z o n e M a n a g e r / * . c p p
)
# Source Code for dPhysics
file (
G L O B S O U R C E S _ D P H Y S I C S
L I S T _ D I R E C T O R I E S f a l s e
R E L A T I V E " $ { C M A K E _ C U R R E N T _ S O U R C E _ D I R } "
$ { P R O J E C T _ S O U R C E _ D I R } / d P h y s i c s / * . c p p
)
2022-01-05 09:06:34 +00:00
if ( MSVC )
# Skip warning for invalid conversion from size_t to uint32_t for all targets below for now
add_compile_options ( "/wd4267" )
endif ( MSVC )
Add Aarch64 support (#231)
* added mariadb-connector-cpp submodule
* raknet aarch64 support
* fix compile errors
* mariadb connector swap (in progress)
* update CMakeLists, add preprocessor definition to switch between mysql and mariadb connectors
* update types with missing aarch64 check
* corrected adding extra flag to properly compile mariadbconn in CMakeLists
* updated readme with arm builds section
* fix build failure if test folder does not exist
* Remove mysql connector from all builds, add mariadbconnector to windows build
* readd Linux check for backtrace lib to CMakeLists.txt
* Separate system specific mariadbconncpp extra compile flags
* Copy dlls to exes directory once built
* fetch prebuilt binaries on windows so that ClangCL can be used
* Delay load dll so that plugin directory is set correctly
* Fixed typo in glibcxx compile flag
* whitespacing, spaces -> tabs
* Updated README.md, included instructions to update
* Updated README.md
added libssl-dev requirement and removed mysql connector references from macOS builds section
* apple compile fixes for zlib and shared library name
* add windows arm64 checks to raknet
* remove extra . in shared library location
* Setup plugins directory for the connector to search in, pass openssl_root_dir on for apple
* Fix copy paths for single config generators and non windows
* change plugin folder location, another single config generator fix
* GENERATOR_IS_MULTI_CONFIG is a property not a variable
* Fixed a few errors after merge
* Fix plugin directory path, force windows to look at the right folder
* fixed directory name for make_directory command
* Update README.md
Updated MacOS, Windows build instructions.
* set INSTALL_PLUGINDIR so that the right directory is used
* Support for relative rpath for docker build
* added mariadb-connector-cpp submodule
* raknet aarch64 support
* fix compile errors
* mariadb connector swap (in progress)
* update CMakeLists, add preprocessor definition to switch between mysql and mariadb connectors
* update types with missing aarch64 check
* corrected adding extra flag to properly compile mariadbconn in CMakeLists
* updated readme with arm builds section
* fix build failure if test folder does not exist
* Remove mysql connector from all builds, add mariadbconnector to windows build
* readd Linux check for backtrace lib to CMakeLists.txt
* Separate system specific mariadbconncpp extra compile flags
* Copy dlls to exes directory once built
* fetch prebuilt binaries on windows so that ClangCL can be used
* Delay load dll so that plugin directory is set correctly
* Fixed typo in glibcxx compile flag
* whitespacing, spaces -> tabs
* Updated README.md, included instructions to update
* Updated README.md
added libssl-dev requirement and removed mysql connector references from macOS builds section
* apple compile fixes for zlib and shared library name
* add windows arm64 checks to raknet
* Setup plugins directory for the connector to search in, pass openssl_root_dir on for apple
* Fix copy paths for single config generators and non windows
* change plugin folder location, another single config generator fix
* GENERATOR_IS_MULTI_CONFIG is a property not a variable
* Fixed a few errors after merge
* Fix plugin directory path, force windows to look at the right folder
* fixed directory name for make_directory command
* Update README.md
Updated MacOS, Windows build instructions.
* set INSTALL_PLUGINDIR so that the right directory is used
* Support for relative rpath for docker build
* Rebase on main
* Remove extra git submodule
* Update CMakeLists.txt
* Remove CMakeLists.txt file from mariadb
Remove the CMakeLists.txt file from the mariaDBConnector so we dont build the tests. Also add a config option to the CMakeVariables.txt so you can build the connector with multiple jobs
* Compile on windows
Specify the mariadbcpp.dll file location with a defined absolute path so windows knows it actually exists.
* default to 1 job
Default mariadb jobs running in parallel to 1 instead of 4
* Move mariadbcpp.dll file to the expected directory on windows
* Changed plugin
Updated the plugin location from the project binary directory to the expected location, the mariadb binary directory.
* Addressed windows dll issues by moving files to the expected directory instead of a directory that wouldnt get created
* Update README
Co-authored-by: Aaron Kimbrell <aronwk.aaron@gmail.com>
Co-authored-by: EmosewaMC <39972741+EmosewaMC@users.noreply.github.com>
2022-07-04 04:33:05 +00:00
# mariadb connector cpp
# On Windows ClangCL can't compile the connector from source but can link to an msvc compiled one,
# so prefer the prebuilt binaries unless MARIADB_BUILD_SOURCE is specified
if ( WIN32 AND NOT MARIADB_BUILD_SOURCE )
set ( MARIADB_MSI_DIR "${PROJECT_BINARY_DIR}/msi" )
set ( MARIADB_CONNECTOR_DIR "${PROJECT_BINARY_DIR}/mariadbcpp" )
set ( MARIADB_C_CONNECTOR_DIR "${MARIADB_CONNECTOR_DIR}/MariaDB/MariaDB Connector C 64-bit" )
set ( MARIADB_CPP_CONNECTOR_DIR "${MARIADB_CONNECTOR_DIR}/MariaDB/MariaDB C++ Connector 64-bit" )
file ( MAKE_DIRECTORY "${MARIADB_MSI_DIR}" )
file ( MAKE_DIRECTORY "${MARIADB_CONNECTOR_DIR}" )
if ( NOT EXISTS "${MARIADB_MSI_DIR}/mariadb-connector-c-3.2.5-win64.msi" )
message ( "Downloading mariadb connector/c" )
file ( DOWNLOAD https://dlm.mariadb.com/1936366/connectors/c/connector-c-3.2.5/mariadb-connector-c-3.2.5-win64.msi
" $ { M A R I A D B _ M S I _ D I R } / m a r i a d b - c o n n e c t o r - c - 3 . 2 . 5 - w i n 6 4 . m s i "
E X P E C T E D _ H A S H M D 5 = 0 9 d 4 1 8 c 2 9 0 1 0 9 0 6 8 a 5 b e a 1 3 6 d a f c a 3 6 b )
endif ( )
if ( NOT EXISTS "${MARIADB_MSI_DIR}/mariadb-connector-cpp-1.0.1-win64.msi" )
message ( "Downloading mariadb connector/c++" )
file ( DOWNLOAD https://dlm.mariadb.com/1683453/connectors/cpp/connector-cpp-1.0.1/mariadb-connector-cpp-1.0.1-win64.msi
" $ { M A R I A D B _ M S I _ D I R } / m a r i a d b - c o n n e c t o r - c p p - 1 . 0 . 1 - w i n 6 4 . m s i "
E X P E C T E D _ H A S H M D 5 = 5 4 8 e 7 4 3 f b f 0 6 7 d 2 1 d 4 2 b 8 1 d 9 5 8 b f 4 e d 7 )
endif ( )
file ( TO_NATIVE_PATH "${MARIADB_CONNECTOR_DIR}" MSIEXEC_TARGETDIR )
# extract msi files without installing to users system
if ( NOT EXISTS "${MARIADB_C_CONNECTOR_DIR}" )
file ( TO_NATIVE_PATH "${MARIADB_MSI_DIR}/mariadb-connector-c-3.2.5-win64.msi" MSI_DIR )
execute_process ( COMMAND msiexec /a ${ MSI_DIR } /qn TARGETDIR= ${ MSIEXEC_TARGETDIR } )
endif ( )
if ( NOT EXISTS "${MARIADB_CPP_CONNECTOR_DIR}" )
file ( TO_NATIVE_PATH "${MARIADB_MSI_DIR}/mariadb-connector-cpp-1.0.1-win64.msi" MSI_DIR )
execute_process ( COMMAND msiexec /a ${ MSI_DIR } /qn TARGETDIR= ${ MSIEXEC_TARGETDIR } )
endif ( )
set ( MARIADB_SHARED_LIBRARY_LOCATION "${MARIADB_CPP_CONNECTOR_DIR}/mariadbcpp.dll" )
set ( MARIADB_IMPLIB_LOCATION "${MARIADB_CPP_CONNECTOR_DIR}/mariadbcpp.lib" )
set ( MARIADB_INCLUDE_DIR "${MARIADB_CPP_CONNECTOR_DIR}/include/mariadb" )
add_custom_target ( mariadb_connector_cpp )
add_custom_command ( TARGET mariadb_connector_cpp POST_BUILD
C O M M A N D $ { C M A K E _ C O M M A N D } - E c o p y _ i f _ d i f f e r e n t
" $ { M A R I A D B _ C P P _ C O N N E C T O R _ D I R } / m a r i a d b c p p . d l l "
" $ { M A R I A D B _ C _ C O N N E C T O R _ D I R } / l i b / l i b m a r i a d b . d l l "
" $ { P R O J E C T _ B I N A R Y _ D I R } " )
# MariaDB uses plugins that the database needs to load, the prebuilt binaries by default will try to find the libraries in system directories,
# so set this define and the servers will set the MARIADB_PLUGIN_DIR environment variable to the appropriate directory.
# Plugin directory is determined at dll load time (this will happen before main()) so we need to delay the dll load so that we can set the environment variable
add_link_options ( /DELAYLOAD: ${ MARIADB_SHARED_LIBRARY_LOCATION } )
add_compile_definitions ( MARIADB_PLUGIN_DIR_OVERRIDE= "${MARIADB_CPP_CONNECTOR_DIR}/plugin" )
else ( ) # Build from source
include ( ExternalProject )
if ( WIN32 )
set ( MARIADB_EXTRA_COMPILE_FLAGS /EHsc )
set ( MARIADB_EXTRA_CMAKE_ARGS -DWITH_MSI=OFF )
elseif ( APPLE )
set ( MARIADB_EXTRA_COMPILE_FLAGS -D_GLIBCXX_USE_CXX11_ABI=0 )
set ( MARIADB_EXTRA_CMAKE_ARGS -DWITH_EXTERNAL_ZLIB=ON -DOPENSSL_ROOT_DIR= ${ OPENSSL_ROOT_DIR } )
else ( )
set ( MARIADB_EXTRA_COMPILE_FLAGS -D_GLIBCXX_USE_CXX11_ABI=0 )
endif ( )
ExternalProject_Add ( mariadb_connector_cpp
S O U R C E _ D I R $ { C M A K E _ S O U R C E _ D I R } / t h i r d p a r t y / m a r i a d b - c o n n e c t o r - c p p
C M A K E _ A R G S " - D C M A K E _ C X X _ F L A G S : S T R I N G = $ { M A R I A D B _ E X T R A _ C O M P I L E _ F L A G S } "
- D C M A K E _ B U I L D _ R P A T H _ U S E _ O R I G I N = $ { C M A K E _ B U I L D _ R P A T H _ U S E _ O R I G I N }
- D C M A K E _ I N S T A L L _ P R E F I X = . / m a r i a d b c p p # Points the connector to the correct plugin directory
- D I N S T A L L _ P L U G I N D I R = p l u g i n
$ { M A R I A D B _ E X T R A _ C M A K E _ A R G S }
P R E F I X " $ { P R O J E C T _ B I N A R Y _ D I R } / m a r i a d b c p p "
B U I L D _ C O M M A N D c m a k e - - b u i l d . - - c o n f i g R e l W i t h D e b I n f o - j $ { _ _ m a r i a _ d b _ c o n n e c t o r _ c o m p i l e _ j o b s _ _ }
I N S T A L L _ C O M M A N D " " )
ExternalProject_Get_Property ( mariadb_connector_cpp BINARY_DIR )
if ( WIN32 )
set ( MARIADB_SHARED_LIBRARY_NAME mariadbcpp.dll )
set ( MARIADB_PLUGIN_SUFFIX .dll )
set ( MARIADB_IMPLIB_LOCATION "${BINARY_DIR}/RelWithDebInfo/mariadbcpp.lib" )
# When built from source windows only seems to check same folder as exe instead specified folder, so use
# environment variable to force it
add_link_options ( /DELAYLOAD:mariadbcpp.dll )
add_compile_definitions ( MARIADB_PLUGIN_DIR_OVERRIDE= "${PROJECT_BINARY_DIR}/mariadbcpp/plugin" )
else ( )
set ( MARIADB_SHARED_LIBRARY_NAME libmariadbcpp ${ CMAKE_SHARED_LIBRARY_SUFFIX } )
set ( MARIADB_PLUGIN_SUFFIX .so )
endif ( )
get_property ( isMultiConfig GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG )
if ( isMultiConfig )
set ( MARIADB_SHARED_LIBRARY_LOCATION "${BINARY_DIR}/RelWithDebInfo/${MARIADB_SHARED_LIBRARY_NAME}" )
set ( MARIADB_SHARED_LIBRARY_COPY_LOCATION "${PROJECT_BINARY_DIR}/$<CONFIG>" )
set ( MARIADB_PLUGINS_LOCATION "${BINARY_DIR}/libmariadb/RelWithDebInfo" )
else ( )
set ( MARIADB_SHARED_LIBRARY_LOCATION "${BINARY_DIR}/${MARIADB_SHARED_LIBRARY_NAME}" )
set ( MARIADB_SHARED_LIBRARY_COPY_LOCATION "${PROJECT_BINARY_DIR}" )
set ( MARIADB_PLUGINS_LOCATION "${BINARY_DIR}/libmariadb" )
endif ( )
set ( MARIADB_INCLUDE_DIR "${CMAKE_SOURCE_DIR}/thirdparty/mariadb-connector-cpp/include/" )
add_custom_command ( TARGET mariadb_connector_cpp POST_BUILD
C O M M A N D $ { C M A K E _ C O M M A N D } - E m a k e _ d i r e c t o r y
$ { B I N A R Y _ D I R } / m a r i a d b c p p / p l u g i n
$ { M A R I A D B _ S H A R E D _ L I B R A R Y _ C O P Y _ L O C A T I O N }
C O M M A N D $ { C M A K E _ C O M M A N D } - E c o p y _ i f _ d i f f e r e n t
$ { M A R I A D B _ S H A R E D _ L I B R A R Y _ L O C A T I O N }
$ { M A R I A D B _ S H A R E D _ L I B R A R Y _ C O P Y _ L O C A T I O N }
C O M M A N D $ { C M A K E _ C O M M A N D } - E c o p y _ i f _ d i f f e r e n t
$ { M A R I A D B _ P L U G I N S _ L O C A T I O N } / c a c h i n g _ s h a 2 _ p a s s w o r d $ { M A R I A D B _ P L U G I N _ S U F F I X }
$ { M A R I A D B _ P L U G I N S _ L O C A T I O N } / c l i e n t _ e d 2 5 5 1 9 $ { M A R I A D B _ P L U G I N _ S U F F I X }
$ { M A R I A D B _ P L U G I N S _ L O C A T I O N } / d i a l o g $ { M A R I A D B _ P L U G I N _ S U F F I X }
$ { M A R I A D B _ P L U G I N S _ L O C A T I O N } / m y s q l _ c l e a r _ p a s s w o r d $ { M A R I A D B _ P L U G I N _ S U F F I X }
$ { M A R I A D B _ P L U G I N S _ L O C A T I O N } / s h a 2 5 6 _ p a s s w o r d $ { M A R I A D B _ P L U G I N _ S U F F I X }
$ { B I N A R Y _ D I R } / m a r i a d b c p p / p l u g i n )
endif ( )
# Remove the CMakeLists.txt file from the tests folder for the maria-db-connector so we dont compile the tests.
if ( EXISTS "${CMAKE_SOURCE_DIR}/thirdparty/mariadb-connector-cpp/test/CMakeLists.txt" )
file ( REMOVE "${CMAKE_SOURCE_DIR}/thirdparty/mariadb-connector-cpp/test/CMakeLists.txt" )
endif ( )
add_library ( mariadbConnCpp SHARED IMPORTED )
set_property ( TARGET mariadbConnCpp PROPERTY IMPORTED_LOCATION ${ MARIADB_SHARED_LIBRARY_LOCATION } )
if ( WIN32 )
set_property ( TARGET mariadbConnCpp PROPERTY IMPORTED_IMPLIB ${ MARIADB_IMPLIB_LOCATION } )
endif ( )
target_include_directories ( mariadbConnCpp INTERFACE ${ MARIADB_INCLUDE_DIR } )
add_dependencies ( mariadbConnCpp mariadb_connector_cpp )
2021-12-05 17:54:36 +00:00
# 3rdparty static libraries:
#add_library(zlib ${SOURCES_ZLIB})
add_library ( raknet ${ SOURCES_RAKNET } )
add_library ( tinyxml2 ${ SOURCES_TINYXML2 } )
add_library ( detour ${ SOURCES_DETOUR } )
add_library ( recast ${ SOURCES_RECAST } )
add_library ( libbcrypt ${ SOURCES_LIBBCRYPT } )
# Our static libraries:
add_library ( dCommon ${ SOURCES_DCOMMON } )
add_library ( dChatFilter ${ SOURCES_DCHATFILTER } )
add_library ( dDatabase ${ SOURCES_DDATABASE } )
add_library ( dNet ${ SOURCES_DNET } )
add_library ( dGame ${ SOURCES_DGAME } )
add_library ( dZoneManager ${ SOURCES_DZM } )
add_library ( dPhysics ${ SOURCES_DPHYSICS } )
target_link_libraries ( dNet dCommon ) #Needed because otherwise linker errors occur.
target_link_libraries ( dCommon ZLIB::ZLIB )
target_link_libraries ( dCommon libbcrypt )
Add Aarch64 support (#231)
* added mariadb-connector-cpp submodule
* raknet aarch64 support
* fix compile errors
* mariadb connector swap (in progress)
* update CMakeLists, add preprocessor definition to switch between mysql and mariadb connectors
* update types with missing aarch64 check
* corrected adding extra flag to properly compile mariadbconn in CMakeLists
* updated readme with arm builds section
* fix build failure if test folder does not exist
* Remove mysql connector from all builds, add mariadbconnector to windows build
* readd Linux check for backtrace lib to CMakeLists.txt
* Separate system specific mariadbconncpp extra compile flags
* Copy dlls to exes directory once built
* fetch prebuilt binaries on windows so that ClangCL can be used
* Delay load dll so that plugin directory is set correctly
* Fixed typo in glibcxx compile flag
* whitespacing, spaces -> tabs
* Updated README.md, included instructions to update
* Updated README.md
added libssl-dev requirement and removed mysql connector references from macOS builds section
* apple compile fixes for zlib and shared library name
* add windows arm64 checks to raknet
* remove extra . in shared library location
* Setup plugins directory for the connector to search in, pass openssl_root_dir on for apple
* Fix copy paths for single config generators and non windows
* change plugin folder location, another single config generator fix
* GENERATOR_IS_MULTI_CONFIG is a property not a variable
* Fixed a few errors after merge
* Fix plugin directory path, force windows to look at the right folder
* fixed directory name for make_directory command
* Update README.md
Updated MacOS, Windows build instructions.
* set INSTALL_PLUGINDIR so that the right directory is used
* Support for relative rpath for docker build
* added mariadb-connector-cpp submodule
* raknet aarch64 support
* fix compile errors
* mariadb connector swap (in progress)
* update CMakeLists, add preprocessor definition to switch between mysql and mariadb connectors
* update types with missing aarch64 check
* corrected adding extra flag to properly compile mariadbconn in CMakeLists
* updated readme with arm builds section
* fix build failure if test folder does not exist
* Remove mysql connector from all builds, add mariadbconnector to windows build
* readd Linux check for backtrace lib to CMakeLists.txt
* Separate system specific mariadbconncpp extra compile flags
* Copy dlls to exes directory once built
* fetch prebuilt binaries on windows so that ClangCL can be used
* Delay load dll so that plugin directory is set correctly
* Fixed typo in glibcxx compile flag
* whitespacing, spaces -> tabs
* Updated README.md, included instructions to update
* Updated README.md
added libssl-dev requirement and removed mysql connector references from macOS builds section
* apple compile fixes for zlib and shared library name
* add windows arm64 checks to raknet
* Setup plugins directory for the connector to search in, pass openssl_root_dir on for apple
* Fix copy paths for single config generators and non windows
* change plugin folder location, another single config generator fix
* GENERATOR_IS_MULTI_CONFIG is a property not a variable
* Fixed a few errors after merge
* Fix plugin directory path, force windows to look at the right folder
* fixed directory name for make_directory command
* Update README.md
Updated MacOS, Windows build instructions.
* set INSTALL_PLUGINDIR so that the right directory is used
* Support for relative rpath for docker build
* Rebase on main
* Remove extra git submodule
* Update CMakeLists.txt
* Remove CMakeLists.txt file from mariadb
Remove the CMakeLists.txt file from the mariaDBConnector so we dont build the tests. Also add a config option to the CMakeVariables.txt so you can build the connector with multiple jobs
* Compile on windows
Specify the mariadbcpp.dll file location with a defined absolute path so windows knows it actually exists.
* default to 1 job
Default mariadb jobs running in parallel to 1 instead of 4
* Move mariadbcpp.dll file to the expected directory on windows
* Changed plugin
Updated the plugin location from the project binary directory to the expected location, the mariadb binary directory.
* Addressed windows dll issues by moving files to the expected directory instead of a directory that wouldnt get created
* Update README
Co-authored-by: Aaron Kimbrell <aronwk.aaron@gmail.com>
Co-authored-by: EmosewaMC <39972741+EmosewaMC@users.noreply.github.com>
2022-07-04 04:33:05 +00:00
target_link_libraries ( dDatabase mariadbConnCpp )
target_link_libraries ( dNet dDatabase )
target_link_libraries ( dGame dDatabase )
target_link_libraries ( dChatFilter dDatabase )
2021-12-05 17:54:36 +00:00
2022-01-05 09:06:34 +00:00
if ( WIN32 )
target_link_libraries ( raknet ws2_32 )
endif ( WIN32 )
2021-12-05 17:54:36 +00:00
# Our executables:
add_executable ( WorldServer ${ SOURCES } )
add_executable ( AuthServer ${ SOURCES_AUTH } )
add_executable ( MasterServer ${ SOURCES_MASTER } )
add_executable ( ChatServer ${ SOURCES_CHAT } )
# Target libraries to link to:
target_link_libraries ( WorldServer dCommon )
target_link_libraries ( WorldServer dChatFilter )
target_link_libraries ( WorldServer dDatabase )
target_link_libraries ( WorldServer dNet )
target_link_libraries ( WorldServer dGame )
target_link_libraries ( WorldServer dZoneManager )
target_link_libraries ( WorldServer dPhysics )
target_link_libraries ( WorldServer detour )
target_link_libraries ( WorldServer recast )
target_link_libraries ( WorldServer raknet )
Add Aarch64 support (#231)
* added mariadb-connector-cpp submodule
* raknet aarch64 support
* fix compile errors
* mariadb connector swap (in progress)
* update CMakeLists, add preprocessor definition to switch between mysql and mariadb connectors
* update types with missing aarch64 check
* corrected adding extra flag to properly compile mariadbconn in CMakeLists
* updated readme with arm builds section
* fix build failure if test folder does not exist
* Remove mysql connector from all builds, add mariadbconnector to windows build
* readd Linux check for backtrace lib to CMakeLists.txt
* Separate system specific mariadbconncpp extra compile flags
* Copy dlls to exes directory once built
* fetch prebuilt binaries on windows so that ClangCL can be used
* Delay load dll so that plugin directory is set correctly
* Fixed typo in glibcxx compile flag
* whitespacing, spaces -> tabs
* Updated README.md, included instructions to update
* Updated README.md
added libssl-dev requirement and removed mysql connector references from macOS builds section
* apple compile fixes for zlib and shared library name
* add windows arm64 checks to raknet
* remove extra . in shared library location
* Setup plugins directory for the connector to search in, pass openssl_root_dir on for apple
* Fix copy paths for single config generators and non windows
* change plugin folder location, another single config generator fix
* GENERATOR_IS_MULTI_CONFIG is a property not a variable
* Fixed a few errors after merge
* Fix plugin directory path, force windows to look at the right folder
* fixed directory name for make_directory command
* Update README.md
Updated MacOS, Windows build instructions.
* set INSTALL_PLUGINDIR so that the right directory is used
* Support for relative rpath for docker build
* added mariadb-connector-cpp submodule
* raknet aarch64 support
* fix compile errors
* mariadb connector swap (in progress)
* update CMakeLists, add preprocessor definition to switch between mysql and mariadb connectors
* update types with missing aarch64 check
* corrected adding extra flag to properly compile mariadbconn in CMakeLists
* updated readme with arm builds section
* fix build failure if test folder does not exist
* Remove mysql connector from all builds, add mariadbconnector to windows build
* readd Linux check for backtrace lib to CMakeLists.txt
* Separate system specific mariadbconncpp extra compile flags
* Copy dlls to exes directory once built
* fetch prebuilt binaries on windows so that ClangCL can be used
* Delay load dll so that plugin directory is set correctly
* Fixed typo in glibcxx compile flag
* whitespacing, spaces -> tabs
* Updated README.md, included instructions to update
* Updated README.md
added libssl-dev requirement and removed mysql connector references from macOS builds section
* apple compile fixes for zlib and shared library name
* add windows arm64 checks to raknet
* Setup plugins directory for the connector to search in, pass openssl_root_dir on for apple
* Fix copy paths for single config generators and non windows
* change plugin folder location, another single config generator fix
* GENERATOR_IS_MULTI_CONFIG is a property not a variable
* Fixed a few errors after merge
* Fix plugin directory path, force windows to look at the right folder
* fixed directory name for make_directory command
* Update README.md
Updated MacOS, Windows build instructions.
* set INSTALL_PLUGINDIR so that the right directory is used
* Support for relative rpath for docker build
* Rebase on main
* Remove extra git submodule
* Update CMakeLists.txt
* Remove CMakeLists.txt file from mariadb
Remove the CMakeLists.txt file from the mariaDBConnector so we dont build the tests. Also add a config option to the CMakeVariables.txt so you can build the connector with multiple jobs
* Compile on windows
Specify the mariadbcpp.dll file location with a defined absolute path so windows knows it actually exists.
* default to 1 job
Default mariadb jobs running in parallel to 1 instead of 4
* Move mariadbcpp.dll file to the expected directory on windows
* Changed plugin
Updated the plugin location from the project binary directory to the expected location, the mariadb binary directory.
* Addressed windows dll issues by moving files to the expected directory instead of a directory that wouldnt get created
* Update README
Co-authored-by: Aaron Kimbrell <aronwk.aaron@gmail.com>
Co-authored-by: EmosewaMC <39972741+EmosewaMC@users.noreply.github.com>
2022-07-04 04:33:05 +00:00
target_link_libraries ( WorldServer mariadbConnCpp )
2021-12-05 17:54:36 +00:00
if ( UNIX )
target_link_libraries ( WorldServer pthread )
target_link_libraries ( WorldServer dl )
if ( NOT APPLE AND __include_backtrace__ )
target_link_libraries ( WorldServer backtrace )
target_link_libraries ( MasterServer backtrace )
target_link_libraries ( AuthServer backtrace )
target_link_libraries ( ChatServer backtrace )
endif ( )
endif ( UNIX )
target_link_libraries ( WorldServer tinyxml2 )
# Target libraries for Auth:
target_link_libraries ( AuthServer dCommon )
target_link_libraries ( AuthServer dDatabase )
target_link_libraries ( AuthServer dNet )
target_link_libraries ( AuthServer raknet )
Add Aarch64 support (#231)
* added mariadb-connector-cpp submodule
* raknet aarch64 support
* fix compile errors
* mariadb connector swap (in progress)
* update CMakeLists, add preprocessor definition to switch between mysql and mariadb connectors
* update types with missing aarch64 check
* corrected adding extra flag to properly compile mariadbconn in CMakeLists
* updated readme with arm builds section
* fix build failure if test folder does not exist
* Remove mysql connector from all builds, add mariadbconnector to windows build
* readd Linux check for backtrace lib to CMakeLists.txt
* Separate system specific mariadbconncpp extra compile flags
* Copy dlls to exes directory once built
* fetch prebuilt binaries on windows so that ClangCL can be used
* Delay load dll so that plugin directory is set correctly
* Fixed typo in glibcxx compile flag
* whitespacing, spaces -> tabs
* Updated README.md, included instructions to update
* Updated README.md
added libssl-dev requirement and removed mysql connector references from macOS builds section
* apple compile fixes for zlib and shared library name
* add windows arm64 checks to raknet
* remove extra . in shared library location
* Setup plugins directory for the connector to search in, pass openssl_root_dir on for apple
* Fix copy paths for single config generators and non windows
* change plugin folder location, another single config generator fix
* GENERATOR_IS_MULTI_CONFIG is a property not a variable
* Fixed a few errors after merge
* Fix plugin directory path, force windows to look at the right folder
* fixed directory name for make_directory command
* Update README.md
Updated MacOS, Windows build instructions.
* set INSTALL_PLUGINDIR so that the right directory is used
* Support for relative rpath for docker build
* added mariadb-connector-cpp submodule
* raknet aarch64 support
* fix compile errors
* mariadb connector swap (in progress)
* update CMakeLists, add preprocessor definition to switch between mysql and mariadb connectors
* update types with missing aarch64 check
* corrected adding extra flag to properly compile mariadbconn in CMakeLists
* updated readme with arm builds section
* fix build failure if test folder does not exist
* Remove mysql connector from all builds, add mariadbconnector to windows build
* readd Linux check for backtrace lib to CMakeLists.txt
* Separate system specific mariadbconncpp extra compile flags
* Copy dlls to exes directory once built
* fetch prebuilt binaries on windows so that ClangCL can be used
* Delay load dll so that plugin directory is set correctly
* Fixed typo in glibcxx compile flag
* whitespacing, spaces -> tabs
* Updated README.md, included instructions to update
* Updated README.md
added libssl-dev requirement and removed mysql connector references from macOS builds section
* apple compile fixes for zlib and shared library name
* add windows arm64 checks to raknet
* Setup plugins directory for the connector to search in, pass openssl_root_dir on for apple
* Fix copy paths for single config generators and non windows
* change plugin folder location, another single config generator fix
* GENERATOR_IS_MULTI_CONFIG is a property not a variable
* Fixed a few errors after merge
* Fix plugin directory path, force windows to look at the right folder
* fixed directory name for make_directory command
* Update README.md
Updated MacOS, Windows build instructions.
* set INSTALL_PLUGINDIR so that the right directory is used
* Support for relative rpath for docker build
* Rebase on main
* Remove extra git submodule
* Update CMakeLists.txt
* Remove CMakeLists.txt file from mariadb
Remove the CMakeLists.txt file from the mariaDBConnector so we dont build the tests. Also add a config option to the CMakeVariables.txt so you can build the connector with multiple jobs
* Compile on windows
Specify the mariadbcpp.dll file location with a defined absolute path so windows knows it actually exists.
* default to 1 job
Default mariadb jobs running in parallel to 1 instead of 4
* Move mariadbcpp.dll file to the expected directory on windows
* Changed plugin
Updated the plugin location from the project binary directory to the expected location, the mariadb binary directory.
* Addressed windows dll issues by moving files to the expected directory instead of a directory that wouldnt get created
* Update README
Co-authored-by: Aaron Kimbrell <aronwk.aaron@gmail.com>
Co-authored-by: EmosewaMC <39972741+EmosewaMC@users.noreply.github.com>
2022-07-04 04:33:05 +00:00
target_link_libraries ( AuthServer mariadbConnCpp )
2021-12-05 17:54:36 +00:00
if ( UNIX )
target_link_libraries ( AuthServer pthread )
target_link_libraries ( AuthServer dl )
endif ( UNIX )
# Target libraries for Master:
target_link_libraries ( MasterServer dCommon )
target_link_libraries ( MasterServer dDatabase )
target_link_libraries ( MasterServer dNet )
target_link_libraries ( MasterServer raknet )
Add Aarch64 support (#231)
* added mariadb-connector-cpp submodule
* raknet aarch64 support
* fix compile errors
* mariadb connector swap (in progress)
* update CMakeLists, add preprocessor definition to switch between mysql and mariadb connectors
* update types with missing aarch64 check
* corrected adding extra flag to properly compile mariadbconn in CMakeLists
* updated readme with arm builds section
* fix build failure if test folder does not exist
* Remove mysql connector from all builds, add mariadbconnector to windows build
* readd Linux check for backtrace lib to CMakeLists.txt
* Separate system specific mariadbconncpp extra compile flags
* Copy dlls to exes directory once built
* fetch prebuilt binaries on windows so that ClangCL can be used
* Delay load dll so that plugin directory is set correctly
* Fixed typo in glibcxx compile flag
* whitespacing, spaces -> tabs
* Updated README.md, included instructions to update
* Updated README.md
added libssl-dev requirement and removed mysql connector references from macOS builds section
* apple compile fixes for zlib and shared library name
* add windows arm64 checks to raknet
* remove extra . in shared library location
* Setup plugins directory for the connector to search in, pass openssl_root_dir on for apple
* Fix copy paths for single config generators and non windows
* change plugin folder location, another single config generator fix
* GENERATOR_IS_MULTI_CONFIG is a property not a variable
* Fixed a few errors after merge
* Fix plugin directory path, force windows to look at the right folder
* fixed directory name for make_directory command
* Update README.md
Updated MacOS, Windows build instructions.
* set INSTALL_PLUGINDIR so that the right directory is used
* Support for relative rpath for docker build
* added mariadb-connector-cpp submodule
* raknet aarch64 support
* fix compile errors
* mariadb connector swap (in progress)
* update CMakeLists, add preprocessor definition to switch between mysql and mariadb connectors
* update types with missing aarch64 check
* corrected adding extra flag to properly compile mariadbconn in CMakeLists
* updated readme with arm builds section
* fix build failure if test folder does not exist
* Remove mysql connector from all builds, add mariadbconnector to windows build
* readd Linux check for backtrace lib to CMakeLists.txt
* Separate system specific mariadbconncpp extra compile flags
* Copy dlls to exes directory once built
* fetch prebuilt binaries on windows so that ClangCL can be used
* Delay load dll so that plugin directory is set correctly
* Fixed typo in glibcxx compile flag
* whitespacing, spaces -> tabs
* Updated README.md, included instructions to update
* Updated README.md
added libssl-dev requirement and removed mysql connector references from macOS builds section
* apple compile fixes for zlib and shared library name
* add windows arm64 checks to raknet
* Setup plugins directory for the connector to search in, pass openssl_root_dir on for apple
* Fix copy paths for single config generators and non windows
* change plugin folder location, another single config generator fix
* GENERATOR_IS_MULTI_CONFIG is a property not a variable
* Fixed a few errors after merge
* Fix plugin directory path, force windows to look at the right folder
* fixed directory name for make_directory command
* Update README.md
Updated MacOS, Windows build instructions.
* set INSTALL_PLUGINDIR so that the right directory is used
* Support for relative rpath for docker build
* Rebase on main
* Remove extra git submodule
* Update CMakeLists.txt
* Remove CMakeLists.txt file from mariadb
Remove the CMakeLists.txt file from the mariaDBConnector so we dont build the tests. Also add a config option to the CMakeVariables.txt so you can build the connector with multiple jobs
* Compile on windows
Specify the mariadbcpp.dll file location with a defined absolute path so windows knows it actually exists.
* default to 1 job
Default mariadb jobs running in parallel to 1 instead of 4
* Move mariadbcpp.dll file to the expected directory on windows
* Changed plugin
Updated the plugin location from the project binary directory to the expected location, the mariadb binary directory.
* Addressed windows dll issues by moving files to the expected directory instead of a directory that wouldnt get created
* Update README
Co-authored-by: Aaron Kimbrell <aronwk.aaron@gmail.com>
Co-authored-by: EmosewaMC <39972741+EmosewaMC@users.noreply.github.com>
2022-07-04 04:33:05 +00:00
target_link_libraries ( MasterServer mariadbConnCpp )
2021-12-05 17:54:36 +00:00
if ( UNIX )
target_link_libraries ( MasterServer pthread )
target_link_libraries ( MasterServer dl )
endif ( UNIX )
# Target libraries for Chat:
target_link_libraries ( ChatServer dCommon )
target_link_libraries ( ChatServer dChatFilter )
target_link_libraries ( ChatServer dDatabase )
target_link_libraries ( ChatServer dNet )
target_link_libraries ( ChatServer raknet )
Add Aarch64 support (#231)
* added mariadb-connector-cpp submodule
* raknet aarch64 support
* fix compile errors
* mariadb connector swap (in progress)
* update CMakeLists, add preprocessor definition to switch between mysql and mariadb connectors
* update types with missing aarch64 check
* corrected adding extra flag to properly compile mariadbconn in CMakeLists
* updated readme with arm builds section
* fix build failure if test folder does not exist
* Remove mysql connector from all builds, add mariadbconnector to windows build
* readd Linux check for backtrace lib to CMakeLists.txt
* Separate system specific mariadbconncpp extra compile flags
* Copy dlls to exes directory once built
* fetch prebuilt binaries on windows so that ClangCL can be used
* Delay load dll so that plugin directory is set correctly
* Fixed typo in glibcxx compile flag
* whitespacing, spaces -> tabs
* Updated README.md, included instructions to update
* Updated README.md
added libssl-dev requirement and removed mysql connector references from macOS builds section
* apple compile fixes for zlib and shared library name
* add windows arm64 checks to raknet
* remove extra . in shared library location
* Setup plugins directory for the connector to search in, pass openssl_root_dir on for apple
* Fix copy paths for single config generators and non windows
* change plugin folder location, another single config generator fix
* GENERATOR_IS_MULTI_CONFIG is a property not a variable
* Fixed a few errors after merge
* Fix plugin directory path, force windows to look at the right folder
* fixed directory name for make_directory command
* Update README.md
Updated MacOS, Windows build instructions.
* set INSTALL_PLUGINDIR so that the right directory is used
* Support for relative rpath for docker build
* added mariadb-connector-cpp submodule
* raknet aarch64 support
* fix compile errors
* mariadb connector swap (in progress)
* update CMakeLists, add preprocessor definition to switch between mysql and mariadb connectors
* update types with missing aarch64 check
* corrected adding extra flag to properly compile mariadbconn in CMakeLists
* updated readme with arm builds section
* fix build failure if test folder does not exist
* Remove mysql connector from all builds, add mariadbconnector to windows build
* readd Linux check for backtrace lib to CMakeLists.txt
* Separate system specific mariadbconncpp extra compile flags
* Copy dlls to exes directory once built
* fetch prebuilt binaries on windows so that ClangCL can be used
* Delay load dll so that plugin directory is set correctly
* Fixed typo in glibcxx compile flag
* whitespacing, spaces -> tabs
* Updated README.md, included instructions to update
* Updated README.md
added libssl-dev requirement and removed mysql connector references from macOS builds section
* apple compile fixes for zlib and shared library name
* add windows arm64 checks to raknet
* Setup plugins directory for the connector to search in, pass openssl_root_dir on for apple
* Fix copy paths for single config generators and non windows
* change plugin folder location, another single config generator fix
* GENERATOR_IS_MULTI_CONFIG is a property not a variable
* Fixed a few errors after merge
* Fix plugin directory path, force windows to look at the right folder
* fixed directory name for make_directory command
* Update README.md
Updated MacOS, Windows build instructions.
* set INSTALL_PLUGINDIR so that the right directory is used
* Support for relative rpath for docker build
* Rebase on main
* Remove extra git submodule
* Update CMakeLists.txt
* Remove CMakeLists.txt file from mariadb
Remove the CMakeLists.txt file from the mariaDBConnector so we dont build the tests. Also add a config option to the CMakeVariables.txt so you can build the connector with multiple jobs
* Compile on windows
Specify the mariadbcpp.dll file location with a defined absolute path so windows knows it actually exists.
* default to 1 job
Default mariadb jobs running in parallel to 1 instead of 4
* Move mariadbcpp.dll file to the expected directory on windows
* Changed plugin
Updated the plugin location from the project binary directory to the expected location, the mariadb binary directory.
* Addressed windows dll issues by moving files to the expected directory instead of a directory that wouldnt get created
* Update README
Co-authored-by: Aaron Kimbrell <aronwk.aaron@gmail.com>
Co-authored-by: EmosewaMC <39972741+EmosewaMC@users.noreply.github.com>
2022-07-04 04:33:05 +00:00
target_link_libraries ( ChatServer mariadbConnCpp )
2021-12-05 17:54:36 +00:00
if ( UNIX )
target_link_libraries ( ChatServer pthread )
target_link_libraries ( ChatServer dl )
endif ( UNIX )
# Compiler flags:
# Disabled deprecated warnings as the MySQL includes have deprecated code in them.
# Disabled misleading indentation as DL_LinkedList from RakNet has a weird indent.
# Disabled no-register
# Disabled unknown pragmas because Linux doesn't understand Windows pragmas.
if ( UNIX )
if ( APPLE )
set ( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++17 -O2 -Wuninitialized -Wno-unused-result -Wno-unknown-pragmas -fpermissive -D_GLIBCXX_USE_CXX11_ABI=0 -D_GLIBCXX_USE_CXX17_ABI=0 -fPIC" )
else ( )
set ( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++17 -O2 -Wuninitialized -Wno-unused-result -Wno-unknown-pragmas -fpermissive -D_GLIBCXX_USE_CXX11_ABI=0 -D_GLIBCXX_USE_CXX17_ABI=0 -static-libgcc -fPIC" )
endif ( )
if ( __dynamic )
set ( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -rdynamic" )
endif ( )
if ( __ggdb )
set ( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -ggdb" )
endif ( )
set ( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c99 -O2 -fPIC" )
endif ( UNIX )
2022-01-01 09:38:45 +00:00
if ( WIN32 )
add_dependencies ( MasterServer WorldServer )
add_dependencies ( MasterServer AuthServer )
add_dependencies ( MasterServer ChatServer )
2022-01-03 15:00:21 +00:00
endif ( )
# Finally, add the tests
2022-01-04 08:26:43 +00:00
add_subdirectory ( tests )