Skip to content

Commit

Permalink
Merge branch 'OpenCPN:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
Hakansv authored Dec 1, 2023
2 parents 82ceec9 + 07c5c27 commit c10f50e
Show file tree
Hide file tree
Showing 163 changed files with 10,023 additions and 34,176 deletions.
56 changes: 56 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,52 @@ jobs:
- /usr/local/lib
- run: ci/generic-upload.sh

build-macos-universal:
macos:
xcode: "13.4.1"
environment:
- OCPN_TARGET: macos
- pkg_mod: 11
- MACOSX_DEPLOYMENT_TARGET: 11.0
steps:
- checkout
- restore_cache:
keys:
- macos-cache-v2-{{checksum "ci/generic-build-macos.sh"}}
- run: ci/universal-build-macos.sh
- save_cache:
key: macos-cache-v2-{{checksum "ci/generic-build-macos.sh"}}
paths:
- /usr/local/bin
- /usr/local/include
- /usr/local/lib
- run: ci/generic-upload.sh

build-macos-intel-legacy:
macos:
xcode: "13.4.1"
environment:
- OCPN_TARGET: macos
- pkg_mod: 11
- MACOSX_DEPLOYMENT_TARGET: 10.13
- ARCHS: x86_64
- DEPS_BUNDLE_FILE: macos_deps_intel_legacy.tar.xz
- DEPS_BUNDLE_DEST: /tmp/ocpn_deps
- RELEASE: legacyintel
steps:
- checkout
- restore_cache:
keys:
- macos-cache-v2-{{checksum "ci/generic-build-macos.sh"}}
- run: ci/universal-build-macos.sh
- save_cache:
key: macos-cache-v2-{{checksum "ci/generic-build-macos.sh"}}
paths:
- /usr/local/bin
- /usr/local/include
- /usr/local/lib
- run: ci/generic-upload.sh

workflows:
version: 2
build_all:
Expand All @@ -105,3 +151,13 @@ workflows:
branches:
only:
- master
- build-macos-universal:
filters:
branches:
only:
- master
- build-macos-intel-legacy:
filters:
branches:
only:
- master
23 changes: 23 additions & 0 deletions .github/workflows/doxygen.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
# yamllint disable rule:truthy
name: Doxygen

on:
workflow_run:
# Must restrict to given workflows:
# https://github.com/community/community/discussions/16059
workflows: [MacOS, Windows]
types: [completed]
workflow_dispatch:

env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

jobs:
on-anything:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: echo "GITHUB_ACTOR=$GITHUB_ACTOR" >> $GITHUB_ENV
- run: echo "SHORT_SHA=${GITHUB_SHA:0:8}" >> $GITHUB_ENV
- run: ci/api-docs.sh
62 changes: 53 additions & 9 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ option(OCPN_USE_GL "Enable OpenGL support" ON)
option(OCPN_USE_GLES_SHIM "Enable GLESv1 Shim library" OFF)
option(OCPN_USE_UDEV_PORTS "Use udev to enumerate serial ports" ON)
option(OCPN_USE_SYSFS_PORTS "Use sysfs to enumerate serial ports" OFF)
option(OCPN_ENABLE_MDNS_DEBUG "Enable mDNS debug output" OFF)

set(OCPN_TARGET_TUPLE "" CACHE STRING
"List of target;version;arch like flatpak;20.08;aarch64 [\"\"]"
Expand Down Expand Up @@ -245,6 +246,10 @@ endif (NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)

if (APPLE)
option(OCPN_USE_LIBCPP "Use libc++ instead of libstdc++ on macOS" ON)
option(OCPN_USE_DEPS_BUNDLE "Use prebuilt dependency bundle instead of searching for libraries on macOS" OFF)
if(NOT OCPN_DEPS_BUNDLE_PATH)
set(OCPN_DEPS_BUNDLE_PATH "/usr/local")
endif()
endif ()

option(OCPN_USE_EXTERN_CURL "Use external libcurl" OFF)
Expand Down Expand Up @@ -740,6 +745,10 @@ if (NOT QT_ANDROID)
endif ()

#find_package(wxWidgets COMPONENTS ${wxWidgets_FIND_COMPONENTS} REQUIRED )
if(APPLE AND OCPN_USE_DEPS_BUNDLE)
set(wxWidgets_CONFIG_EXECUTABLE "${OCPN_DEPS_BUNDLE_PATH}/lib/wx/config/osx_cocoa-unicode-3.2")
set(wxWidgets_CONFIG_OPTIONS "--prefix=${OCPN_DEPS_BUNDLE_PATH}")
endif()
find_package(wxWidgets COMPONENTS ${wxWidgets_FIND_COMPONENTS})
if (wxWidgets_FOUND AND OCPN_USE_WEBVIEW)
message(STATUS "Found wxWidgets webview add-on")
Expand Down Expand Up @@ -913,11 +922,13 @@ set(
include/LinkPropDlg.h
include/load_errors_dlg.h
include/logger.h
include/meteo_points.h
include/MarkIcon.h
include/MarkInfo.h
include/mbtiles.h
include/multiplexer.h
include/nav_object_database.h
include/n0183_ctx_factory.h
include/navutil.h
include/navutil_base.h
include/NMEALogWindow.h
Expand Down Expand Up @@ -1008,6 +1019,7 @@ set(MODEL_SRC
${CMAKE_SOURCE_DIR}/src/catalog_handler.cpp
${CMAKE_SOURCE_DIR}/src/catalog_parser.cpp
${CMAKE_SOURCE_DIR}/src/chartdata_input_stream.cpp
${CMAKE_SOURCE_DIR}/src/cmdline.cpp
${CMAKE_SOURCE_DIR}/src/comm_ais.cpp
${CMAKE_SOURCE_DIR}/src/comm_navmsg.cpp
${CMAKE_SOURCE_DIR}/src/comm_navmsg_bus.cpp
Expand Down Expand Up @@ -1039,6 +1051,7 @@ set(MODEL_SRC
${CMAKE_SOURCE_DIR}/src/georef.cpp
${CMAKE_SOURCE_DIR}/src/hyperlink.cpp
${CMAKE_SOURCE_DIR}/src/logger.cpp
${CMAKE_SOURCE_DIR}/src/multiplexer.cpp
${CMAKE_SOURCE_DIR}/src/nav_object_database.cpp
${CMAKE_SOURCE_DIR}/src/navutil_base.cpp
${CMAKE_SOURCE_DIR}/src/ocpn_plugin.cpp
Expand Down Expand Up @@ -1108,7 +1121,6 @@ set(
src/mDNS_query.cpp
src/mDNS_service.cpp
src/MUIBar.cpp
src/multiplexer.cpp
src/navutil.cpp
src/NMEALogWindow.cpp
src/ocpCursor.cpp
Expand Down Expand Up @@ -1259,6 +1271,12 @@ if (APPLE)
${PACKAGE_NAME}
PRIVATE /usr/X11/include /usr/X11/include/GL
)
if(OCPN_USE_DEPS_BUNDLE)
target_include_directories(
${PACKAGE_NAME}
PRIVATE "${OCPN_DEPS_BUNDLE_PATH}/include"
)
endif()
endif ()

# IF(NOT WIN32) include(OcpnFindGpsd) if (TARGET ocpn::gpsd)
Expand Down Expand Up @@ -1563,7 +1581,7 @@ if (OCPN_USE_SVG)
set(PKGPROJ_TEMPLATE OpenCPN.FrameDir.pkgproj.in)
else()
message(STATUS "wxWidgets older than 3.1.6 detected, using wxSVG")
set(PKGPROJ_TEMPLATE OpenCPN.pkgproj.in)
set(PKGPROJ_TEMPLATE OpenCPN.FrameDir.pkgproj.in)
if (NOT QT_ANDROID)
include(OcpnFindCairo)
include(OcpnFindExpat)
Expand Down Expand Up @@ -2664,14 +2682,27 @@ if (WIN32 AND NOT UNIX)
endif (WIN32 AND NOT UNIX)

if (APPLE)
find_library(
MPG123 NAMES mpg123
PATHS /usr/local/opt/mpg123/lib NO_DEFAULT_PATH
REQUIRED
)
if(OCPN_USE_DEPS_BUNDLE)
message (status "PATH: ${OCPN_DEPS_BUNDLE_PATH}")
find_library(
MPG123 NAMES libmpg3 mpg123
HINTS "${OCPN_DEPS_BUNDLE_PATH}/lib"
NO_DEFAULT_PATH
REQUIRED
)
else()
find_library(
MPG123 NAMES libmpg3 mpg123
REQUIRED
)
endif()
target_link_libraries(${PACKAGE_NAME} PUBLIC ${MPG123})
message(STATUS "MPG123: ${MPG123}")
find_library(MP3LAME NAMES mp3lame lame REQUIRED)
if(OCPN_USE_DEPS_BUNDLE)
find_library(MP3LAME NAMES mp3lame lame HINTS "${OCPN_DEPS_BUNDLE_PATH}/lib" NO_DEFAULT_PATH REQUIRED)
else()
find_library(MP3LAME NAMES mp3lame lame REQUIRED)
endif()
target_link_libraries(${PACKAGE_NAME} PUBLIC ${MP3LAME})
message(STATUS "MP3LAME: ${MP3LAME}")
endif ()
Expand Down Expand Up @@ -2920,7 +2951,7 @@ configure_file(
#
set(PKG_DESCR [=[
OpenCPN is a concise ChartPlotter/Navigator. The application supports:
GPS/GPDS Position Input, BSB Raster Chart Display, S57 Vector ENChart
GPS/GPSD Position Input, BSB Raster Chart Display, S57 Vector ENChart
Display, AIS Input Decoding, Waypoint Autopilot Navigation. ]=])

if (UNIX AND NOT APPLE)
Expand Down Expand Up @@ -3214,7 +3245,18 @@ if (NOT QT_ANDROID)
endif ()
endif ()

if(APPLE AND OCPN_USE_DEPS_BUNDLE)
target_include_directories(
opencpn-cmd
PUBLIC
${OCPN_DEPS_BUNDLE_PATH}/include
)
endif()

if (NOT WIN32)
if(APPLE AND OCPN_USE_DEPS_BUNDLE)
set(OPENSSL_ROOT_DIR ${OCPN_DEPS_BUNDLE_PATH})
endif()
find_package(OpenSSL)
if (OPENSSL_FOUND)
message(STATUS
Expand Down Expand Up @@ -3254,3 +3296,5 @@ if (QT_ANDROID)

add_definitions(-DMG_ENABLE_OPENSSL)
endif (QT_ANDROID)

add_custom_target(print-model-files COMMAND cmake -E echo ${MODEL_SRC})
Loading

0 comments on commit c10f50e

Please sign in to comment.