Updated plugin includes to build in gcc and added Linux binaries.

This commit is contained in:
Jason Watkins
2015-04-22 09:23:40 -07:00
committed by Jason Watkins
parent 46fe5b0fe4
commit a6a99dc574
7 changed files with 16 additions and 10 deletions

View File

@@ -8,6 +8,9 @@ include_directories(../C/src)
add_definitions(-DXPLM200 -DLIN=1)
SET(CMAKE_C_COMPILER gcc)
SET(CMAKE_CXX_COMPILER g++)
add_library(xpc64 SHARED XPCPlugin.cpp
DataManager.cpp
DataMaps.cpp
@@ -16,7 +19,7 @@ add_library(xpc64 SHARED XPCPlugin.cpp
Message.cpp
MessageHandlers.cpp
UDPSocket.cpp)
set_target_properties(xpc64 PROPERTIES PREFIX "" SUFFIX "xpl")
set_target_properties(xpc64 PROPERTIES PREFIX "" SUFFIX ".xpl")
set_target_properties(xpc64 PROPERTIES COMPILE_FLAGS "-std=gnu++11" LINK_FLAGS "-shared -rdynamic -nodefaultlibs -undefined_warning")
add_library(xpc32 SHARED XPCPlugin.cpp
@@ -27,7 +30,7 @@ add_library(xpc32 SHARED XPCPlugin.cpp
Message.cpp
MessageHandlers.cpp
UDPSocket.cpp)
set_target_properties(xpc32 PROPERTIES PREFIX "" SUFFIX "xpl")
set_target_properties(xpc32 PROPERTIES PREFIX "" SUFFIX ".xpl")
set_target_properties(xpc32 PROPERTIES COMPILE_FLAGS "-std=gnu++11 -m32" LINK_FLAGS "-shared -rdynamic -nodefaultlibs -undefined_warning -m32")
# Switch install targets when uncommenting the 32 bit line above.

View File

@@ -22,15 +22,12 @@
#include <cmath>
#include <string>
#include <cstring>
//OpenGL includes
#if IBM
#include <windows.h>
#endif
#if __GNUC__
#include <OpenGL/gl.h>
#else
#include <GL/gl.h>
#endif
namespace XPC
{
@@ -299,4 +296,4 @@ namespace XPC
ClearWaypoints();
}
}
}
}

View File

@@ -6,6 +6,9 @@
#include "Drawing.h"
#include "Log.h"
#include <cmath>
#include <cstring>
namespace XPC
{
std::unordered_map<std::string, MessageHandlers::ConnectionInfo> MessageHandlers::connections;
@@ -611,4 +614,4 @@ namespace XPC
XPC::Log::FormatLine("[EXEC] ERROR: Unknown packet type %s", msg.GetHead().c_str());
#endif
}
}
}

View File

@@ -3,6 +3,8 @@
#include "Log.h"
#include "UDPSocket.h"
#include <cstring>
namespace XPC
{
UDPSocket::UDPSocket(unsigned short recvPort)
@@ -178,4 +180,4 @@ namespace XPC
}
return std::string(ip);
}
}
}

View File

@@ -65,6 +65,7 @@
#include "XPLMProcessing.h"
// System Includes
#include <cstring>
#ifdef __APPLE__
#include <mach/mach_time.h>
#endif
@@ -207,4 +208,4 @@ float XPCFlightLoopCallback(float inElapsedSinceLastCall,
sock = new XPC::UDPSocket(RECVPORT);
}
return -1;
}
}

Binary file not shown.

BIN
xpcPlugin/XPlaneConnect/lin.xpl Executable file

Binary file not shown.