diff --git a/CMakeLists.txt b/CMakeLists.txt index 640e718..c32be96 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -65,14 +65,14 @@ if(BUILD_GAME) set_target_properties(game PROPERTIES LINKER_LANGUAGE CXX) find_package(SDL2 REQUIRED) include_directories(${SDL2_INCLUDE_DIRS}) - target_link_libraries(game ${SDL2_LIBRARIES} SDL2_net SDL2_mixer m dl) + target_link_libraries(game ${SDL2_LIBRARIES} SDL2 SDL2_net SDL2_mixer m dl) endif() - + target_compile_definitions(game PUBLIC D2EXE) endif() # Build D2Common.dll -if(BUILD_D2CLIENT OR BUILD_D2GAME) +if(BUILD_D2CLIENT OR BUILD_D2SERVER) message("Including D2Common.dll files") file(GLOB_RECURSE D2COMMON_SRC Common/*.h Common/*hpp Common/*.c Common/*.cpp) @@ -107,12 +107,12 @@ if(BUILD_D2CLIENT) set_target_properties(D2Client PROPERTIES OUTPUT_NAME D2Client) set_target_properties(D2Client PROPERTIES LINKER_LANGUAGE CXX) - target_link_libraries(D2Client ${STATIC_LIBRARIES}) + target_link_libraries(D2Client ${STATIC_LIBRARIES} D2Common) target_compile_definitions(D2Client PUBLIC D2CLIENT) endif() -# Build D2Game.dll +# Build D2Server.dll if(BUILD_D2SERVER) message("Including D2Server.dll files") @@ -127,6 +127,6 @@ if(BUILD_D2SERVER) set_target_properties(D2Server PROPERTIES OUTPUT_NAME D2Server) set_target_properties(D2Server PROPERTIES LINKER_LANGUAGE CXX) - target_link_libraries(D2Server ${STATIC_LIBRARIES}) + target_link_libraries(D2Server ${STATIC_LIBRARIES} D2Common) target_compile_definitions(D2Server PUBLIC D2SERVER) endif() diff --git a/Game/Platform_Linux.cpp b/Game/Platform_Linux.cpp index 7df6dd1..22868ce 100644 --- a/Game/Platform_Linux.cpp +++ b/Game/Platform_Linux.cpp @@ -218,7 +218,7 @@ namespace Sys } else if (nModule == MODULE_SERVER) { - bModuleFound = FS::Find("liD2Game.so", szModulePath, MAX_D2PATH_ABSOLUTE); + bModuleFound = FS::Find("libD2Server.so", szModulePath, MAX_D2PATH_ABSOLUTE); } Log_ErrorAssertReturn(bModuleFound, nullptr); @@ -251,4 +251,4 @@ namespace Sys int main(int argc, char* argv[]) { return InitGame(argc, argv); -} \ No newline at end of file +} diff --git a/Game/Platform_Windows.cpp b/Game/Platform_Windows.cpp index ea75c92..73702e5 100644 --- a/Game/Platform_Windows.cpp +++ b/Game/Platform_Windows.cpp @@ -300,7 +300,7 @@ namespace Sys } else if (nModule == MODULE_SERVER) { - bModuleFound = FS::Find("D2Game.dll", szModulePath, MAX_D2PATH_ABSOLUTE); + bModuleFound = FS::Find("D2Server.dll", szModulePath, MAX_D2PATH_ABSOLUTE); } Log_ErrorAssertReturn(bModuleFound, nullptr); @@ -339,4 +339,4 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, char* szCmdLine Sys::CopyBetaRegistryKeys(); return InitGame(__argc, __argv); -} \ No newline at end of file +}