Merge pull request #24 from edowson/user/edowson
CMake Files Added and xpcExample moved into src sub-folder
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@@ -38,3 +38,5 @@ xpcPlugin/build/xpcPlugin.build/Debug/xpcPlugin.build/Objects-normal/x86_64/XPCP
|
|||||||
xpcPlugin/build/xpcPlugin.build/Debug/xpcPlugin.build/Objects-normal/x86_64/xplaneConnect.o
|
xpcPlugin/build/xpcPlugin.build/Debug/xpcPlugin.build/Objects-normal/x86_64/xplaneConnect.o
|
||||||
|
|
||||||
xpcPlugin/xpcPlugin.xcodeproj/project.xcworkspace/xcuserdata/cteubert.xcuserdatad/UserInterfaceState.xcuserstate
|
xpcPlugin/xpcPlugin.xcodeproj/project.xcworkspace/xcuserdata/cteubert.xcuserdatad/UserInterfaceState.xcuserstate
|
||||||
|
|
||||||
|
build/
|
||||||
|
|||||||
5
C/CMakeLists.txt
Normal file
5
C/CMakeLists.txt
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
cmake_minimum_required(VERSION 2.8.4)
|
||||||
|
|
||||||
|
project(xplaneconnectlib)
|
||||||
|
|
||||||
|
add_subdirectory(src)
|
||||||
@@ -1,14 +1,14 @@
|
|||||||
X-Plane Connect-C (XPC-C) Readme
|
X-Plane Connect-C (XPC-C) Readme
|
||||||
|
|
||||||
DESCRIPTION
|
DESCRIPTION
|
||||||
XPC-C is a series of C functions that facilitate communication with X-Plane.
|
XPC-C is a series of C functions that facilitate communication with X-Plane.
|
||||||
|
|
||||||
-----------------------------------
|
-----------------------------------
|
||||||
SETUP
|
SETUP
|
||||||
Before using XPC Functions you must
|
Before using XPC Functions you must
|
||||||
1. Copy the file XPCPlugin.xpl to the "[X-Plane Directory]/Resources/plugins" directory.
|
1. Copy the file XPCPlugin.xpl to the "[X-Plane Directory]/Resources/plugins" directory.
|
||||||
2. Put in X-Plane CD 1 or X-Plane USB Key.
|
2. Put in X-Plane CD 1 or X-Plane USB Key.
|
||||||
3. Start X-Plane.
|
3. Start X-Plane.
|
||||||
4. #include "xplaneConnect.h"
|
4. #include "xplaneConnect.h"
|
||||||
|
|
||||||
-----------------------------------
|
-----------------------------------
|
||||||
|
|||||||
19
C/src/CMakeLists.txt
Normal file
19
C/src/CMakeLists.txt
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
cmake_minimum_required(VERSION 2.8.4)
|
||||||
|
|
||||||
|
set(LIBXPLANECONNECT_SRC xplaneConnect.c)
|
||||||
|
|
||||||
|
add_library(xplaneconnect_dynamic SHARED ${LIBXPLANECONNECT_SRC})
|
||||||
|
add_library(xplaneconnect_static STATIC ${LIBXPLANECONNECT_SRC})
|
||||||
|
|
||||||
|
set_target_properties(xplaneconnect_dynamic PROPERTIES OUTPUT_NAME "xplaneconnect")
|
||||||
|
set_target_properties(xplaneconnect_dynamic PROPERTIES VERSION 1.2 SOVERSION 1)
|
||||||
|
|
||||||
|
set_target_properties(xplaneconnect_static PROPERTIES OUTPUT_NAME "xplaneconnect")
|
||||||
|
|
||||||
|
set(LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR}/lib)
|
||||||
|
|
||||||
|
install(TARGETS xplaneconnect_dynamic xplaneconnect_static
|
||||||
|
LIBRARY DESTINATION lib
|
||||||
|
ARCHIVE DESTINATION lib)
|
||||||
|
|
||||||
|
install(FILES xplaneConnect.h DESTINATION include/xplaneConnect)
|
||||||
@@ -16,14 +16,14 @@
|
|||||||
/* Begin PBXCopyFilesBuildPhase section */
|
/* Begin PBXCopyFilesBuildPhase section */
|
||||||
BE60308318E5F7A5004B5E1D /* CopyFiles */ = {
|
BE60308318E5F7A5004B5E1D /* CopyFiles */ = {
|
||||||
isa = PBXCopyFilesBuildPhase;
|
isa = PBXCopyFilesBuildPhase;
|
||||||
buildActionMask = 12;
|
buildActionMask = 8;
|
||||||
dstPath = /Users/cteubert/Documents/flightdeckz/connections/src/xplaneconnect;
|
dstPath = /Users/cteubert/Documents/flightdeckz/connections/src/xplaneconnect;
|
||||||
dstSubfolderSpec = 0;
|
dstSubfolderSpec = 0;
|
||||||
files = (
|
files = (
|
||||||
BEDC620818EDF254005DB364 /* xplaneConnect.c in CopyFiles */,
|
BEDC620818EDF254005DB364 /* xplaneConnect.c in CopyFiles */,
|
||||||
BEDC620918EDF257005DB364 /* xplaneConnect.h in CopyFiles */,
|
BEDC620918EDF257005DB364 /* xplaneConnect.h in CopyFiles */,
|
||||||
);
|
);
|
||||||
runOnlyForDeploymentPostprocessing = 0;
|
runOnlyForDeploymentPostprocessing = 1;
|
||||||
};
|
};
|
||||||
/* End PBXCopyFilesBuildPhase section */
|
/* End PBXCopyFilesBuildPhase section */
|
||||||
|
|
||||||
@@ -31,7 +31,7 @@
|
|||||||
BEDC61FF18EDF0F5005DB364 /* xplaneConnect.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = xplaneConnect.c; path = ../src/xplaneConnect.c; sourceTree = "<group>"; };
|
BEDC61FF18EDF0F5005DB364 /* xplaneConnect.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = xplaneConnect.c; path = ../src/xplaneConnect.c; sourceTree = "<group>"; };
|
||||||
BEDC620018EDF0F5005DB364 /* xplaneConnect.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = xplaneConnect.h; path = ../src/xplaneConnect.h; sourceTree = "<group>"; };
|
BEDC620018EDF0F5005DB364 /* xplaneConnect.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = xplaneConnect.h; path = ../src/xplaneConnect.h; sourceTree = "<group>"; };
|
||||||
BEF9890B18E4E7F7005554D1 /* xpcExample */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = xpcExample; sourceTree = BUILT_PRODUCTS_DIR; };
|
BEF9890B18E4E7F7005554D1 /* xpcExample */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = xpcExample; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||||
BEF9890E18E4E7F7005554D1 /* main.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = main.cpp; sourceTree = "<group>"; };
|
BEF9890E18E4E7F7005554D1 /* main.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = main.cpp; path = src/main.cpp; sourceTree = "<group>"; };
|
||||||
/* End PBXFileReference section */
|
/* End PBXFileReference section */
|
||||||
|
|
||||||
/* Begin PBXFrameworksBuildPhase section */
|
/* Begin PBXFrameworksBuildPhase section */
|
||||||
@@ -105,7 +105,7 @@
|
|||||||
BEF9890318E4E7F7005554D1 /* Project object */ = {
|
BEF9890318E4E7F7005554D1 /* Project object */ = {
|
||||||
isa = PBXProject;
|
isa = PBXProject;
|
||||||
attributes = {
|
attributes = {
|
||||||
LastUpgradeCheck = 0500;
|
LastUpgradeCheck = 0610;
|
||||||
ORGANIZATIONNAME = "Chris Teubert";
|
ORGANIZATIONNAME = "Chris Teubert";
|
||||||
};
|
};
|
||||||
buildConfigurationList = BEF9890618E4E7F7005554D1 /* Build configuration list for PBXProject "xpcExample" */;
|
buildConfigurationList = BEF9890618E4E7F7005554D1 /* Build configuration list for PBXProject "xpcExample" */;
|
||||||
@@ -209,7 +209,6 @@
|
|||||||
BEF9891518E4E7F7005554D1 /* Debug */ = {
|
BEF9891518E4E7F7005554D1 /* Debug */ = {
|
||||||
isa = XCBuildConfiguration;
|
isa = XCBuildConfiguration;
|
||||||
buildSettings = {
|
buildSettings = {
|
||||||
ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
|
|
||||||
HEADER_SEARCH_PATHS = (
|
HEADER_SEARCH_PATHS = (
|
||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
|
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
|
||||||
@@ -222,7 +221,6 @@
|
|||||||
BEF9891618E4E7F7005554D1 /* Release */ = {
|
BEF9891618E4E7F7005554D1 /* Release */ = {
|
||||||
isa = XCBuildConfiguration;
|
isa = XCBuildConfiguration;
|
||||||
buildSettings = {
|
buildSettings = {
|
||||||
ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
|
|
||||||
HEADER_SEARCH_PATHS = (
|
HEADER_SEARCH_PATHS = (
|
||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
|
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
|
||||||
|
|||||||
@@ -10,31 +10,31 @@
|
|||||||
<string>xpcExample</string>
|
<string>xpcExample</string>
|
||||||
<key>IDESourceControlProjectOriginsDictionary</key>
|
<key>IDESourceControlProjectOriginsDictionary</key>
|
||||||
<dict>
|
<dict>
|
||||||
<key>C03F0B00-9A73-4E8C-88E5-1BC53A92AE34</key>
|
<key>975A665F236BF35140EC3819BE16448F522675A6</key>
|
||||||
<string>https://github.com/nasa/XPlaneConnect.git</string>
|
<string>ssh://ares:8420/aerospace/simulation/xplane/xplane_connect</string>
|
||||||
</dict>
|
</dict>
|
||||||
<key>IDESourceControlProjectPath</key>
|
<key>IDESourceControlProjectPath</key>
|
||||||
<string>C/xpcExample/xpcExample.xcodeproj/project.xcworkspace</string>
|
<string>C/xpcExample/xpcExample.xcodeproj</string>
|
||||||
<key>IDESourceControlProjectRelativeInstallPathDictionary</key>
|
<key>IDESourceControlProjectRelativeInstallPathDictionary</key>
|
||||||
<dict>
|
<dict>
|
||||||
<key>C03F0B00-9A73-4E8C-88E5-1BC53A92AE34</key>
|
<key>975A665F236BF35140EC3819BE16448F522675A6</key>
|
||||||
<string>../../../..</string>
|
<string>../../../..</string>
|
||||||
</dict>
|
</dict>
|
||||||
<key>IDESourceControlProjectURL</key>
|
<key>IDESourceControlProjectURL</key>
|
||||||
<string>https://github.com/nasa/XPlaneConnect.git</string>
|
<string>ssh://ares:8420/aerospace/simulation/xplane/xplane_connect</string>
|
||||||
<key>IDESourceControlProjectVersion</key>
|
<key>IDESourceControlProjectVersion</key>
|
||||||
<integer>110</integer>
|
<integer>111</integer>
|
||||||
<key>IDESourceControlProjectWCCIdentifier</key>
|
<key>IDESourceControlProjectWCCIdentifier</key>
|
||||||
<string>C03F0B00-9A73-4E8C-88E5-1BC53A92AE34</string>
|
<string>975A665F236BF35140EC3819BE16448F522675A6</string>
|
||||||
<key>IDESourceControlProjectWCConfigurations</key>
|
<key>IDESourceControlProjectWCConfigurations</key>
|
||||||
<array>
|
<array>
|
||||||
<dict>
|
<dict>
|
||||||
<key>IDESourceControlRepositoryExtensionIdentifierKey</key>
|
<key>IDESourceControlRepositoryExtensionIdentifierKey</key>
|
||||||
<string>public.vcs.git</string>
|
<string>public.vcs.git</string>
|
||||||
<key>IDESourceControlWCCIdentifierKey</key>
|
<key>IDESourceControlWCCIdentifierKey</key>
|
||||||
<string>C03F0B00-9A73-4E8C-88E5-1BC53A92AE34</string>
|
<string>975A665F236BF35140EC3819BE16448F522675A6</string>
|
||||||
<key>IDESourceControlWCCName</key>
|
<key>IDESourceControlWCCName</key>
|
||||||
<string>XPlaneConnect</string>
|
<string>xplane_connect</string>
|
||||||
</dict>
|
</dict>
|
||||||
</array>
|
</array>
|
||||||
</dict>
|
</dict>
|
||||||
|
|||||||
5
C/xpcExample/xpcExample/CMakeLists.txt
Normal file
5
C/xpcExample/xpcExample/CMakeLists.txt
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
cmake_minimum_required(VERSION 2.8.4)
|
||||||
|
|
||||||
|
project(xpcExample)
|
||||||
|
|
||||||
|
add_subdirectory(src)
|
||||||
13
C/xpcExample/xpcExample/src/CMakeLists.txt
Normal file
13
C/xpcExample/xpcExample/src/CMakeLists.txt
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
cmake_minimum_required(VERSION 2.8.4)
|
||||||
|
|
||||||
|
add_executable(main main.cpp)
|
||||||
|
|
||||||
|
include_directories(/usr/local/include/xplaneConnect)
|
||||||
|
|
||||||
|
find_library(XPLANECONNECT_LIB NAMES xplaneconnect PATHS "/usr/local/lib")
|
||||||
|
|
||||||
|
message(STATUS "Library path XPLANECONNECT_LIB is " ${XPLANECONNECT_LIB})
|
||||||
|
|
||||||
|
target_link_libraries(main ${XPLANECONNECT_LIB})
|
||||||
|
|
||||||
|
set(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin)
|
||||||
Reference in New Issue
Block a user