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
4 changes: 0 additions & 4 deletions .github/actions/build-mac/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,6 @@ outputs:
runs:
using: "composite"
steps:
- name: Install required libs
shell: bash
run: |
brew install ninja
- name: Prepare
shell: bash
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/upload-plugin/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ runs:
mv "${{ inputs.pdbFileName }}" "deploy-${{ inputs.pluginName }}/${{ inputs.pluginName }}/${{ inputs.archFolder }}"
fi
- name: Upload plugin
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v6
with:
name: ${{ inputs.pluginName }}-${{ env.platform }}
path: deploy-${{ inputs.pluginName }}/* # this way the top folder in the artifacts is "MyPlugin"
Expand Down
8 changes: 5 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
platform: lin
steps:
- name: Checkout Code
uses: actions/checkout@v4 # must checkout before we can use our own actions
uses: actions/checkout@v5 # must checkout before we can use our own actions
- name: Build
uses: ./.github/actions/build-lin
id: build
Expand All @@ -43,7 +43,7 @@ jobs:
platform: mac
steps:
- name: Checkout Code
uses: actions/checkout@v4 # must checkout before we can use our own actions
uses: actions/checkout@v5 # must checkout before we can use our own actions
- name: Build
uses: ./.github/actions/build-mac
id: build
Expand Down Expand Up @@ -83,9 +83,11 @@ jobs:
# Windows with MS Visual Studio
build-win:
runs-on: windows-2022
env:
platform: win
steps:
- name: Checkout Code
uses: actions/checkout@v4 # must checkout before we can use our own actions
uses: actions/checkout@v5 # must checkout before we can use our own actions
- name: Build
uses: ./.github/actions/build-win
id: build
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
# Build directories
build*/*
Example/build*/*
Example/out/*

# XCode user specific files
xcuserdata/
Expand Down
20 changes: 7 additions & 13 deletions Example/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ endif()

set(CMAKE_BUILD_TYPE RelWithDebInfo)

project(LT_API VERSION 1.3.0 DESCRIPTION "LiveTraffic API Example Plugin")
project(LT_API VERSION 1.4.0 DESCRIPTION "LiveTraffic API Example Plugin")

set(CMAKE_CXX_STANDARD 17)
set_property(GLOBAL PROPERTY CXX_STANDARD_REQUIRED 17)
Expand All @@ -32,7 +32,6 @@ set_property(GLOBAL PROPERTY CXX_STANDARD 17)
# Set include directories used by our code and dependencies.
include_directories("${CMAKE_CURRENT_SOURCE_DIR}/..")
include_directories("${CMAKE_CURRENT_SOURCE_DIR}")
include_directories("${CMAKE_SOURCE_DIR}/Lib/SDK/CHeaders/Widgets")
include_directories("${CMAKE_SOURCE_DIR}/Lib/SDK/CHeaders/Wrappers")
include_directories("${CMAKE_SOURCE_DIR}/Lib/SDK/CHeaders/XPLM")

Expand Down Expand Up @@ -72,27 +71,25 @@ else()
add_compile_options(-fvisibility=hidden)
endif()


# Debug vs Release build
if(CMAKE_BUILD_TYPE MATCHES "Debug")
add_compile_definitions(DEBUG=1)
if (MSVC)
add_compile_options(/Zi)
else()
add_compile_options(-O0 -g)
add_compile_options(-O0 -g -fPIC)
endif()
else()
add_compile_definitions(NDEBUG=1)
if(MSVC)
# Use highest optimization level in Release builds
add_compile_options(/GL)
add_compile_options(/MD /Zi /GL- /O2)
else()
# Use position-independent code and highest optimization level
add_compile_options(-O3 -fPIC)
# Use position-independent code and highest optimization level plus some minimal debug info for stack traces
add_compile_options(-O3 -fPIC -g1)
endif()
endif()


################################################################################
# Source groups
################################################################################
Expand All @@ -111,8 +108,6 @@ set(ALL_FILES ${Header_Files} ${Source_Files})

add_library(LT_API SHARED ${ALL_FILES})

target_compile_features(LT_API PUBLIC cxx_std_11)

if (APPLE)
# X-Plane supports OS X 10.10+, so this should ensure FlyWithLua can run on
# all supported versions.
Expand All @@ -132,8 +127,7 @@ endif( OpenGL_FOUND )
# Link X-Plane plugin system libraries. They are only provided for OS X and Windows.
if (WIN32 OR APPLE)
find_library(XPLM_LIBRARY NAMES XPLM XPLM_64.lib)
# find_library(XPWIDGETS_LIBRARY NAMES XPWidgets XPWidgets_64.lib) # not needed if not using X-Plane's widgets
target_link_libraries(LT_API ${XPLM_LIBRARY} ${XPWIDGETS_LIBRARY})
target_link_libraries(LT_API ${XPLM_LIBRARY})
endif ()


Expand Down Expand Up @@ -166,7 +160,7 @@ elseif (APPLE)
# conflict with other plugins, in particular ones with Lua interpreter
# embedded.
target_link_libraries(LT_API "-exported_symbols_list ${CMAKE_SOURCE_DIR}/LTAPIExample.sym_mac")
target_link_libraries(LT_API "-framework XPLM -framework XPWidgets -ldl")
target_link_libraries(LT_API "-framework XPLM -ldl")
elseif (UNIX)
# Specify additional runtime search laths for dynamically-linked libraries.
# Restrict set of symbols exported from the plugin. This reduces chances of
Expand Down
26 changes: 26 additions & 0 deletions Example/CMakeSettings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"configurations": [
{
"name": "x64-Debug",
"generator": "Ninja",
"configurationType": "Debug",
"inheritEnvironments": [ "msvc_x64_x64" ],
"buildRoot": "${projectDir}\\build\\${name}",
"installRoot": "${projectDir}\\out\\install\\${name}",
"cmakeCommandArgs": "",
"buildCommandArgs": "",
"ctestCommandArgs": ""
},
{
"name": "x64-Release",
"generator": "Ninja",
"configurationType": "RelWithDebInfo",
"buildRoot": "${projectDir}\\build\\${name}",
"installRoot": "${projectDir}\\out\\install\\${name}",
"cmakeCommandArgs": "",
"buildCommandArgs": "",
"ctestCommandArgs": "",
"inheritEnvironments": [ "msvc_x64_x64" ]
}
]
}
25 changes: 0 additions & 25 deletions Example/LTAPI.sln

This file was deleted.

180 changes: 0 additions & 180 deletions Example/LTAPI.vcxproj

This file was deleted.

4 changes: 0 additions & 4 deletions Example/LTAPI.vcxproj.user

This file was deleted.

Loading