Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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")

Expand All @@ -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()
4 changes: 2 additions & 2 deletions Game/Platform_Linux.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down Expand Up @@ -251,4 +251,4 @@ namespace Sys
int main(int argc, char* argv[])
{
return InitGame(argc, argv);
}
}
4 changes: 2 additions & 2 deletions Game/Platform_Windows.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down Expand Up @@ -339,4 +339,4 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, char* szCmdLine
Sys::CopyBetaRegistryKeys();

return InitGame(__argc, __argv);
}
}