forked from Mirrors/openclonk
Fix the netpuncher build on Windows
Making the nightly builds work again
parent
14f90d0fc1
commit
34e6e45864
|
@ -874,9 +874,11 @@ target_link_libraries(c4group
|
|||
${ZLIB_LIBRARIES}
|
||||
${OPENSSL_LIBRARIES}
|
||||
)
|
||||
target_link_libraries(netpuncher
|
||||
pthread
|
||||
)
|
||||
if(HAVE_PTHREAD)
|
||||
target_link_libraries(netpuncher
|
||||
pthread
|
||||
)
|
||||
endif()
|
||||
set_property(TARGET clonk APPEND PROPERTY COMPILE_DEFINITIONS GLEW_STATIC)
|
||||
set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS_DEBUG _DEBUG)
|
||||
|
||||
|
|
|
@ -25,6 +25,30 @@
|
|||
|
||||
const uint16_t C4PuncherPort = 11115;
|
||||
|
||||
bool fQuiet = false;
|
||||
|
||||
// Implement a simplified version of Log so that we don't get undefined
|
||||
// references when e.g. StdFile attempts to call it - we are not compiling
|
||||
// C4Log.cpp into the netpuncher because it pulls in a whole lot of other
|
||||
// dependencies.
|
||||
bool Log(const char *msg)
|
||||
{
|
||||
if (!fQuiet)
|
||||
printf("%s\n", msg);
|
||||
return 1;
|
||||
}
|
||||
#define IMPLEMENT_LOGF(func) \
|
||||
bool func(const char *msg, ...) { \
|
||||
va_list args; va_start(args, msg); \
|
||||
StdStrBuf Buf; \
|
||||
Buf.FormatV(msg, args); \
|
||||
return Log(Buf.getData()); \
|
||||
}
|
||||
|
||||
IMPLEMENT_LOGF(DebugLogF)
|
||||
IMPLEMENT_LOGF(LogF)
|
||||
IMPLEMENT_LOGF(LogSilentF)
|
||||
|
||||
class C4PuncherServer : public C4NetIOUDP, private C4NetIO::CBClass
|
||||
{
|
||||
public:
|
||||
|
|
Loading…
Reference in New Issue