Skip to content

Commit

Permalink
[ci] Update to latest max sdk
Browse files Browse the repository at this point in the history
  • Loading branch information
jcelerier committed Sep 15, 2023
1 parent 1106e1e commit b295112
Show file tree
Hide file tree
Showing 9 changed files with 49 additions and 18 deletions.
17 changes: 13 additions & 4 deletions .github/workflows/build_cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,15 +74,22 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Checkout dependencies
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
repository: ossia/score
submodules: "recursive"
path: score

- name: Checkout Max SDK
uses: actions/checkout@v3
with:
repository: jcelerier/max-sdk-base
submodules: "recursive"
path: max-sdk-base

- name: Install dependencies
shell: bash
run: |
Expand Down Expand Up @@ -110,13 +117,14 @@ jobs:
export PATH=${{ matrix.config.path }}:$PATH
fi
export MAX_SDK=$PWD/../max-sdk-base
export SDK_3RDPARTY=$PWD/../score/3rdparty
export VERBOSE=1
cmake .. \
-DBOOST_ROOT=${{ matrix.config.sdk }}/boost \
-Dpybind11_DIR=$SDK_3RDPARTY/libossia/3rdparty/pybind11 \
-DAVND_MAXSDK_PATH=$SDK_3RDPARTY/libossia/3rdparty/max-sdk \
-DAVND_MAXSDK_PATH=$MAX_SDK \
-DVST3_SDK_ROOT=$SDK_3RDPARTY/vst3 \
-DCMAKE_PREFIX_PATH="$SDK_3RDPARTY/libpd/pure-data/src" \
${{ matrix.config.common_flags }} \
Expand Down Expand Up @@ -145,13 +153,14 @@ jobs:
export PATH=${{ matrix.config.path }}:$PATH
fi
export MAX_SDK=$PWD/../max-sdk-base
export SDK_3RDPARTY=$PWD/../score/3rdparty
export VERBOSE=1
cmake .. \
-DBOOST_ROOT=${{ matrix.config.sdk }}/boost \
-Dpybind11_DIR=$SDK_3RDPARTY/libossia/3rdparty/pybind11 \
-DAVND_MAXSDK_PATH=$SDK_3RDPARTY/libossia/3rdparty/max-sdk \
-DAVND_MAXSDK_PATH=$MAX_SDK \
-DVST3_SDK_ROOT=$SDK_3RDPARTY/vst3 \
-DCMAKE_PREFIX_PATH="$SDK_3RDPARTY/libpd/pure-data/src;$SDK_3RDPARTY/libossia/3rdparty/pybind11" \
${{ matrix.config.common_flags }} \
Expand Down
17 changes: 13 additions & 4 deletions .github/workflows/build_vs2022.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,22 @@ jobs:
runs-on: windows-2022
steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Checkout dependencies
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
repository: ossia/score
submodules: "recursive"
path: score

- name: Checkout Max SDK
uses: actions/checkout@v3
with:
repository: jcelerier/max-sdk-base
submodules: "recursive"
path: max-sdk-base

- name: Install dependencies
shell: bash
run: |
Expand All @@ -35,13 +42,14 @@ jobs:
mkdir build-debug
cd build-debug
export MAX_SDK=$PWD/../max-sdk-base
export SDK_3RDPARTY=$PWD/../score/3rdparty
export VERBOSE=1
cmake .. \
-DBOOST_ROOT=/c/ossia-sdk/boost \
-Dpybind11_DIR=$SDK_3RDPARTY/libossia/3rdparty/pybind11 \
-DAVND_MAXSDK_PATH=$SDK_3RDPARTY/libossia/3rdparty/max-sdk \
-DAVND_MAXSDK_PATH=$MAX_SDK \
-DVST3_SDK_ROOT=$SDK_3RDPARTY/vst3 \
-DCMAKE_PREFIX_PATH="$SDK_3RDPARTY/libpd/pure-data/src" \
-G "Visual Studio 17 2022"
Expand All @@ -60,13 +68,14 @@ jobs:
mkdir build-release
cd build-release
export MAX_SDK=$PWD/../max-sdk-base
export SDK_3RDPARTY=$PWD/../score/3rdparty
export VERBOSE=1
cmake .. \
-DBOOST_ROOT=/c/ossia-sdk/boost \
-Dpybind11_DIR=$SDK_3RDPARTY/libossia/3rdparty/pybind11 \
-DAVND_MAXSDK_PATH=$SDK_3RDPARTY/libossia/3rdparty/max-sdk \
-DAVND_MAXSDK_PATH=$MAX_SDK \
-DVST3_SDK_ROOT=$SDK_3RDPARTY/vst3 \
-DCMAKE_PREFIX_PATH="$SDK_3RDPARTY/libpd/pure-data/src" \
-G "Visual Studio 17 2022"
Expand Down
1 change: 0 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")

project(avendish)
option(AVENDISH_INCLUDE_SOURCE_ONLY "Create a simple Avendish target for including headers" OFF)
include_directories(/opt/libossia/include)

if(AVENDISH_INCLUDE_SOURCE_ONLY)
set(AVND_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}")
Expand Down
3 changes: 2 additions & 1 deletion cmake/avendish.cmake
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
include(CMakeFindDependencyMacro)

set(CMAKE_INCLUDE_CURRENT_DIR 1)
set(CMAKE_CXX_STANDARD_REQUIRED 23)
set(CMAKE_CXX_STANDARD 23)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(AVND_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}")
set(AVND_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}" CACHE INTERNAL "")

Expand Down
10 changes: 8 additions & 2 deletions cmake/avendish.max.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,13 @@ if(NOT AVND_MAXSDK_PATH)
return()
endif()

set(MAXSDK_MAX_INCLUDE_DIR "${AVND_MAXSDK_PATH}/source/c74support/max-includes")
set(MAXSDK_MSP_INCLUDE_DIR "${AVND_MAXSDK_PATH}/source/c74support/msp-includes")
if(EXISTS "${AVND_MAXSDK_PATH}/source/c74support/max-includes")
set(MAXSDK_MAX_INCLUDE_DIR "${AVND_MAXSDK_PATH}/source/c74support/max-includes")
set(MAXSDK_MSP_INCLUDE_DIR "${AVND_MAXSDK_PATH}/source/c74support/msp-includes")
elseif(EXISTS "${AVND_MAXSDK_PATH}/c74support/max-includes")
set(MAXSDK_MAX_INCLUDE_DIR "${AVND_MAXSDK_PATH}/c74support/max-includes")
set(MAXSDK_MSP_INCLUDE_DIR "${AVND_MAXSDK_PATH}/c74support/msp-includes")
endif()

if(APPLE)
find_library(MAXSDK_API_LIBRARY NAMES MaxAPI HINTS "${MAXSDK_MAX_INCLUDE_DIR}")
Expand Down Expand Up @@ -82,6 +87,7 @@ function(avnd_make_max)
PRIVATE
AVND_MAXMSP=1
MAXAPI_USE_MSCRT=1
C74_USE_STRICT_TYPES=1
)

target_include_directories(${AVND_FX_TARGET} PRIVATE
Expand Down
12 changes: 11 additions & 1 deletion cmake/avendish.sources.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,17 @@ add_library(Avendish::Avendish ALIAS Avendish)


if(MSVC)
target_compile_options(Avendish PUBLIC /std:c++latest)
target_compile_options(Avendish
PUBLIC
-std:c++latest
-Zi
"-permissive-"
"-Zc:__cplusplus"
"-Zc:enumTypes"
"-Zc:inline"
"-Zc:preprocessor"
"-Zc:templateScope"
-wd4244)
target_compile_definitions(Avendish PUBLIC -DNOMINMAX=1 -DWIN32_LEAN_AND_MEAN=1)
endif()

Expand Down
1 change: 1 addition & 0 deletions include/avnd/binding/max/from_atoms.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ struct from_atom
return true;
}
#else
std::string_view str{sym->s_name, sym->s_name + strlen(sym->s_name)};
if(boost::conversion::try_lexical_convert(str, vv))
{
v = vv;
Expand Down
3 changes: 0 additions & 3 deletions include/avnd/binding/max/helpers.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,6 @@

#include <string_view>

struct t_inlet;
struct t_outlet;

namespace max
{
static constexpr bool valid_char_for_name(char c)
Expand Down
3 changes: 1 addition & 2 deletions include/avnd/binding/max/to_atoms.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -225,8 +225,7 @@ struct to_atoms
{
if(auto atoms = allocate(1, ac, av); !atoms.empty())
{
const t_symbol* sym = gensym(v.data());
atom_setsym(&atoms[0], sym);
atom_setsym(&atoms[0], gensym(v.data()));
return MAX_ERR_NONE;
}
return MAX_ERR_OUT_OF_MEM;
Expand Down

0 comments on commit b295112

Please sign in to comment.