From 7b24c067b52480f945f4bc0eb1c578fdb72a69a0 Mon Sep 17 00:00:00 2001 From: Luke1410 Date: Wed, 3 Jul 2019 17:23:58 +0200 Subject: [PATCH] - fixed compile warnings in 64-bit (#263, #265) - CMake - renamed project name from RakNet -> SLikeNet (#222) - by default build the retail version now (#222) - changed created include directory from raknet -> slikenet (#222) - changed target name for non-Windows platform to libslikenet using set_target_properties(OUTPUT_NAME) (#189) - added version number using set_target_properties() (VERSION and SOVERSION) (#222) - replaced usage of direct CMAKE_CXX_FLAGS variable by using add_definitions() (#222) - renamed variables RAKNET_XXX -> SLIKENET_XXX (#222) - correct the OpenSSL include directory (#254) - removed obsolete HAVE_64_BIT variable (#130) - removed obsolete RAKNET_INCLUDE_DIRS variable (#130) - multiple other tweaks (#130, #269) --- CMakeLists.txt | 69 +++++++++---------- CmakeIncludes/CmakeMacros.txt | 20 +++--- CmakeIncludes/FindMacros.txt | 30 ++++---- CmakeIncludes/Ogre3D/FindOGRE.cmake | 16 ++++- .../AutopatcherMySQLRepository/CMakeLists.txt | 10 +-- .../CMakeLists.txt | 10 +-- .../Autopatcher/CMakeLists.txt | 12 +++- DependentExtensions/CMakeLists.txt | 12 +++- .../IrrlichtDemo/CMakeLists.txt | 18 ++--- .../MySQLInterface/CMakeLists.txt | 12 +++- .../Ogre3DInterpDemo/CMakeLists.txt | 12 +++- .../PostgreSQLInterface/CMakeLists.txt | 12 +++- DependentExtensions/RPC3/CMakeLists.txt | 12 +++- Lib/CMakeLists.txt | 23 ++++--- Lib/DLL/CMakeLists.txt | 44 ++++++++---- Lib/LibStatic/CMakeLists.txt | 45 ++++++++---- .../AutoPatcherServer_MySQL/CMakeLists.txt | 10 +-- Samples/AutopatcherClient/CMakeLists.txt | 10 +-- .../AutopatcherClientGFx3.0/CMakeLists.txt | 8 +-- .../AutopatcherClientRestarter/CMakeLists.txt | 6 +- Samples/AutopatcherServer/CMakeLists.txt | 10 +-- Samples/ChatExample/CMakeLists.txt | 8 +-- Samples/DirectoryDeltaTransfer/CMakeLists.txt | 6 +- Samples/Lobby2Client/CMakeLists.txt | 14 ++-- Samples/NATCompleteClient/CMakeLists.txt | 14 ++-- Samples/NATCompleteServer/CMakeLists.txt | 4 +- Samples/RPC3/CMakeLists.txt | 10 ++- Samples/RakVoice/CMakeLists.txt | 14 ++-- Samples/RakVoiceDSound/CMakeLists.txt | 10 +-- Samples/RakVoiceFMOD/CMakeLists.txt | 14 ++-- Source/src/RakNetTypes.cpp | 3 +- changelog.txt | 12 +++- 32 files changed, 310 insertions(+), 200 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index dedeb6a4d..c11d87bb0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -3,8 +3,7 @@ # Please see licenses/RakNet license.txt for the underlying license and related copyright. # # -# -# Modified work: Copyright (c) 2016, SLikeSoft UG (haftungsbeschränkt) +# Modified work: Copyright (c) 2016-2019, SLikeSoft UG (haftungsbeschränkt) # # This source code was modified by SLikeSoft. Modifications are licensed under the MIT-style # license found in the license.txt file in the root directory of this source tree. @@ -12,7 +11,11 @@ cmake_minimum_required(VERSION 2.6) -project(RakNet) +project(SLikeNet) + +# specify the project version number +set(SLikeNet_VERSION "0.2.0") +set(SLikeNet_API_VERSION "0.2") # CMake policy settings if( POLICY CMP0037 ) @@ -31,25 +34,15 @@ if( CMAKE_VERSION VERSION_LESS 3.0 ) endif() endif() - -if( NOT APPLE ) -# check 64 bit -if( CMAKE_SIZEOF_VOID_P MATCHES "4" ) - set( HAVE_64_BIT 0 ) -else( CMAKE_SIZEOF_VOID_P MATCHES "4") - set( HAVE_64_BIT 1 ) -endif( CMAKE_SIZEOF_VOID_P MATCHES "4") -endif( NOT APPLE ) - IF (WIN32 AND NOT UNIX) set (PROGRAMFILESX86 $ENV{PROGRAMFILES}) string(REPLACE "\\" "/" PROGRAMFILESX86 "${PROGRAMFILESX86}") ENDIF(WIN32 AND NOT UNIX) IF (WIN32 AND NOT UNIX) - set(RAKNET_LIBRARY_LIBS ws2_32.lib) + set(SLIKENET_LIBRARY_LIBS ws2_32.lib) ELSE(WIN32 AND NOT UNIX) - set(RAKNET_LIBRARY_LIBS pthread) + set(SLIKENET_LIBRARY_LIBS pthread) ENDIF(WIN32 AND NOT UNIX) # enable C++11 language support for GCC @@ -66,39 +59,41 @@ endif() # Options IF (WIN32 AND NOT UNIX) - option( RAKNET_ENABLE_SAMPLES "Generate RakNet sample projects if true." TRUE ) + option( SLIKENET_ENABLE_SAMPLES "Generate sample projects if true." TRUE ) ELSE (WIN32 AND NOT UNIX) # building samples is disabled atm by default on Unix/Mac, since the sample projects won't compile correctly - option( RAKNET_ENABLE_SAMPLES "Generate RakNet sample projects if true." FALSE ) + option( SLIKENET_ENABLE_SAMPLES "Generate sample projects if true." FALSE ) ENDIF(WIN32 AND NOT UNIX) -option( RAKNET_ENABLE_DLL "Generate the DLL project if true." TRUE ) -option( RAKNET_ENABLE_STATIC "Generate the static library project if true." TRUE ) -option( RAKNET_GENERATE_INCLUDE_ONLY_DIR "Setup a include/RakNet/ directory in which all the headers are copied." FALSE ) - -set( RAKNETHEADERFILES ${RakNet_SOURCE_DIR}/Source ) #This name doesn't follow CMake conventions but for retro compatibility I'll let it there. - -if( RAKNET_GENERATE_INCLUDE_ONLY_DIR ) - set( RAKNET_INCLUDE_ONLY_DIR ${RakNet_SOURCE_DIR}/include ) # this will be visible by client code - set( RAKNET_NAMED_INCLUDE_ONLY_DIR ${RAKNET_INCLUDE_ONLY_DIR}/RakNet ) - message( STATUS "Setting up the ${RAKNET_NAMED_INCLUDE_ONLY_DIR} directory..." ) - # Now setup the include/RakNet/*.h files. - file( MAKE_DIRECTORY ${RAKNET_NAMED_INCLUDE_ONLY_DIR} ) - file( COPY ${RAKNETHEADERFILES}/ DESTINATION ${RAKNET_NAMED_INCLUDE_ONLY_DIR} FILES_MATCHING PATTERN "*.h" ) - message( STATUS "DONE: Setting up the ${RAKNET_NAMED_INCLUDE_ONLY_DIR} directory." ) +option( SLIKENET_ENABLE_DLL "Generate the DLL / shared object project if true." TRUE ) +option( SLIKENET_ENABLE_STATIC "Generate the static library project if true." TRUE ) +option( SLIKENET_GENERATE_INCLUDE_ONLY_DIR "Setup an include/slikenet/ directory in which all the headers are copied." FALSE ) + +set( SLIKENET_HEADER_FILES ${SLikeNet_SOURCE_DIR}/Source ) + +# note: while it's straight forward to get the SLikeNet include files directly from source (since they are cleanly organized under Source/include/slikenet/*), copying the headers in RakNet compatibility mode is not that clear +# since we are planning to add support for RakNet compatibility mode to CMake too, we keep this option +# also the planned addition for making experimental features optional/configurable would require additional logic here, so that there certainly is a purpose for this feature even with the cleaner header file structure in SLikeNet +if( SLIKENET_GENERATE_INCLUDE_ONLY_DIR ) + set( SLIKENET_INCLUDE_ONLY_DIR ${SLikeNet_SOURCE_DIR}/include ) # this will be visible by client code + set( SLIKENET_NAMED_INCLUDE_ONLY_DIR ${SLIKENET_INCLUDE_ONLY_DIR}/slikenet ) + message( STATUS "Setting up the ${SLIKENET_NAMED_INCLUDE_ONLY_DIR} directory..." ) + + # Now setup the include/slikenet directory. + file( MAKE_DIRECTORY ${SLIKENET_NAMED_INCLUDE_ONLY_DIR} ) + file( MAKE_DIRECTORY ${SLIKENET_NAMED_INCLUDE_ONLY_DIR}/crypto ) + file( COPY ${SLIKENET_HEADER_FILES}/include/slikenet DESTINATION ${SLIKENET_NAMED_INCLUDE_ONLY_DIR} ) + file( COPY ${SLIKENET_HEADER_FILES}/include/slikenet/crypto DESTINATION ${SLIKENET_NAMED_INCLUDE_ONLY_DIR} ) + message( STATUS "DONE: Setting up the ${SLIKENET_NAMED_INCLUDE_ONLY_DIR} directory." ) endif() -set( RAKNET_INCLUDE_DIRS ${RAKNETHEADERFILES} ${RAKNET_INCLUDE_ONLY_DIR} ) # Visible from outside - include(./CmakeIncludes/CmakeMacros.txt) FIXLINKOPTIONS() FIXCOMPILEOPTIONS() - add_subdirectory(Lib) +set(SLIKENET_COMMON_LIBS SLikeNetLibStatic) -set(RAKNET_COMMON_LIBS RakNetLibStatic) - -if( RAKNET_ENABLE_SAMPLES ) +if(SLIKENET_ENABLE_SAMPLES) add_subdirectory(Samples) endif() diff --git a/CmakeIncludes/CmakeMacros.txt b/CmakeIncludes/CmakeMacros.txt index 0eadf6326..325ae733e 100644 --- a/CmakeIncludes/CmakeMacros.txt +++ b/CmakeIncludes/CmakeMacros.txt @@ -5,7 +5,7 @@ # Please see licenses/RakNet license.txt for the underlying license and related copyright. # # -# Modified work: Copyright (c) 2017, SLikeSoft UG (haftungsbeschränkt) +# Modified work: Copyright (c) 2017-2019, SLikeSoft UG (haftungsbeschränkt) # # This source code was modified by SLikeSoft. Modifications are licensed under the MIT-style # license found in the license.txt file in the root directory of this source tree. @@ -15,10 +15,10 @@ MACRO(STANDARDSUBPROJECT PROJECTNAME)#Many of the projects just need the cpp fil project(${PROJECTNAME}) FILE(GLOB ALL_CPP_SRCS *.cpp) FILE(GLOB ALL_HEADER_SRCS *.h) - include_directories(${RAKNETHEADERFILES} ./) + include_directories(${SLIKENET_HEADER_FILES} ./) FIXCOMPILEOPTIONS() add_executable(${PROJECTNAME} ${ALL_CPP_SRCS} ${ALL_HEADER_SRCS}) - target_link_libraries(${PROJECTNAME} ${RAKNET_COMMON_LIBS}) + target_link_libraries(${PROJECTNAME} ${SLIKENET_COMMON_LIBS}) set_target_properties(${PROJECTNAME} PROPERTIES PROJECT_GROUP Samples) ENDMACRO(STANDARDSUBPROJECT) @@ -27,9 +27,9 @@ MACRO(STANDARDSUBPROJECTWITHOPTIONS PROJECTNAME EXTRAINCLUDES EXTRASOURCES EXTRA FILE(GLOB ALL_CPP_SRCS *.cpp) FILE(GLOB ALL_HEADER_SRCS *.h) FIXCOMPILEOPTIONS() - include_directories(${RAKNETHEADERFILES} ./ ${EXTRAINCLUDES}) + include_directories(${SLIKENET_HEADER_FILES} ./ ${EXTRAINCLUDES}) add_executable(${PROJECTNAME} ${ALL_CPP_SRCS} ${ALL_HEADER_SRCS} ${EXTRASOURCES}) - target_link_libraries(${PROJECTNAME} ${RAKNET_COMMON_LIBS} ${EXTRALIBS}) + target_link_libraries(${PROJECTNAME} ${SLIKENET_COMMON_LIBS} ${EXTRALIBS}) set_target_properties(${PROJECTNAME} PROPERTIES PROJECT_GROUP Samples) ENDMACRO(STANDARDSUBPROJECTWITHOPTIONS) @@ -38,9 +38,9 @@ MACRO(STANDARDSUBPROJECTWITHOPTIONSSET PROJECTNAME)#Same as STANDARDSUBPROJECT b FILE(GLOB ALL_CPP_SRCS *.cpp) FILE(GLOB ALL_HEADER_SRCS *.h) FIXCOMPILEOPTIONS() - include_directories(${RAKNETHEADERFILES} ./ ${EXTRAINCLUDES}) + include_directories(${SLIKENET_HEADER_FILES} ./ ${EXTRAINCLUDES}) add_executable(${PROJECTNAME} ${ALL_CPP_SRCS} ${ALL_HEADER_SRCS} ${EXTRASOURCES}) - target_link_libraries(${PROJECTNAME} ${RAKNET_COMMON_LIBS} ${EXTRALIBS}) + target_link_libraries(${PROJECTNAME} ${SLIKENET_COMMON_LIBS} ${EXTRALIBS}) set_target_properties(${PROJECTNAME} PROPERTIES PROJECT_GROUP Samples) ENDMACRO(STANDARDSUBPROJECTWITHOPTIONSSET) @@ -48,10 +48,10 @@ MACRO(STANDARDCSUBPROJECT PROJECTNAME)#Same as STANDARDSUBPROJECT but for C file project(${PROJECTNAME}) FILE(GLOB ALL_C_SRCS *.c) FILE(GLOB ALL_HEADER_SRCS *.h) - include_directories(${RAKNETHEADERFILES} ./) + include_directories(${SLIKENET_HEADER_FILES} ./) FIXCOMPILEOPTIONS() add_executable(${PROJECTNAME} ${ALL_C_SRCS} ${ALL_HEADER_SRCS}) - target_link_libraries(${PROJECTNAME} ${RAKNET_COMMON_LIBS}) + target_link_libraries(${PROJECTNAME} ${SLIKENET_COMMON_LIBS}) set_target_properties(${PROJECTNAME} PROPERTIES PROJECT_GROUP Samples) ENDMACRO(STANDARDCSUBPROJECT) @@ -107,4 +107,4 @@ MACRO(FIXLINKOPTIONS)#Fix added link options that may cause problems ENDIF(WIN32 AND NOT UNIX) ENDMACRO(FIXLINKOPTIONS) -include(${RakNet_SOURCE_DIR}/CmakeIncludes/FindMacros.txt)#The macros for setting variables and performing finds +include(${SLikeNet_SOURCE_DIR}/CmakeIncludes/FindMacros.txt)#The macros for setting variables and performing finds diff --git a/CmakeIncludes/FindMacros.txt b/CmakeIncludes/FindMacros.txt index 5082bb632..7a56972ee 100644 --- a/CmakeIncludes/FindMacros.txt +++ b/CmakeIncludes/FindMacros.txt @@ -1,10 +1,16 @@ # -# This file was taken from RakNet 4.082 without any modifications. +# This file was taken from RakNet 4.082. # Please see licenses/RakNet license.txt for the underlying license and related copyright. # +# +# Modified work: Copyright (c) 2019, SLikeSoft UG (haftungsbeschränkt) +# +# This source code was modified by SLikeSoft. Modifications are licensed under the MIT-style +# license found in the license.txt file in the root directory of this source tree. +# MACRO(FINDMYSQL)#A macro interface for finding a dependency - include(${RakNet_SOURCE_DIR}/CmakeIncludes/FindMySQL.cmake) + include(${SLikeNet_SOURCE_DIR}/CmakeIncludes/FindMySQL.cmake) IF(NOT MYSQL_FOUND) IF(WIN32) set(MYSQL_LIBRARIES "${PROGRAMFILESX86}/MySQL/MySQL Server 5.1/lib/opt/libmysql.lib") @@ -24,7 +30,7 @@ MACRO(FINDPOSTGRE)#A macro interface for finding a dependency ELSE(WIN32) set(CUSTOMPROGRAMFILES "") ENDIF(WIN32) - include(${RakNet_SOURCE_DIR}/CmakeIncludes/FindPostgreSQL.cmake) + include(${SLikeNet_SOURCE_DIR}/CmakeIncludes/FindPostgreSQL.cmake) IF(NOT POSTGRESQL_FOUND) IF(WIN32) set(POSTGRESQL_LIBRARIES "${PROGRAMFILESX86}/PostgreSQL/8.4/lib/libpq.lib") @@ -44,7 +50,7 @@ MACRO(FINDPORTAUDIO)#A macro interface for finding a dependency set(PORTAUDIO_LIBRARIES LibPortAudioV18_1) set(PORTAUDIO_FOUND TRUE) ELSE(WIN32) - include(${RakNet_SOURCE_DIR}/CmakeIncludes/FindPortAudio.cmake) + include(${SLikeNet_SOURCE_DIR}/CmakeIncludes/FindPortAudio.cmake) ENDIF(WIN32) IF(NOT PORTAUDIO_FOUND) IF(NOT WIN32) @@ -61,7 +67,7 @@ MACRO(FINDSPEEX)#A macro interface for finding a dependency set(SPEEX_LIBRARIES LibSpeex) set(SPEEX_FOUND TRUE) ELSE(WIN32) - include(${RakNet_SOURCE_DIR}/CmakeIncludes/FindSpeex.cmake) + include(${SLikeNet_SOURCE_DIR}/CmakeIncludes/FindSpeex.cmake) FINDSPEEXDSP() ENDIF(WIN32) IF(NOT SPEEX_FOUND) @@ -77,7 +83,7 @@ MACRO(FINDSPEEX)#A macro interface for finding a dependency ENDMACRO(FINDSPEEX) MACRO(FINDBOOST)#A macro interface for finding a dependency - include(${RakNet_SOURCE_DIR}/CmakeIncludes/FindBoost.cmake) + include(${SLikeNet_SOURCE_DIR}/CmakeIncludes/FindBoost.cmake) IF(NOT Boost_FOUND) IF(WIN32) set(Boost_INCLUDE_DIRS "${PROGRAMFILESX86}/boost/boost_1_35") @@ -92,7 +98,7 @@ MACRO(FINDBOOST)#A macro interface for finding a dependency ENDMACRO(FINDBOOST) MACRO(FINDSPEEXDSP)#A macro interface for finding a dependency - include(${RakNet_SOURCE_DIR}/CmakeIncludes/FindSpeexDSP.cmake) + include(${SLikeNet_SOURCE_DIR}/CmakeIncludes/FindSpeexDSP.cmake) IF(NOT SPEEXDSP_FOUND) set(SPEEXDSP_INCLUDE_DIRS "/usr/include") set(SPEEXDSP_LIBRARIES "/usr/lib/libspeexdsp.so") @@ -140,7 +146,7 @@ MACRO(FINDSCALEGFX) ENDMACRO(FINDSCALEGFX) MACRO(FINDFMODEX)#A macro interface for finding a dependency - include(${RakNet_SOURCE_DIR}/CmakeIncludes/FindFMODEx.cmake) + include(${SLikeNet_SOURCE_DIR}/CmakeIncludes/FindFMODEx.cmake) IF(NOT FMODEX_FOUND) IF(WIN32) set(FMODEX_LIBRARY "${PROGRAMFILESX86}/FMOD SoundSystem/FMOD Programmers API Win32/api/lib/${WINLIBNAME}.${WINLIBEXT}") @@ -158,7 +164,7 @@ MACRO(FINDIRRLICHT) message(STATUS "You are building with the Irrlicht option enabled,\n if irrlicht include location is not C:/irrlicht-1.6/include\n change IRRLICHT_INCLUDE_DIR with the GUI or -D command line option.\n NOTE: YOU MUST USE VERSION 1.6 for this demo.") set(IRRLICHT_INCLUDE_DIR "C:/irrlicht-1.6/include" CACHE PATH "The Irrlicht unzip location") ELSE(WIN32 AND NOT UNIX) - include(${RakNet_SOURCE_DIR}/CmakeIncludes/FindIrrlicht.cmake) + include(${SLikeNet_SOURCE_DIR}/CmakeIncludes/FindIrrlicht.cmake) IF(NOT IRRLICHT_FOUND) set(IRRLICHT_INCLUDE_DIR "/usr/include/irrlicht") set(IRRLICHT_LIBRARIES "/usr/local/lib/libIrrlicht.so") @@ -171,7 +177,7 @@ MACRO(FINDIRRKLANG) IF(WIN32 AND NOT UNIX) #currently not needed a space is here for future use ELSE(WIN32 AND NOT UNIX) - include(${RakNet_SOURCE_DIR}/CmakeIncludes/FindIrrKlang.cmake) + include(${SLikeNet_SOURCE_DIR}/CmakeIncludes/FindIrrKlang.cmake) IF(NOT IRRKLANG_FOUND) set(IRRKLANG_INCLUDE_DIR "/usr/include/irrklang") set(IRRKLANG_LIBRARIES "/usr/local/lib/libIrrKlang.so") @@ -181,7 +187,7 @@ MACRO(FINDIRRKLANG) ENDMACRO(FINDIRRKLANG) MACRO(FINDOGRE3D)#A macro interface for finding a dependency - include(${RakNet_SOURCE_DIR}/CmakeIncludes/Ogre3D/FindOGRE.cmake) + include(${SLikeNet_SOURCE_DIR}/CmakeIncludes/Ogre3D/FindOGRE.cmake) IF(NOT OGRE_FOUND) IF(WIN32) FILE(GLOB OGRE_LIBRARIES "C:/OgreSDK/lib/*.lib") @@ -196,7 +202,7 @@ MACRO(FINDOGRE3D)#A macro interface for finding a dependency ENDMACRO(FINDOGRE3D) MACRO(FINDOIS)#A macro interface for finding a dependency - include(${RakNet_SOURCE_DIR}/CmakeIncludes/Ogre3D/FindOIS.cmake) + include(${SLikeNet_SOURCE_DIR}/CmakeIncludes/Ogre3D/FindOIS.cmake) IF(NOT OIS_FOUND) IF(WIN32) set(OIS_LIBRARIES "") diff --git a/CmakeIncludes/Ogre3D/FindOGRE.cmake b/CmakeIncludes/Ogre3D/FindOGRE.cmake index ee93f944c..f15f3299c 100644 --- a/CmakeIncludes/Ogre3D/FindOGRE.cmake +++ b/CmakeIncludes/Ogre3D/FindOGRE.cmake @@ -1,7 +1,17 @@ -#This has been modified fron the original +# This file was taken from RakNet 4.082. +# Please see licenses/RakNet license.txt for the underlying license and related copyright. +# +# +# Modified work: Copyright (c) 2019, SLikeSoft UG (haftungsbeschränkt) +# +# This source code was modified by SLikeSoft. Modifications are licensed under the MIT-style +# license found in the license.txt file in the root directory of this source tree. +# + +#This has been modified fron the original -include(${RakNet_SOURCE_DIR}/CmakeIncludes/Ogre3D/PreprocessorUtils.cmake) -include(${RakNet_SOURCE_DIR}/CmakeIncludes/Ogre3D/FindPkgMacros.cmake) +include(${SLikeNet_SOURCE_DIR}/CmakeIncludes/Ogre3D/PreprocessorUtils.cmake) +include(${SLikeNet_SOURCE_DIR}/CmakeIncludes/Ogre3D/FindPkgMacros.cmake) #------------------------------------------------------------------- # This file is part of the CMake build system for OGRE diff --git a/DependentExtensions/Autopatcher/AutopatcherMySQLRepository/CMakeLists.txt b/DependentExtensions/Autopatcher/AutopatcherMySQLRepository/CMakeLists.txt index b125e9b51..d1ecec848 100644 --- a/DependentExtensions/Autopatcher/AutopatcherMySQLRepository/CMakeLists.txt +++ b/DependentExtensions/Autopatcher/AutopatcherMySQLRepository/CMakeLists.txt @@ -3,7 +3,7 @@ # Please see licenses/RakNet license.txt for the underlying license and related copyright. # # -# Modified work: Copyright (c) 2017, SLikeSoft UG (haftungsbeschränkt) +# Modified work: Copyright (c) 2017-2019, SLikeSoft UG (haftungsbeschränkt) # # This source code was modified by SLikeSoft. Modifications are licensed under the MIT-style # license found in the license.txt file in the root directory of this source tree. @@ -14,14 +14,14 @@ FINDMYSQL() IF(WIN32 AND NOT UNIX) FILE(GLOB ALL_HEADER_SRCS *.h ${MySQLInterface_SOURCE_DIR}/MySQLInterFace.h ${Autopatcher_SOURCE_DIR}/ApplyPatch.h) FILE(GLOB ALL_CPP_SRCS *.cpp ${MySQLInterface_SOURCE_DIR}/MySQLInterFace.cpp ${Autopatcher_SOURCE_DIR}/ApplyPatch.cpp) - include_directories(${RAKNETHEADERFILES} ./ ${MySQLInterface_SOURCE_DIR} ${Autopatcher_SOURCE_DIR} ${MYSQL_INCLUDE_DIR} ${BZip2_SOURCE_DIR}) + include_directories(${SLIKENET_HEADER_FILES} ./ ${MySQLInterface_SOURCE_DIR} ${Autopatcher_SOURCE_DIR} ${MYSQL_INCLUDE_DIR} ${BZip2_SOURCE_DIR}) add_library(AutoPatcherMySQLRepository STATIC ${ALL_CPP_SRCS} ${ALL_HEADER_SRCS}) - target_link_libraries (AutoPatcherMySQLRepository ${RAKNET_COMMON_LIBS} ${MYSQL_LIBRARIES}) + target_link_libraries (AutoPatcherMySQLRepository ${SLIKENET_COMMON_LIBS} ${MYSQL_LIBRARIES}) VSUBFOLDER(AutoPatcherMySQLRepository "Samples/AutoPatcher/Server/MySQL") ELSE(WIN32 AND NOT UNIX) FILE(GLOB ALL_HEADER_SRCS *.h) FILE(GLOB ALL_CPP_SRCS *.cpp) - include_directories(${RAKNETHEADERFILES} ./ ${MySQLInterface_SOURCE_DIR} ${Autopatcher_SOURCE_DIR} ${MYSQL_INCLUDE_DIR}) + include_directories(${SLIKENET_HEADER_FILES} ./ ${MySQLInterface_SOURCE_DIR} ${Autopatcher_SOURCE_DIR} ${MYSQL_INCLUDE_DIR}) add_library(AutoPatcherMySQLRepository STATIC ${ALL_CPP_SRCS} ${ALL_HEADER_SRCS}) - target_link_libraries (AutoPatcherMySQLRepository ${RAKNET_COMMON_LIBS} LibAutopatcher LibMySQLInterface ${MYSQL_LIBRARIES}) + target_link_libraries (AutoPatcherMySQLRepository ${SLIKENET_COMMON_LIBS} LibAutopatcher LibMySQLInterface ${MYSQL_LIBRARIES}) ENDIF(WIN32 AND NOT UNIX) diff --git a/DependentExtensions/Autopatcher/AutopatcherPostgreRepository/CMakeLists.txt b/DependentExtensions/Autopatcher/AutopatcherPostgreRepository/CMakeLists.txt index ced8af366..4d37aa905 100644 --- a/DependentExtensions/Autopatcher/AutopatcherPostgreRepository/CMakeLists.txt +++ b/DependentExtensions/Autopatcher/AutopatcherPostgreRepository/CMakeLists.txt @@ -3,7 +3,7 @@ # Please see licenses/RakNet license.txt for the underlying license and related copyright. # # -# Modified work: Copyright (c) 2017, SLikeSoft UG (haftungsbeschränkt) +# Modified work: Copyright (c) 2017-2019, SLikeSoft UG (haftungsbeschränkt) # # This source code was modified by SLikeSoft. Modifications are licensed under the MIT-style # license found in the license.txt file in the root directory of this source tree. @@ -14,14 +14,14 @@ FINDPOSTGRE() IF(WIN32 AND NOT UNIX) FILE(GLOB ALL_HEADER_SRCS *.h ${PostgreSQLInterface_SOURCE_DIR}/PostgreSQLInterface.h ${Autopatcher_SOURCE_DIR}/ApplyPatch.h ${Autopatcher_SOURCE_DIR}/CreatePatch.h) FILE(GLOB ALL_CPP_SRCS *.cpp ${PostgreSQLInterface_SOURCE_DIR}/PostgreSQLInterface.cpp ${Autopatcher_SOURCE_DIR}/ApplyPatch.cpp ${Autopatcher_SOURCE_DIR}/CreatePatch.cpp) - include_directories(${RAKNETHEADERFILES} ./ ${PostgreSQLInterface_SOURCE_DIR} ${Autopatcher_SOURCE_DIR} ${POSTGRESQL_INCLUDE_DIR} ${BZip2_SOURCE_DIR}) + include_directories(${SLIKENET_HEADER_FILES} ./ ${PostgreSQLInterface_SOURCE_DIR} ${Autopatcher_SOURCE_DIR} ${POSTGRESQL_INCLUDE_DIR} ${BZip2_SOURCE_DIR}) add_library(AutopatcherPostgreRepository STATIC ${ALL_CPP_SRCS} ${ALL_HEADER_SRCS}) - target_link_libraries (AutopatcherPostgreRepository ${RAKNET_COMMON_LIBS} ${POSTGRESQL_LIBRARIES}) + target_link_libraries (AutopatcherPostgreRepository ${SLIKENET_COMMON_LIBS} ${POSTGRESQL_LIBRARIES}) VSUBFOLDER(AutopatcherPostgreRepository "Samples/AutoPatcher/Server/PostgreSQL") ELSE(WIN32 AND NOT UNIX) FILE(GLOB ALL_HEADER_SRCS *.h) FILE(GLOB ALL_CPP_SRCS *.cpp) - include_directories(${RAKNETHEADERFILES} ./ ${PostgreSQLInterface_SOURCE_DIR} ${Autopatcher_SOURCE_DIR} ${POSTGRESQL_INCLUDE_DIR}) + include_directories(${SLIKENET_HEADER_FILES} ./ ${PostgreSQLInterface_SOURCE_DIR} ${Autopatcher_SOURCE_DIR} ${POSTGRESQL_INCLUDE_DIR}) add_library(AutopatcherPostgreRepository STATIC ${ALL_CPP_SRCS} ${ALL_HEADER_SRCS}) - target_link_libraries (AutopatcherPostgreRepository ${RAKNET_COMMON_LIBS} LibAutopatcher LibPostgreSQLInterface ${POSTGRESQL_LIBRARIES}) + target_link_libraries (AutopatcherPostgreRepository ${SLIKENET_COMMON_LIBS} LibAutopatcher LibPostgreSQLInterface ${POSTGRESQL_LIBRARIES}) ENDIF(WIN32 AND NOT UNIX) diff --git a/DependentExtensions/Autopatcher/CMakeLists.txt b/DependentExtensions/Autopatcher/CMakeLists.txt index 66df5cede..ffc79f56a 100644 --- a/DependentExtensions/Autopatcher/CMakeLists.txt +++ b/DependentExtensions/Autopatcher/CMakeLists.txt @@ -1,15 +1,21 @@ # -# This file was taken from RakNet 4.082 without any modifications. +# This file was taken from RakNet 4.082. # Please see licenses/RakNet license.txt for the underlying license and related copyright. # +# +# Modified work: Copyright (c) 2019, SLikeSoft UG (haftungsbeschränkt) +# +# This source code was modified by SLikeSoft. Modifications are licensed under the MIT-style +# license found in the license.txt file in the root directory of this source tree. +# project(Autopatcher) IF (UNIX AND NOT WIN32) FILE(GLOB ALL_HEADER_SRCS *.h) FILE(GLOB ALL_CPP_SRCS *.cpp) - include_directories(${RAKNETHEADERFILES} ./ ${bzip2-1.0.3_SOURCE_DIR}) + include_directories(${SLIKENET_HEADER_FILES} ./ ${bzip2-1.0.3_SOURCE_DIR}) add_library(LibAutopatcher STATIC ${ALL_CPP_SRCS} ${ALL_HEADER_SRCS}) - target_link_libraries (LibAutopatcher ${RAKNET_COMMON_LIBS} LibBZip2) + target_link_libraries (LibAutopatcher ${SLIKENET_COMMON_LIBS} LibBZip2) ENDIF(UNIX AND NOT WIN32) IF(USEMYSQL AND NOT DISABLEDEPENDENCIES) add_subdirectory(AutopatcherMySQLRepository) diff --git a/DependentExtensions/CMakeLists.txt b/DependentExtensions/CMakeLists.txt index 23f614d3f..cd6364267 100644 --- a/DependentExtensions/CMakeLists.txt +++ b/DependentExtensions/CMakeLists.txt @@ -1,7 +1,13 @@ # -# This file was taken from RakNet 4.082 without any modifications. +# This file was taken from RakNet 4.082. # Please see licenses/RakNet license.txt for the underlying license and related copyright. # +# +# Modified work: Copyright (c) 2019, SLikeSoft UG (haftungsbeschränkt) +# +# This source code was modified by SLikeSoft. Modifications are licensed under the MIT-style +# license found in the license.txt file in the root directory of this source tree. +# cmake_minimum_required(VERSION 2.6) @@ -53,9 +59,9 @@ endif() IF(NOT WIN32 AND UNIX) IF(RAKNET_EXTENSION_USESPEEX AND RAKNET_ENABLE_EXTENSIONS) FINDSPEEX() - include_directories(${RAKNETHEADERFILES} ${SPEEX_INCLUDE_DIRS}) + include_directories(${SLIKENET_HEADER_FILES} ${SPEEX_INCLUDE_DIRS}) add_library(LibRakVoice STATIC RakVoice.h RakVoice.cpp) - target_link_libraries(LibRakVoice ${RAKNET_COMMON_LIBS} ${SPEEX_LIBRARIES}) + target_link_libraries(LibRakVoice ${SLIKENET_COMMON_LIBS} ${SPEEX_LIBRARIES}) ENDIF() ENDIF() diff --git a/DependentExtensions/IrrlichtDemo/CMakeLists.txt b/DependentExtensions/IrrlichtDemo/CMakeLists.txt index 1bcebe0c0..47aa076ab 100644 --- a/DependentExtensions/IrrlichtDemo/CMakeLists.txt +++ b/DependentExtensions/IrrlichtDemo/CMakeLists.txt @@ -3,7 +3,7 @@ # Please see licenses/RakNet license.txt for the underlying license and related copyright. # # -# Modified work: Copyright (c) 2017, SLikeSoft UG (haftungsbeschränkt) +# Modified work: Copyright (c) 2017-2019, SLikeSoft UG (haftungsbeschränkt) # # This source code was modified by SLikeSoft. Modifications are licensed under the MIT-style # license found in the license.txt file in the root directory of this source tree. @@ -15,22 +15,22 @@ GETCURRENTFOLDER() FINDIRRLICHT() IF(WIN32 AND NOT UNIX) project(${current_folder}) - FILE(GLOB ALL_CPP_SRCS *.cpp "${RakNet_SOURCE_DIR}/Samples/PHPDirectoryServer2/PHPDirectoryServer2.cpp") - FILE(GLOB ALL_HEADER_SRCS *.h "${RakNet_SOURCE_DIR}/Samples/PHPDirectoryServer2/PHPDirectoryServer2.h") + FILE(GLOB ALL_CPP_SRCS *.cpp "${SLikeNet_SOURCE_DIR}/Samples/PHPDirectoryServer2/PHPDirectoryServer2.cpp") + FILE(GLOB ALL_HEADER_SRCS *.h "${SLikeNet_SOURCE_DIR}/Samples/PHPDirectoryServer2/PHPDirectoryServer2.h") FIXCOMPILEOPTIONS() - include_directories(${RAKNETHEADERFILES} ./ ${IRRLICHT_INCLUDE_DIR}) + include_directories(${SLIKENET_HEADER_FILES} ./ ${IRRLICHT_INCLUDE_DIR}) add_executable(${current_folder} WIN32 ${ALL_CPP_SRCS} ${ALL_HEADER_SRCS}) - target_link_libraries(${current_folder} ${RAKNET_COMMON_LIBS}) + target_link_libraries(${current_folder} ${SLIKENET_COMMON_LIBS}) set_target_properties(${current_folder} PROPERTIES PROJECT_GROUP "Samples/3D Demos") ELSE(WIN32 AND NOT UNIX) project(${current_folder}) FINDIRRKLANG() - FILE(GLOB ALL_CPP_SRCS *.cpp "${RakNet_SOURCE_DIR}/Samples/PHPDirectoryServer2/PHPDirectoryServer2.cpp") - FILE(GLOB ALL_HEADER_SRCS *.h "${RakNet_SOURCE_DIR}/Samples/PHPDirectoryServer2/PHPDirectoryServer2.h") + FILE(GLOB ALL_CPP_SRCS *.cpp "${SLikeNet_SOURCE_DIR}/Samples/PHPDirectoryServer2/PHPDirectoryServer2.cpp") + FILE(GLOB ALL_HEADER_SRCS *.h "${SLikeNet_SOURCE_DIR}/Samples/PHPDirectoryServer2/PHPDirectoryServer2.h") FIXCOMPILEOPTIONS() - include_directories(${RAKNETHEADERFILES} ./ ${IRRLICHT_INCLUDE_DIR} ${IRRKLANG_INCLUDE_DIR}) + include_directories(${SLIKENET_HEADER_FILES} ./ ${IRRLICHT_INCLUDE_DIR} ${IRRKLANG_INCLUDE_DIR}) add_executable(${current_folder} WIN32 ${ALL_CPP_SRCS} ${ALL_HEADER_SRCS}) - target_link_libraries(${current_folder} ${RAKNET_COMMON_LIBS} ${IRRLICHT_LIBRARIES} ${IRRKLANG_LIBRARIES}) + target_link_libraries(${current_folder} ${SLIKENET_COMMON_LIBS} ${IRRLICHT_LIBRARIES} ${IRRKLANG_LIBRARIES}) ENDIF(WIN32 AND NOT UNIX) diff --git a/DependentExtensions/MySQLInterface/CMakeLists.txt b/DependentExtensions/MySQLInterface/CMakeLists.txt index 4fa6ab2a5..6ec781899 100644 --- a/DependentExtensions/MySQLInterface/CMakeLists.txt +++ b/DependentExtensions/MySQLInterface/CMakeLists.txt @@ -1,15 +1,21 @@ # -# This file was taken from RakNet 4.082 without any modifications. +# This file was taken from RakNet 4.082. # Please see licenses/RakNet license.txt for the underlying license and related copyright. # +# +# Modified work: Copyright (c) 2019, SLikeSoft UG (haftungsbeschränkt) +# +# This source code was modified by SLikeSoft. Modifications are licensed under the MIT-style +# license found in the license.txt file in the root directory of this source tree. +# project(MySQLInterface) IF(NOT WIN32 AND UNIX) FILE(GLOB ALL_HEADER_SRCS *.h) FILE(GLOB ALL_CPP_SRCS *.cpp) FINDMYSQL() - include_directories(./ ${RAKNETHEADERFILES} ${MYSQL_INCLUDE_DIR}) + include_directories(./ ${SLIKENET_HEADER_FILES} ${MYSQL_INCLUDE_DIR}) add_library(LibMySQLInterface STATIC ${ALL_CPP_SRCS} ${ALL_HEADER_SRCS}) - target_link_libraries (LibMySQLInterface ${RAKNET_COMMON_LIBS} ${MYSQL_LIBRARIES}) + target_link_libraries (LibMySQLInterface ${SLIKENET_COMMON_LIBS} ${MYSQL_LIBRARIES}) VSUBFOLDER(LibMySQLInterface "DependentExtensions") ENDIF(NOT WIN32 AND UNIX) diff --git a/DependentExtensions/Ogre3DInterpDemo/CMakeLists.txt b/DependentExtensions/Ogre3DInterpDemo/CMakeLists.txt index d956b7cf9..099871ecf 100644 --- a/DependentExtensions/Ogre3DInterpDemo/CMakeLists.txt +++ b/DependentExtensions/Ogre3DInterpDemo/CMakeLists.txt @@ -1,7 +1,13 @@ # -# This file was taken from RakNet 4.082 without any modifications. +# This file was taken from RakNet 4.082. # Please see licenses/RakNet license.txt for the underlying license and related copyright. # +# +# Modified work: Copyright (c) 2019, SLikeSoft UG (haftungsbeschränkt) +# +# This source code was modified by SLikeSoft. Modifications are licensed under the MIT-style +# license found in the license.txt file in the root directory of this source tree. +# cmake_minimum_required(VERSION 2.6) GETCURRENTFOLDER() @@ -13,9 +19,9 @@ IF(UNIX AND USEOIS AND NOT DISABLEDEPENDENCIES) FILE(GLOB ALL_CPP_SRCS *.cpp) FILE(GLOB ALL_HEADER_SRCS *.h) FIXCOMPILEOPTIONS() - include_directories(${RAKNETHEADERFILES} ./ ${OGRE_INCLUDE_DIR} ${OIS_INCLUDE_DIR}) + include_directories(${SLIKENET_HEADER_FILES} ./ ${OGRE_INCLUDE_DIR} ${OIS_INCLUDE_DIR}) add_executable(${current_folder} ${ALL_CPP_SRCS} ${ALL_HEADER_SRCS}) - target_link_libraries(${current_folder} ${RAKNET_COMMON_LIBS} ${OGRE_LIBRARIES} ${OIS_LIBRARIES}) + target_link_libraries(${current_folder} ${SLIKENET_COMMON_LIBS} ${OGRE_LIBRARIES} ${OIS_LIBRARIES}) file(GLOB OGRE_RenderSystem_GL_LIBRARY_DBG_MOD "/usr/lib/debug/usr/lib/OGRE/RenderSystem_GL.so") IF (NOT OGRE_RenderSystem_GL_LIBRARY_DBG_MOD) set(OGRE_RenderSystem_GL_LIBRARY_DBG_MOD ${OGRE_RenderSystem_GL_LIBRARY_DBG}) diff --git a/DependentExtensions/PostgreSQLInterface/CMakeLists.txt b/DependentExtensions/PostgreSQLInterface/CMakeLists.txt index b4620cd8f..ee5baad5b 100644 --- a/DependentExtensions/PostgreSQLInterface/CMakeLists.txt +++ b/DependentExtensions/PostgreSQLInterface/CMakeLists.txt @@ -1,16 +1,22 @@ # -# This file was taken from RakNet 4.082 without any modifications. +# This file was taken from RakNet 4.082. # Please see licenses/RakNet license.txt for the underlying license and related copyright. # +# +# Modified work: Copyright (c) 2019, SLikeSoft UG (haftungsbeschränkt) +# +# This source code was modified by SLikeSoft. Modifications are licensed under the MIT-style +# license found in the license.txt file in the root directory of this source tree. +# project(PostgreSQLInterface) IF (NOT WIN32 AND UNIX) FILE(GLOB ALL_HEADER_SRCS *.h) FILE(GLOB ALL_CPP_SRCS *.cpp) FINDPOSTGRE() - include_directories(./ ${RAKNETHEADERFILES} ${POSTGRESQL_INCLUDE_DIR}) + include_directories(./ ${SLIKENET_HEADER_FILES} ${POSTGRESQL_INCLUDE_DIR}) add_library(LibPostgreSQLInterface STATIC ${ALL_CPP_SRCS} ${ALL_HEADER_SRCS}) - target_link_libraries (LibPostgreSQLInterface ${RAKNET_COMMON_LIBS} ${POSTGRESQL_LIBRARIES}) + target_link_libraries (LibPostgreSQLInterface ${SLIKENET_COMMON_LIBS} ${POSTGRESQL_LIBRARIES}) VSUBFOLDER(LibPostgreSQLInterface "DependentExtensions") ENDIF(NOT WIN32 AND UNIX) diff --git a/DependentExtensions/RPC3/CMakeLists.txt b/DependentExtensions/RPC3/CMakeLists.txt index 4f6cda9f4..b819c2a98 100644 --- a/DependentExtensions/RPC3/CMakeLists.txt +++ b/DependentExtensions/RPC3/CMakeLists.txt @@ -1,7 +1,13 @@ # -# This file was taken from RakNet 4.082 without any modifications. +# This file was taken from RakNet 4.082. # Please see licenses/RakNet license.txt for the underlying license and related copyright. # +# +# Modified work: Copyright (c) 2019, SLikeSoft UG (haftungsbeschränkt) +# +# This source code was modified by SLikeSoft. Modifications are licensed under the MIT-style +# license found in the license.txt file in the root directory of this source tree. +# cmake_minimum_required(VERSION 2.6) project(LibRPC3) @@ -9,9 +15,9 @@ IF (NOT WIN32 AND UNIX) FILE(GLOB ALL_HEADER_SRCS *.h) FILE(GLOB ALL_CPP_SRCS *.cpp) FINDBOOST() - include_directories("${Boost_INCLUDE_DIRS}" ${RAKNETHEADERFILES}) + include_directories("${Boost_INCLUDE_DIRS}" ${SLIKENET_HEADER_FILES}) add_library(LibRPC3 STATIC ${ALL_CPP_SRCS} ${ALL_HEADER_SRCS} "${Boost_INCLUDE_DIRS}" "${Boost_INCLUDE_DIRS}/boost") - target_link_libraries(LibRPC3 ${RAKNET_COMMON_LIBS} ${Boost_LIBRARIES}) + target_link_libraries(LibRPC3 ${SLIKENET_COMMON_LIBS} ${Boost_LIBRARIES}) ENDIF(NOT WIN32 AND UNIX) diff --git a/Lib/CMakeLists.txt b/Lib/CMakeLists.txt index e2f995762..fff75f0b9 100644 --- a/Lib/CMakeLists.txt +++ b/Lib/CMakeLists.txt @@ -3,7 +3,7 @@ # Please see licenses/RakNet license.txt for the underlying license and related copyright. # # -# Modified work: Copyright (c) 2017-2018, SLikeSoft UG (haftungsbeschränkt) +# Modified work: Copyright (c) 2017-2019, SLikeSoft UG (haftungsbeschränkt) # # This source code was modified by SLikeSoft. Modifications are licensed under the MIT-style # license found in the license.txt file in the root directory of this source tree. @@ -11,17 +11,24 @@ cmake_minimum_required(VERSION 2.6) -set( RAKNET_INTERNAL_INCLUDE_DIRS - ${RakNet_SOURCE_DIR}/Source/include - ${RakNet_SOURCE_DIR}/DependentExtensions/openssl/include - ${RakNet_SOURCE_DIR}/DependentExtensions +if(CMAKE_SIZEOF_VOID_P EQUAL 8) + # 64 bits + set(SLIKENET_OPENSSL_INCLUDE_PREFIX x64) +elseif(CMAKE_SIZEOF_VOID_P EQUAL 4) + # 32 bits + set(SLIKENET_OPENSSL_INCLUDE_PREFIX x86) +endif() + +set(SLIKENET_INTERNAL_INCLUDE_DIRS + ${SLikeNet_SOURCE_DIR}/Source/include + ${SLikeNet_SOURCE_DIR}/DependentExtensions/openssl/include/${SLIKENET_OPENSSL_INCLUDE_PREFIX}/release + ${SLikeNet_SOURCE_DIR}/DependentExtensions ) -if( RAKNET_ENABLE_STATIC ) +if(SLIKENET_ENABLE_STATIC) add_subdirectory(LibStatic) endif() - -if( RAKNET_ENABLE_DLL ) +if(SLIKENET_ENABLE_DLL) add_subdirectory(DLL) endif() diff --git a/Lib/DLL/CMakeLists.txt b/Lib/DLL/CMakeLists.txt index 5163a71bd..af53d4a41 100644 --- a/Lib/DLL/CMakeLists.txt +++ b/Lib/DLL/CMakeLists.txt @@ -3,33 +3,47 @@ # Please see licenses/RakNet license.txt for the underlying license and related copyright. # # -# Modified work: Copyright (c) 2017-2018, SLikeSoft UG (haftungsbeschränkt) +# Modified work: Copyright (c) 2017-2019, SLikeSoft UG (haftungsbeschränkt) # # This source code was modified by SLikeSoft. Modifications are licensed under the MIT-style # license found in the license.txt file in the root directory of this source tree. # cmake_minimum_required(VERSION 2.6) -project(RakNetDLL) -FILE(GLOB ALL_HEADER_SRCS ${RakNet_SOURCE_DIR}/Source/include/slikenet/*.h) -FILE(GLOB ALL_COMPATIBILITY_HEADER_SRC ${RakNet_SOURCE_DIR}/Source/*.h) -FILE(GLOB ALL_COMPATIBILITY_HEADER_SRC_2 ${RakNet_SOURCE_DIR}/Source/slikenet/*.h) -FILE(GLOB ALL_CPP_SRCS ${RakNet_SOURCE_DIR}/Source/src/*.cpp) +project(SLikeNetDLL) +FILE(GLOB ALL_HEADER_SRCS ${SLikeNet_SOURCE_DIR}/Source/include/slikenet/*.h) +FILE(GLOB ALL_COMPATIBILITY_HEADER_SRC ${SLikeNet_SOURCE_DIR}/Source/*.h) +FILE(GLOB ALL_COMPATIBILITY_HEADER_SRC_2 ${SLikeNet_SOURCE_DIR}/Source/slikenet/*.h) +FILE(GLOB ALL_CPP_SRCS ${SLikeNet_SOURCE_DIR}/Source/src/*.cpp) -include_directories( ${RAKNET_INTERNAL_INCLUDE_DIRS} ) +include_directories( ${SLIKENET_INTERNAL_INCLUDE_DIRS} ) + +add_library(SLikeNetDLL SHARED ${ALL_CPP_SRCS} ${ALL_HEADER_SRCS}) + +# set the version number +set_target_properties(SLikeNetDLL PROPERTIES + VERSION ${SLikeNet_VERSION} + SOVERSION ${SLikeNet_API_VERSION} +) + +# by default we build the retail configuration +add_definitions(-D_RETAIL) -add_library(RakNetDLL SHARED ${ALL_CPP_SRCS} ${ALL_HEADER_SRCS}) - IF(WIN32 AND NOT UNIX) - SET( CMAKE_CXX_FLAGS "/D WIN32 /D _RAKNET_DLL /D _CRT_NONSTDC_NO_DEPRECATE /D _CRT_SECURE_NO_DEPRECATE /GS- /GR- ") + add_definitions(-DWIN32 -D_RAKNET_DLL -D_CRT_NONSTDC_NO_DEPRECATE -D_CRT_SECURE_NO_DEPRECATE) + SET( CMAKE_CXX_FLAGS "/GS- /GR-" ) +ELSE(WIN32 AND NOT UNIX) + set_target_properties(SLikeNetDLL PROPERTIES + OUTPUT_NAME "slikenet" + ) ENDIF(WIN32 AND NOT UNIX) -target_link_libraries (RakNetDLL ${RAKNET_LIBRARY_LIBS}) +target_link_libraries (SLikeNetDLL ${SLIKENET_LIBRARY_LIBS}) IF(NOT WIN32 OR UNIX) - install(TARGETS RakNetDLL DESTINATION lib) - INSTALL(FILES ${ALL_COMPATIBILITY_HEADER_SRC} DESTINATION include/raknet) - INSTALL(FILES ${ALL_COMPATIBILITY_HEADER_SRC_2} DESTINATION include/raknet/slikenet) - INSTALL(FILES ${ALL_HEADER_SRCS} DESTINATION include/raknet/include/slikenet) + install(TARGETS SLikeNetDLL DESTINATION lib) + INSTALL(FILES ${ALL_COMPATIBILITY_HEADER_SRC} DESTINATION include/slikenet) + INSTALL(FILES ${ALL_COMPATIBILITY_HEADER_SRC_2} DESTINATION include/slikenet/slikenet) + INSTALL(FILES ${ALL_HEADER_SRCS} DESTINATION include/slikenet/include/slikenet) ENDIF(NOT WIN32 OR UNIX) diff --git a/Lib/LibStatic/CMakeLists.txt b/Lib/LibStatic/CMakeLists.txt index 3f38932e6..2fe5b97a7 100644 --- a/Lib/LibStatic/CMakeLists.txt +++ b/Lib/LibStatic/CMakeLists.txt @@ -3,36 +3,51 @@ # Please see licenses/RakNet license.txt for the underlying license and related copyright. # # -# Modified work: Copyright (c) 2016-2018, SLikeSoft UG (haftungsbeschränkt) +# Modified work: Copyright (c) 2016-2019, SLikeSoft UG (haftungsbeschränkt) # # This source code was modified by SLikeSoft. Modifications are licensed under the MIT-style # license found in the license.txt file in the root directory of this source tree. # cmake_minimum_required(VERSION 2.6) -project(RakNetLibStatic) -FILE(GLOB ALL_HEADER_SRCS ${RakNet_SOURCE_DIR}/Source/include/slikenet/*.h) -FILE(GLOB ALL_COMPATIBILITY_HEADER_SRC ${RakNet_SOURCE_DIR}/Source/*.h) -FILE(GLOB ALL_COMPATIBILITY_HEADER_SRC_2 ${RakNet_SOURCE_DIR}/Source/slikenet/*.h) -FILE(GLOB ALL_CPP_SRCS ${RakNet_SOURCE_DIR}/Source/src/*.cpp) +project(SLikeNetLibStatic) -include_directories( ${RAKNET_INTERNAL_INCLUDE_DIRS} ) +FILE(GLOB ALL_HEADER_SRCS ${SLikeNet_SOURCE_DIR}/Source/include/slikenet/*.h) +FILE(GLOB ALL_COMPATIBILITY_HEADER_SRC ${SLikeNet_SOURCE_DIR}/Source/*.h) +FILE(GLOB ALL_COMPATIBILITY_HEADER_SRC_2 ${SLikeNet_SOURCE_DIR}/Source/slikenet/*.h) +FILE(GLOB ALL_CPP_SRCS ${SLikeNet_SOURCE_DIR}/Source/src/*.cpp) -add_library(RakNetLibStatic STATIC ${ALL_CPP_SRCS} ${ALL_HEADER_SRCS}) +include_directories( ${SLIKENET_INTERNAL_INCLUDE_DIRS} ) + +add_library(SLikeNetLibStatic STATIC ${ALL_CPP_SRCS} ${ALL_HEADER_SRCS}) + +# set the version number +set_target_properties(SLikeNetLibStatic PROPERTIES + VERSION ${SLikeNet_VERSION} + SOVERSION ${SLikeNet_API_VERSION} +) + +# by default we build the retail configuration +add_definitions(-D_RETAIL) IF(WIN32 AND NOT UNIX) - SET( CMAKE_CXX_FLAGS "/D WIN32 /D _RAKNET_LIB /D _CRT_NONSTDC_NO_DEPRECATE /D _CRT_SECURE_NO_DEPRECATE /GS- /GR- ") + add_definitions(-DWIN32 -D_RAKNET_DLL -D_CRT_NONSTDC_NO_DEPRECATE -D_CRT_SECURE_NO_DEPRECATE) + SET( CMAKE_CXX_FLAGS "/GS- /GR-" ) +ELSE(WIN32 AND NOT UNIX) + set_target_properties(SLikeNetLibStatic PROPERTIES + OUTPUT_NAME "slikenet" + ) ENDIF(WIN32 AND NOT UNIX) -target_link_libraries (RakNetLibStatic ${RAKNET_LIBRARY_LIBS}) +target_link_libraries (SLikeNetLibStatic ${SLIKENET_LIBRARY_LIBS}) IF(WIN32 AND NOT UNIX) IF(NOT ${CMAKE_GENERATOR} STREQUAL "MSYS Makefiles") - set_target_properties(RakNetLibStatic PROPERTIES STATIC_LIBRARY_FLAGS "/NODEFAULTLIB:\"LIBCD.lib LIBCMTD.lib MSVCRT.lib\"" ) + set_target_properties(SLikeNetLibStatic PROPERTIES STATIC_LIBRARY_FLAGS "/NODEFAULTLIB:\"LIBCD.lib LIBCMTD.lib MSVCRT.lib\"" ) ENDIF(NOT ${CMAKE_GENERATOR} STREQUAL "MSYS Makefiles") ELSE(WIN32 AND NOT UNIX) - INSTALL(TARGETS RakNetLibStatic DESTINATION lib) - INSTALL(FILES ${ALL_COMPATIBILITY_HEADER_SRC} DESTINATION include/raknet) - INSTALL(FILES ${ALL_COMPATIBILITY_HEADER_SRC_2} DESTINATION include/raknet/slikenet) - INSTALL(FILES ${ALL_HEADER_SRCS} DESTINATION include/raknet/include/slikenet) + INSTALL(TARGETS SLikeNetLibStatic DESTINATION lib) + INSTALL(FILES ${ALL_COMPATIBILITY_HEADER_SRC} DESTINATION include/slikenet) + INSTALL(FILES ${ALL_COMPATIBILITY_HEADER_SRC_2} DESTINATION include/slikenet/slikenet) + INSTALL(FILES ${ALL_HEADER_SRCS} DESTINATION include/slikenet/include/slikenet) ENDIF(WIN32 AND NOT UNIX) diff --git a/Samples/AutoPatcherServer_MySQL/CMakeLists.txt b/Samples/AutoPatcherServer_MySQL/CMakeLists.txt index eb3fbae3b..b1f626ec5 100644 --- a/Samples/AutoPatcherServer_MySQL/CMakeLists.txt +++ b/Samples/AutoPatcherServer_MySQL/CMakeLists.txt @@ -3,7 +3,7 @@ # Please see licenses/RakNet license.txt for the underlying license and related copyright. # # -# Modified work: Copyright (c) 2017, SLikeSoft UG (haftungsbeschränkt) +# Modified work: Copyright (c) 2017-2019, SLikeSoft UG (haftungsbeschränkt) # # This source code was modified by SLikeSoft. Modifications are licensed under the MIT-style # license found in the license.txt file in the root directory of this source tree. @@ -18,14 +18,14 @@ IF(WIN32 AND NOT UNIX) SOURCE_GROUP(BZip FILES ${BZSRC}) SOURCE_GROUP("Source Files" FILES ${AUTOSRC}) SOURCE_GROUP(Main "AutopatcherServerTest_MySQL.cpp") - include_directories(${RAKNETHEADERFILES} ./ ${AutopatcherMySQLRepository_SOURCE_DIR} ${MySQLInterface_SOURCE_DIR} ${Autopatcher_SOURCE_DIR} ${BZip2_SOURCE_DIR}) + include_directories(${SLIKENET_HEADER_FILES} ./ ${AutopatcherMySQLRepository_SOURCE_DIR} ${MySQLInterface_SOURCE_DIR} ${Autopatcher_SOURCE_DIR} ${BZip2_SOURCE_DIR}) add_executable("AutoPatcherServer_MySQL" "AutopatcherServerTest_MySQL.cpp" ${AUTOSRC} ${BZSRC}) - target_link_libraries("AutoPatcherServer_MySQL" ${RAKNET_COMMON_LIBS} AutoPatcherMySQLRepository) + target_link_libraries("AutoPatcherServer_MySQL" ${SLIKENET_COMMON_LIBS} AutoPatcherMySQLRepository) VSUBFOLDER(AutoPatcherServer_MySQL "Samples/AutoPatcher/Server/MySQL") ELSE(WIN32 AND NOT UNIX) - include_directories(${RAKNETHEADERFILES} ./ ${AutopatcherMySQLRepository_SOURCE_DIR} ${MySQLInterface_SOURCE_DIR} ${Autopatcher_SOURCE_DIR}) + include_directories(${SLIKENET_HEADER_FILES} ./ ${AutopatcherMySQLRepository_SOURCE_DIR} ${MySQLInterface_SOURCE_DIR} ${Autopatcher_SOURCE_DIR}) add_executable("AutoPatcherServer_MySQL" "AutopatcherServerTest_MySQL.cpp") - target_link_libraries("AutoPatcherServer_MySQL" ${RAKNET_COMMON_LIBS} LibAutopatcher AutoPatcherMySQLRepository LibMySQLInterface) + target_link_libraries("AutoPatcherServer_MySQL" ${SLIKENET_COMMON_LIBS} LibAutopatcher AutoPatcherMySQLRepository LibMySQLInterface) ENDIF(WIN32 AND NOT UNIX) diff --git a/Samples/AutopatcherClient/CMakeLists.txt b/Samples/AutopatcherClient/CMakeLists.txt index 3b256ebd4..649397754 100644 --- a/Samples/AutopatcherClient/CMakeLists.txt +++ b/Samples/AutopatcherClient/CMakeLists.txt @@ -3,7 +3,7 @@ # Please see licenses/RakNet license.txt for the underlying license and related copyright. # # -# Modified work: Copyright (c) 2017, SLikeSoft UG (haftungsbeschränkt) +# Modified work: Copyright (c) 2017-2019, SLikeSoft UG (haftungsbeschränkt) # # This source code was modified by SLikeSoft. Modifications are licensed under the MIT-style # license found in the license.txt file in the root directory of this source tree. @@ -12,10 +12,10 @@ cmake_minimum_required(VERSION 2.6) project(AutopatcherClient) -set(Autopatcher_SOURCE_DIR ${RakNet_SOURCE_DIR}/DependentExtensions/Autopatcher) -set(BZip2_SOURCE_DIR ${RakNet_SOURCE_DIR}/DependentExtensions/bzip2-1.0.6) +set(Autopatcher_SOURCE_DIR ${SLikeNet_SOURCE_DIR}/DependentExtensions/Autopatcher) +set(BZip2_SOURCE_DIR ${SLikeNet_SOURCE_DIR}/DependentExtensions/bzip2-1.0.6) -include_directories(${RAKNETHEADERFILES} ./ ${Autopatcher_SOURCE_DIR} ${BZip2_SOURCE_DIR} ) +include_directories(${SLIKENET_HEADER_FILES} ./ ${Autopatcher_SOURCE_DIR} ${BZip2_SOURCE_DIR} ) FILE(GLOB AUTOSRC "${Autopatcher_SOURCE_DIR}/*.cpp" "${Autopatcher_SOURCE_DIR}/*.h") LIST(REMOVE_ITEM AUTOSRC "${Autopatcher_SOURCE_DIR}/AutopatcherServer.cpp" "${Autopatcher_SOURCE_DIR}/AutopatcherServer.h" ) FILE(GLOB BZSRC "${BZip2_SOURCE_DIR}/*.c" "${BZip2_SOURCE_DIR}/*.h") @@ -27,7 +27,7 @@ SOURCE_GROUP(Client_Files FILES ${AUTOSRC}) SOURCE_GROUP(MAIN FILES "AutopatcherClientTest.cpp") SOURCE_GROUP(BZip2Wrapper FILES ${WRAPFILES}) add_executable(AutopatcherClient "AutopatcherClientTest.cpp" ${AUTOSRC} ${BZSRC} ${WRAPFILES}) -target_link_libraries(AutopatcherClient ${RAKNET_COMMON_LIBS}) +target_link_libraries(AutopatcherClient ${SLIKENET_COMMON_LIBS}) ##VSUBFOLDER(AutopatcherClient "Samples/AutoPatcher/Client") diff --git a/Samples/AutopatcherClientGFx3.0/CMakeLists.txt b/Samples/AutopatcherClientGFx3.0/CMakeLists.txt index e6df5ea30..df5a92047 100644 --- a/Samples/AutopatcherClientGFx3.0/CMakeLists.txt +++ b/Samples/AutopatcherClientGFx3.0/CMakeLists.txt @@ -3,7 +3,7 @@ # Please see licenses/RakNet license.txt for the underlying license and related copyright. # # -# Modified work: Copyright (c) 2017, SLikeSoft UG (haftungsbeschränkt) +# Modified work: Copyright (c) 2017-2019, SLikeSoft UG (haftungsbeschränkt) # # This source code was modified by SLikeSoft. Modifications are licensed under the MIT-style # license found in the license.txt file in the root directory of this source tree. @@ -14,8 +14,8 @@ project(AutopatcherClientGFx3) IF(WIN32 AND NOT UNIX) FINDD3D() FINDSCALEGFX() - include_directories(${RAKNETHEADERFILES} ./ ${Autopatcher_SOURCE_DIR} ${BZip2_SOURCE_DIR} ${D3D_INCLUDE_DIR} ${SCALEGFX_INCLUDE_DIR} "${RakNet_SOURCE_DIR}/DependentExtensions/GFx3") - FILE(GLOB GFXSRC GFxPlayerTinyD3D9.cpp "${RakNet_SOURCE_DIR}/DependentExtensions/GFx3/*.cpp" "${RakNet_SOURCE_DIR}/DependentExtensions/GFx3/*.h") + include_directories(${SLIKENET_HEADER_FILES} ./ ${Autopatcher_SOURCE_DIR} ${BZip2_SOURCE_DIR} ${D3D_INCLUDE_DIR} ${SCALEGFX_INCLUDE_DIR} "${SLikeNet_SOURCE_DIR}/DependentExtensions/GFx3") + FILE(GLOB GFXSRC GFxPlayerTinyD3D9.cpp "${SLikeNet_SOURCE_DIR}/DependentExtensions/GFx3/*.cpp" "${SLikeNet_SOURCE_DIR}/DependentExtensions/GFx3/*.h") FILE(GLOB AUTOSRC "${Autopatcher_SOURCE_DIR}/*.cpp" "${Autopatcher_SOURCE_DIR}/*.h") FILE(GLOB BZSRC "${BZip2_SOURCE_DIR}/*.c" "${BZip2_SOURCE_DIR}/*.h") LIST(REMOVE_ITEM BZSRC "${BZip2_SOURCE_DIR}/dlltest.c" "${BZip2_SOURCE_DIR}/mk251.c" "${BZip2_SOURCE_DIR}/bzip2recover.c") @@ -27,7 +27,7 @@ IF(WIN32 AND NOT UNIX) SOURCE_GROUP(BZip2Wrapper FILES ${WRAPFILES}) SOURCE_GROUP(GFx3 FILES ${GFXSRC}) add_executable(AutopatcherClientGFx3 WIN32 "AutopatcherClientGFx3Impl.cpp" AutopatcherClientGFx3Impl.h ${AUTOSRC} ${BZSRC} ${WRAPFILES} ${GFXSRC}) - target_link_libraries(AutopatcherClientGFx3 ${RAKNET_COMMON_LIBS} ${D3D_LIBRARIES} winmm.lib imm32.lib ${SCALEGFX_DEBUG_LIBRARIES} ${SCALEGFX_LIBRARIES}) + target_link_libraries(AutopatcherClientGFx3 ${SLIKENET_COMMON_LIBS} ${D3D_LIBRARIES} winmm.lib imm32.lib ${SCALEGFX_DEBUG_LIBRARIES} ${SCALEGFX_LIBRARIES}) VSUBFOLDER(AutopatcherClientGFx3 "Samples/AutoPatcher/Client") ENDIF(WIN32 AND NOT UNIX) diff --git a/Samples/AutopatcherClientRestarter/CMakeLists.txt b/Samples/AutopatcherClientRestarter/CMakeLists.txt index 641679b6b..3c82e698f 100644 --- a/Samples/AutopatcherClientRestarter/CMakeLists.txt +++ b/Samples/AutopatcherClientRestarter/CMakeLists.txt @@ -3,7 +3,7 @@ # Please see licenses/RakNet license.txt for the underlying license and related copyright. # # -# Modified work: Copyright (c) 2017, SLikeSoft UG (haftungsbeschränkt) +# Modified work: Copyright (c) 2017-2019, SLikeSoft UG (haftungsbeschränkt) # # This source code was modified by SLikeSoft. Modifications are licensed under the MIT-style # license found in the license.txt file in the root directory of this source tree. @@ -11,9 +11,9 @@ cmake_minimum_required(VERSION 2.6) project(AutopatcherClientRestarter) -include_directories(${RAKNETHEADERFILES} ./) +include_directories(${SLIKENET_HEADER_FILES} ./) add_executable(AutopatcherClientRestarter "main.cpp") -target_link_libraries(AutopatcherClientRestarter ${RAKNET_COMMON_LIBS}) +target_link_libraries(AutopatcherClientRestarter ${SLIKENET_COMMON_LIBS}) VSUBFOLDER(AutopatcherClientRestarter "Samples/AutoPatcher/Client") diff --git a/Samples/AutopatcherServer/CMakeLists.txt b/Samples/AutopatcherServer/CMakeLists.txt index 682dc4a90..922a53ec9 100644 --- a/Samples/AutopatcherServer/CMakeLists.txt +++ b/Samples/AutopatcherServer/CMakeLists.txt @@ -3,7 +3,7 @@ # Please see licenses/RakNet license.txt for the underlying license and related copyright. # # -# Modified work: Copyright (c) 2017, SLikeSoft UG (haftungsbeschränkt) +# Modified work: Copyright (c) 2017-2019, SLikeSoft UG (haftungsbeschränkt) # # This source code was modified by SLikeSoft. Modifications are licensed under the MIT-style # license found in the license.txt file in the root directory of this source tree. @@ -19,14 +19,14 @@ IF(WIN32 AND NOT UNIX) SOURCE_GROUP(BZip FILES ${BZSRC}) SOURCE_GROUP("Source Files" FILES ${AUTOSRC}) SOURCE_GROUP(Main "AutopatcherServerTest.cpp") - include_directories(${RAKNETHEADERFILES} ./ ${AutopatcherPostgreRepository_SOURCE_DIR} ${PostgreSQLInterface_SOURCE_DIR} ${Autopatcher_SOURCE_DIR} ${BZip2_SOURCE_DIR}) + include_directories(${SLIKENET_HEADER_FILES} ./ ${AutopatcherPostgreRepository_SOURCE_DIR} ${PostgreSQLInterface_SOURCE_DIR} ${Autopatcher_SOURCE_DIR} ${BZip2_SOURCE_DIR}) add_executable(AutopatcherServer_PostgreSQL "AutopatcherServerTest.cpp" ${AUTOSRC} ${BZSRC}) - target_link_libraries(AutopatcherServer_PostgreSQL ${RAKNET_COMMON_LIBS} AutopatcherPostgreRepository) + target_link_libraries(AutopatcherServer_PostgreSQL ${SLIKENET_COMMON_LIBS} AutopatcherPostgreRepository) VSUBFOLDER(AutopatcherServer_PostgreSQL "Samples/AutoPatcher/Server/PostgreSQL") ELSE(WIN32 AND NOT UNIX) - include_directories(${RAKNETHEADERFILES} ./ ${AutopatcherPostgreRepository_SOURCE_DIR} ${PostgreSQLInterface_SOURCE_DIR} ${Autopatcher_SOURCE_DIR}) + include_directories(${SLIKENET_HEADER_FILES} ./ ${AutopatcherPostgreRepository_SOURCE_DIR} ${PostgreSQLInterface_SOURCE_DIR} ${Autopatcher_SOURCE_DIR}) add_executable(AutopatcherServer_PostgreSQL "AutopatcherServerTest.cpp") - target_link_libraries(AutopatcherServer_PostgreSQL ${RAKNET_COMMON_LIBS} LibAutopatcher AutopatcherPostgreRepository LibPostgreSQLInterface) + target_link_libraries(AutopatcherServer_PostgreSQL ${SLIKENET_COMMON_LIBS} LibAutopatcher AutopatcherPostgreRepository LibPostgreSQLInterface) ENDIF(WIN32 AND NOT UNIX) diff --git a/Samples/ChatExample/CMakeLists.txt b/Samples/ChatExample/CMakeLists.txt index 2e305084f..b0d743ac1 100644 --- a/Samples/ChatExample/CMakeLists.txt +++ b/Samples/ChatExample/CMakeLists.txt @@ -3,7 +3,7 @@ # Please see licenses/RakNet license.txt for the underlying license and related copyright. # # -# Modified work: Copyright (c) 2017, SLikeSoft UG (haftungsbeschränkt) +# Modified work: Copyright (c) 2017-2019, SLikeSoft UG (haftungsbeschränkt) # # This source code was modified by SLikeSoft. Modifications are licensed under the MIT-style # license found in the license.txt file in the root directory of this source tree. @@ -11,14 +11,14 @@ cmake_minimum_required(VERSION 2.6) project("Chat Example") -include_directories(${RAKNETHEADERFILES} ./) +include_directories(${SLIKENET_HEADER_FILES} ./) add_executable(ChatServer "Server/Chat Example Server.cpp") add_executable(ChatClient "Client/Chat Example Client.cpp") -target_link_libraries(ChatServer ${RAKNET_COMMON_LIBS}) +target_link_libraries(ChatServer ${SLIKENET_COMMON_LIBS}) VSUBFOLDER(ChatServer "Samples") -target_link_libraries(ChatClient ${RAKNET_COMMON_LIBS}) +target_link_libraries(ChatClient ${SLIKENET_COMMON_LIBS}) VSUBFOLDER(ChatClient "Samples") diff --git a/Samples/DirectoryDeltaTransfer/CMakeLists.txt b/Samples/DirectoryDeltaTransfer/CMakeLists.txt index 147e0495c..576b16dce 100644 --- a/Samples/DirectoryDeltaTransfer/CMakeLists.txt +++ b/Samples/DirectoryDeltaTransfer/CMakeLists.txt @@ -3,7 +3,7 @@ # Please see licenses/RakNet license.txt for the underlying license and related copyright. # # -# Modified work: Copyright (c) 2017, SLikeSoft UG (haftungsbeschränkt) +# Modified work: Copyright (c) 2017-2019, SLikeSoft UG (haftungsbeschränkt) # # This source code was modified by SLikeSoft. Modifications are licensed under the MIT-style # license found in the license.txt file in the root directory of this source tree. @@ -13,9 +13,9 @@ cmake_minimum_required(VERSION 2.6) GETCURRENTFOLDER() project(${current_folder}) -include_directories(${RAKNETHEADERFILES} ./) +include_directories(${SLIKENET_HEADER_FILES} ./) add_executable(${current_folder} DirectoryDeltaTransferTest.cpp) -target_link_libraries(${current_folder} ${RAKNET_COMMON_LIBS}) +target_link_libraries(${current_folder} ${SLIKENET_COMMON_LIBS}) set_target_properties(${current_folder} PROPERTIES PROJECT_GROUP Samples) diff --git a/Samples/Lobby2Client/CMakeLists.txt b/Samples/Lobby2Client/CMakeLists.txt index e762b4a5b..f97cd92cb 100644 --- a/Samples/Lobby2Client/CMakeLists.txt +++ b/Samples/Lobby2Client/CMakeLists.txt @@ -1,15 +1,21 @@ # -# This file was taken from RakNet 4.082 without any modifications. +# This file was taken from RakNet 4.082. # Please see licenses/RakNet license.txt for the underlying license and related copyright. # +# +# Modified work: Copyright (c) 2019, SLikeSoft UG (haftungsbeschränkt) +# +# This source code was modified by SLikeSoft. Modifications are licensed under the MIT-style +# license found in the license.txt file in the root directory of this source tree. +# cmake_minimum_required(VERSION 2.6) project(Lobby2Client) -include_directories(${RAKNETHEADERFILES} ./ ${RakNet_SOURCE_DIR}/DependentExtensions/Lobby2 ${RakNet_SOURCE_DIR}/DependentExtensions/Lobby2/Rooms) -FILE(GLOB LOBBYFILES ${RakNet_SOURCE_DIR}/DependentExtensions/Lobby2/*.cpp ${RakNet_SOURCE_DIR}/DependentExtensions/Lobby2/*.h) +include_directories(${SLIKENET_HEADER_FILES} ./ ${SLikeNet_SOURCE_DIR}/DependentExtensions/Lobby2 ${SLikeNet_SOURCE_DIR}/DependentExtensions/Lobby2/Rooms) +FILE(GLOB LOBBYFILES ${SLikeNet_SOURCE_DIR}/DependentExtensions/Lobby2/*.cpp ${SLikeNet_SOURCE_DIR}/DependentExtensions/Lobby2/*.h) SOURCE_GROUP(Main FILES "Lobby2ClientSample.cpp") add_executable(Lobby2Client "Lobby2ClientSample.cpp" ${LOBBYFILES}) -target_link_libraries(Lobby2Client ${RAKNET_COMMON_LIBS}) +target_link_libraries(Lobby2Client ${SLIKENET_COMMON_LIBS}) IF(WIN32 AND NOT UNIX) VSUBFOLDER(Lobby2Client "Samples/Lobby2") ENDIF(WIN32 AND NOT UNIX) diff --git a/Samples/NATCompleteClient/CMakeLists.txt b/Samples/NATCompleteClient/CMakeLists.txt index 15ceafcf7..d57ad312d 100644 --- a/Samples/NATCompleteClient/CMakeLists.txt +++ b/Samples/NATCompleteClient/CMakeLists.txt @@ -1,16 +1,22 @@ # -# This file was taken from RakNet 4.082 without any modifications. +# This file was taken from RakNet 4.082. # Please see licenses/RakNet license.txt for the underlying license and related copyright. # +# +# Modified work: Copyright (c) 2019, SLikeSoft UG (haftungsbeschränkt) +# +# This source code was modified by SLikeSoft. Modifications are licensed under the MIT-style +# license found in the license.txt file in the root directory of this source tree. +# cmake_minimum_required(VERSION 2.6) GETCURRENTFOLDER() SET(EXTRALIBS "") #Extra libraries, we have none #note the .h files are included so they show up in the windows project -FILE(GLOB XML_FILES ${RakNet_SOURCE_DIR}/DependentExtensions/XML/*.cpp ${RakNet_SOURCE_DIR}/DependentExtensions/XML/*.h)#grab all files from xml folder and put them in the XML_FILES var -FILE(GLOB UPNP_FILES ${RakNet_SOURCE_DIR}/DependentExtensions/UPNP/*.cpp UPNP_FILES ${RakNet_SOURCE_DIR}/DependentExtensions/UPNP/*.h) #grab all files from UPNP folder and put them in the UPNP_FILES var +FILE(GLOB XML_FILES ${SLikeNet_SOURCE_DIR}/DependentExtensions/XML/*.cpp ${SLikeNet_SOURCE_DIR}/DependentExtensions/XML/*.h)#grab all files from xml folder and put them in the XML_FILES var +FILE(GLOB UPNP_FILES ${SLikeNet_SOURCE_DIR}/DependentExtensions/UPNP/*.cpp UPNP_FILES ${SLikeNet_SOURCE_DIR}/DependentExtensions/UPNP/*.h) #grab all files from UPNP folder and put them in the UPNP_FILES var SET(EXTRASOURCES ${UPNP_FILES} ${XML_FILES}) #set the grabbed files as extra sources -SET(EXTRAINCLUDES ${RakNet_SOURCE_DIR}/DependentExtensions/XML UPNP_FILES ${RakNet_SOURCE_DIR}/DependentExtensions/UPNP)#add the include directories +SET(EXTRAINCLUDES ${SLikeNet_SOURCE_DIR}/DependentExtensions/XML UPNP_FILES ${SLikeNet_SOURCE_DIR}/DependentExtensions/UPNP)#add the include directories STANDARDSUBPROJECTWITHOPTIONSSET(${current_folder}) VSUBFOLDER(${current_folder} "Samples/NAT Punchthrough") diff --git a/Samples/NATCompleteServer/CMakeLists.txt b/Samples/NATCompleteServer/CMakeLists.txt index b12ab5cb3..a207a1d73 100644 --- a/Samples/NATCompleteServer/CMakeLists.txt +++ b/Samples/NATCompleteServer/CMakeLists.txt @@ -3,7 +3,7 @@ # Please see licenses/RakNet license.txt for the underlying license and related copyright. # # -# Modified work: Copyright (c) 2018, SLikeSoft UG (haftungsbeschränkt) +# Modified work: Copyright (c) 2018-2019, SLikeSoft UG (haftungsbeschränkt) # # This source code was modified by SLikeSoft. Modifications are licensed under the MIT-style # license found in the license.txt file in the root directory of this source tree. @@ -11,4 +11,4 @@ cmake_minimum_required(VERSION 2.6) GETCURRENTFOLDER() -STANDARDSUBPROJECTWITHOPTIONS(${current_folder} "${RakNet_SOURCE_DIR}/Samples/CloudServer" "${RakNet_SOURCE_DIR}/Samples/CloudServer/CloudServerHelper.cpp" "") +STANDARDSUBPROJECTWITHOPTIONS(${current_folder} "${SLikeNet_SOURCE_DIR}/Samples/CloudServer" "${SLikeNet_SOURCE_DIR}/Samples/CloudServer/CloudServerHelper.cpp" "") diff --git a/Samples/RPC3/CMakeLists.txt b/Samples/RPC3/CMakeLists.txt index 3984adab7..a12977c12 100644 --- a/Samples/RPC3/CMakeLists.txt +++ b/Samples/RPC3/CMakeLists.txt @@ -1,13 +1,19 @@ # -# This file was taken from RakNet 4.082 without any modifications. +# This file was taken from RakNet 4.082. # Please see licenses/RakNet license.txt for the underlying license and related copyright. # +# +# Modified work: Copyright (c) 2019, SLikeSoft UG (haftungsbeschränkt) +# +# This source code was modified by SLikeSoft. Modifications are licensed under the MIT-style +# license found in the license.txt file in the root directory of this source tree. +# cmake_minimum_required(VERSION 2.6) GETCURRENTFOLDER() FINDBOOST() -set(LibRPC3_SOURCE_DIR ${RakNet_SOURCE_DIR}/DependentExtensions/RPC3/) +set(LibRPC3_SOURCE_DIR ${SLikeNet_SOURCE_DIR}/DependentExtensions/RPC3/) project(RPC3) IF (WIN32 AND NOT UNIX) diff --git a/Samples/RakVoice/CMakeLists.txt b/Samples/RakVoice/CMakeLists.txt index 53b3c7796..b1c56750d 100644 --- a/Samples/RakVoice/CMakeLists.txt +++ b/Samples/RakVoice/CMakeLists.txt @@ -3,7 +3,7 @@ # Please see licenses/RakNet license.txt for the underlying license and related copyright. # # -# Modified work: Copyright (c) 2017, SLikeSoft UG (haftungsbeschränkt) +# Modified work: Copyright (c) 2017-2019, SLikeSoft UG (haftungsbeschränkt) # # This source code was modified by SLikeSoft. Modifications are licensed under the MIT-style # license found in the license.txt file in the root directory of this source tree. @@ -15,8 +15,8 @@ FINDPORTAUDIO() project(${current_folder}) IF(WIN32 AND NOT UNIX) - FILE(GLOB ALL_CPP_SRCS *.cpp ${RakNet_SOURCE_DIR}/DependentExtensions/RakVoice.cpp) - FILE(GLOB ALL_HEADER_SRCS *.h ${RakNet_SOURCE_DIR}/DependentExtensions/RakVoice.h) + FILE(GLOB ALL_CPP_SRCS *.cpp ${SLikeNet_SOURCE_DIR}/DependentExtensions/RakVoice.cpp) + FILE(GLOB ALL_HEADER_SRCS *.h ${SLikeNet_SOURCE_DIR}/DependentExtensions/RakVoice.h) FILE(GLOB PORTAUDIOFILES ${portaudio_SOURCE_DIR}/pa_common/*.c ${portaudio_SOURCE_DIR}/pa_win_wmme/pa_win_wmme.c ${portaudio_SOURCE_DIR}/pa_common/*.h) FILE(GLOB SPEEXFILES ${speex_SOURCE_DIR}/win32/*.h ${speex_SOURCE_DIR}/include/*.h ${speex_SOURCE_DIR}/libspeex/*.h ${speex_SOURCE_DIR}/include/speex/*.h ${speex_SOURCE_DIR}/libspeex/*.c) LIST(REMOVE_ITEM SPEEXFILES @@ -26,16 +26,16 @@ IF(WIN32 AND NOT UNIX) SOURCE_GROUP(Speex FILES ${SPEEXFILES}) SOURCE_GROUP(PortAudio FILES ${PORTAUDIOFILES}) ADDCPPDEF(HAVE_CONFIG_H) - include_directories(${RAKNETHEADERFILES} ./ ${PORTAUDIO_INCLUDE_DIR} ${RakNet_SOURCE_DIR}/DependentExtensions ${speex_SOURCE_DIR}/include ${portaudio_SOURCE_DIR} ${speex_SOURCE_DIR}/win32) + include_directories(${SLIKENET_HEADER_FILES} ./ ${PORTAUDIO_INCLUDE_DIR} ${SLikeNet_SOURCE_DIR}/DependentExtensions ${speex_SOURCE_DIR}/include ${portaudio_SOURCE_DIR} ${speex_SOURCE_DIR}/win32) add_executable(${current_folder} ${ALL_CPP_SRCS} ${ALL_HEADER_SRCS} ${PORTAUDIOFILES} ${SPEEXFILES}) - target_link_libraries(${current_folder} ${RAKNET_COMMON_LIBS}) + target_link_libraries(${current_folder} ${SLIKENET_COMMON_LIBS}) VSUBFOLDER(${current_folder} Samples/Voice) ELSE(WIN32 AND NOT UNIX) FILE(GLOB ALL_CPP_SRCS *.cpp) FILE(GLOB ALL_HEADER_SRCS *.h) - include_directories(${RAKNETHEADERFILES} ./ ${PORTAUDIO_INCLUDE_DIR} ${RakNet_SOURCE_DIR}/DependentExtensions) + include_directories(${SLIKENET_HEADER_FILES} ./ ${PORTAUDIO_INCLUDE_DIR} ${SLikeNet_SOURCE_DIR}/DependentExtensions) add_executable(${current_folder} ${ALL_CPP_SRCS} ${ALL_HEADER_SRCS}) - target_link_libraries(${current_folder} ${RAKNET_COMMON_LIBS} ${PORTAUDIO_LIBRARIES} LibRakVoice) + target_link_libraries(${current_folder} ${SLIKENET_COMMON_LIBS} ${PORTAUDIO_LIBRARIES} LibRakVoice) ENDIF(WIN32 AND NOT UNIX) diff --git a/Samples/RakVoiceDSound/CMakeLists.txt b/Samples/RakVoiceDSound/CMakeLists.txt index 735c47c6e..bfee3cc2e 100644 --- a/Samples/RakVoiceDSound/CMakeLists.txt +++ b/Samples/RakVoiceDSound/CMakeLists.txt @@ -3,7 +3,7 @@ # Please see licenses/RakNet license.txt for the underlying license and related copyright. # # -# Modified work: Copyright (c) 2017, SLikeSoft UG (haftungsbeschränkt) +# Modified work: Copyright (c) 2017-2019, SLikeSoft UG (haftungsbeschränkt) # # This source code was modified by SLikeSoft. Modifications are licensed under the MIT-style # license found in the license.txt file in the root directory of this source tree. @@ -17,8 +17,8 @@ IF(WIN32 AND NOT UNIX) FINDPORTAUDIO() FINDDSOUND() project(${current_folder}) - FILE(GLOB ALL_CPP_SRCS *.cpp ${RakNet_SOURCE_DIR}/DependentExtensions/RakVoice.cpp) - FILE(GLOB ALL_HEADER_SRCS *.h ${RakNet_SOURCE_DIR}/DependentExtensions/RakVoice.h) + FILE(GLOB ALL_CPP_SRCS *.cpp ${SLikeNet_SOURCE_DIR}/DependentExtensions/RakVoice.cpp) + FILE(GLOB ALL_HEADER_SRCS *.h ${SLikeNet_SOURCE_DIR}/DependentExtensions/RakVoice.h) FILE(GLOB SPEEXFILES ${speex_SOURCE_DIR}/win32/*.h ${speex_SOURCE_DIR}/include/*.h ${speex_SOURCE_DIR}/libspeex/*.h ${speex_SOURCE_DIR}/include/speex/*.h ${speex_SOURCE_DIR}/libspeex/*.c) LIST(REMOVE_ITEM SPEEXFILES ${speex_SOURCE_DIR}/libspeex/pcm_wrapper.h) @@ -28,9 +28,9 @@ IF(WIN32 AND NOT UNIX) ADDCPPDEF(HAVE_CONFIG_H) ADDCPPDEF(_UNICODE) ADDCPPDEF(UNICODE) - include_directories(${RAKNETHEADERFILES} ./ ${PORTAUDIO_INCLUDE_DIR} ${RakNet_SOURCE_DIR}/DependentExtensions ${speex_SOURCE_DIR}/include ${portaudio_SOURCE_DIR} ${speex_SOURCE_DIR}/win32 ${DSOUND_INCLUDE_DIR}) + include_directories(${SLIKENET_HEADER_FILES} ./ ${PORTAUDIO_INCLUDE_DIR} ${SLikeNet_SOURCE_DIR}/DependentExtensions ${speex_SOURCE_DIR}/include ${portaudio_SOURCE_DIR} ${speex_SOURCE_DIR}/win32 ${DSOUND_INCLUDE_DIR}) add_executable(${current_folder} ${ALL_CPP_SRCS} ${ALL_HEADER_SRCS} ${SPEEXFILES}) - target_link_libraries(${current_folder} ${RAKNET_COMMON_LIBS} winmm.lib ${DSOUND_LIBRARIES}) + target_link_libraries(${current_folder} ${SLIKENET_COMMON_LIBS} winmm.lib ${DSOUND_LIBRARIES}) VSUBFOLDER(${current_folder} Samples/Voice) ENDIF(WIN32 AND NOT UNIX) diff --git a/Samples/RakVoiceFMOD/CMakeLists.txt b/Samples/RakVoiceFMOD/CMakeLists.txt index 5a9a8be47..bdff755b5 100644 --- a/Samples/RakVoiceFMOD/CMakeLists.txt +++ b/Samples/RakVoiceFMOD/CMakeLists.txt @@ -3,7 +3,7 @@ # Please see licenses/RakNet license.txt for the underlying license and related copyright. # # -# Modified work: Copyright (c) 2017, SLikeSoft UG (haftungsbeschränkt) +# Modified work: Copyright (c) 2017-2019, SLikeSoft UG (haftungsbeschränkt) # # This source code was modified by SLikeSoft. Modifications are licensed under the MIT-style # license found in the license.txt file in the root directory of this source tree. @@ -16,8 +16,8 @@ FINDFMODEX() project(${current_folder}) IF(WIN32 AND NOT UNIX) - FILE(GLOB ALL_CPP_SRCS *.cpp ${RakNet_SOURCE_DIR}/DependentExtensions/RakVoice.cpp) - FILE(GLOB ALL_HEADER_SRCS *.h ${RakNet_SOURCE_DIR}/DependentExtensions/RakVoice.h) + FILE(GLOB ALL_CPP_SRCS *.cpp ${SLikeNet_SOURCE_DIR}/DependentExtensions/RakVoice.cpp) + FILE(GLOB ALL_HEADER_SRCS *.h ${SLikeNet_SOURCE_DIR}/DependentExtensions/RakVoice.h) FILE(GLOB SPEEXFILES ${speex_SOURCE_DIR}/win32/*.h ${speex_SOURCE_DIR}/include/*.h ${speex_SOURCE_DIR}/libspeex/*.h ${speex_SOURCE_DIR}/include/speex/*.h ${speex_SOURCE_DIR}/libspeex/*.c) LIST(REMOVE_ITEM SPEEXFILES ${speex_SOURCE_DIR}/libspeex/pcm_wrapper.h) @@ -25,16 +25,16 @@ IF(WIN32 AND NOT UNIX) ${speex_SOURCE_DIR}/libspeex/pcm_wrapper.c) SOURCE_GROUP(Speex FILES ${SPEEXFILES}) ADDCPPDEF(HAVE_CONFIG_H) - include_directories(${FMODEX_INCLUDE_DIR} ${RAKNETHEADERFILES} ./ ${PORTAUDIO_INCLUDE_DIR} ${RakNet_SOURCE_DIR}/DependentExtensions ${speex_SOURCE_DIR}/include ${portaudio_SOURCE_DIR} ${speex_SOURCE_DIR}/win32) + include_directories(${FMODEX_INCLUDE_DIR} ${SLIKENET_HEADER_FILES} ./ ${PORTAUDIO_INCLUDE_DIR} ${SLikeNet_SOURCE_DIR}/DependentExtensions ${speex_SOURCE_DIR}/include ${portaudio_SOURCE_DIR} ${speex_SOURCE_DIR}/win32) add_executable(${current_folder} ${ALL_CPP_SRCS} ${ALL_HEADER_SRCS} ${SPEEXFILES}) - target_link_libraries(${current_folder} ${RAKNET_COMMON_LIBS} ${FMODEX_LIBRARY}) + target_link_libraries(${current_folder} ${SLIKENET_COMMON_LIBS} ${FMODEX_LIBRARY}) VSUBFOLDER(${current_folder} Samples/Voice) ELSE(WIN32 AND NOT UNIX) FILE(GLOB ALL_CPP_SRCS *.cpp) FILE(GLOB ALL_HEADER_SRCS *.h) - include_directories(${RAKNETHEADERFILES} ./ ${PORTAUDIO_INCLUDE_DIR} ${RakNet_SOURCE_DIR}/DependentExtensions ${FMODEX_INCLUDE_DIR}) + include_directories(${SLIKENET_HEADER_FILES} ./ ${PORTAUDIO_INCLUDE_DIR} ${SLikeNet_SOURCE_DIR}/DependentExtensions ${FMODEX_INCLUDE_DIR}) add_executable(${current_folder} ${ALL_CPP_SRCS} ${ALL_HEADER_SRCS}) - target_link_libraries(${current_folder} ${RAKNET_COMMON_LIBS} ${PORTAUDIO_LIBRARIES} ${FMODEX_LIBRARY} LibRakVoice) + target_link_libraries(${current_folder} ${SLIKENET_COMMON_LIBS} ${PORTAUDIO_LIBRARIES} ${FMODEX_LIBRARY} LibRakVoice) ENDIF(WIN32 AND NOT UNIX) diff --git a/Source/src/RakNetTypes.cpp b/Source/src/RakNetTypes.cpp index a48e40db2..7b0082254 100644 --- a/Source/src/RakNetTypes.cpp +++ b/Source/src/RakNetTypes.cpp @@ -512,7 +512,8 @@ bool SystemAddress::SetBinaryAddress(const char *str, char portDelineator) ip[0] = '\0'; // copy the plain hostname (excluding the (optional) port part) - char* hostname = OP_NEW_ARRAY(delimiterPos + 1, _FILE_AND_LINE_); + // #med - change OP_NEW_ARRAY to support size_t type + char* hostname = OP_NEW_ARRAY(static_cast(delimiterPos + 1), _FILE_AND_LINE_); strncpy_s(hostname, delimiterPos + 1, str, delimiterPos); RakNetSocket2::DomainNameToIP(hostname, ip); OP_DELETE_ARRAY(hostname, _FILE_AND_LINE_); diff --git a/changelog.txt b/changelog.txt index 5e906e7ed..9085afdee 100644 --- a/changelog.txt +++ b/changelog.txt @@ -13,7 +13,7 @@ If you require a more detailed list on the changes, please refer to the Subversion repository history at: https://www.slikesoft.com/svn/slikenet/ version 0.2.0 (xx-xx-xxxx xx:xx UTC) -*** This release satisfies/processes 4 complete 3 partial GitHub pull requests +*** This release satisfies/processes 5 complete 3 partial GitHub pull requests *** This release resolves 1 user reported issue (1 completely) General: * extended supported compilers to VS 2017 15.4.1 (#163) @@ -54,8 +54,16 @@ Building: * enabled security checks in non retail builds (#130) * change projects to consistently use warning level 4 in all configurations with Visual Studio (#128, #129, #135, #137, #138, #139, #140, #142, #144, #146, #147, #149, #151, #152, #153, #154, #155, #162) CMake: + * changed the project names from RakNetXXXX -> SLikeNetXXXX (#222) * changed default install location for SLikeNet to CMAKE_INSTALL_PREFIX-based include/lib directories (#54 - RAKNET_29, #67 - RAKNET_41) - * small tweaks/improvements to CMake files (#130) + * changed default library names on Linux/OSX to use libslikenet.so / libslikenet.a and create related symlinks (#189 - RAKNET_86) + * changed install target directory for include files to use include/slikenet (instead of include/raknet) (#222) + * changed default configuration to build the retail version instead of the release one (#222) + * added project version number (#222) + * corrected SLIKENET_GENERATE_INCLUDE_ONLY_DIR to copy over the correct headers rather than just the redirect ones (#222) + * renamed options from RAKENET_XXXX -> SLIKENET_XXXX (#222) + * removed obsolete RAKNET_INCLUDE_DIRS variable (#130) + * small tweaks/improvements to CMake files (#130, #222) iOS: * updated file name reference in XCode project (#188 - RAKNET_84) OpenSSL: