Skip to content

Commit

Permalink
[dump] Some fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
jcelerier committed Feb 25, 2024
1 parent a8d81b1 commit b1f9c9a
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 24 deletions.
64 changes: 40 additions & 24 deletions cmake/avendish.dependencies.cmake
Original file line number Diff line number Diff line change
@@ -1,27 +1,43 @@
include(FetchContent)
FetchContent_Declare(
concurrentqueue
GIT_REPOSITORY "https://github.com/jcelerier/concurrentqueue"
GIT_TAG master
GIT_PROGRESS true
)
FetchContent_MakeAvailable(concurrentqueue)
if(NOT TARGET fmtlib::fmt)
FetchContent_Declare(
fmt
GIT_REPOSITORY "https://github.com/fmtlib/fmt"
GIT_TAG master
GIT_PROGRESS true
)
FetchContent_MakeAvailable(fmt)
endif()

FetchContent_Declare(
nlohmann_json
GIT_REPOSITORY "https://github.com/nlohmann/json"
GIT_TAG master
GIT_PROGRESS true
)
FetchContent_MakeAvailable(nlohmann_json)
if(NOT TARGET concurrentqueue)
FetchContent_Declare(
concurrentqueue
GIT_REPOSITORY "https://github.com/jcelerier/concurrentqueue"
GIT_TAG master
GIT_PROGRESS true
)
FetchContent_MakeAvailable(concurrentqueue)
endif()

set(BUILD_TESTING 0)
set(BUILD_BENCHMARK 0)
set(INJA_USE_EMBEDDED_JSON 0)
FetchContent_Declare(
pantor_inja
GIT_REPOSITORY "https://github.com/pantor/inja"
GIT_TAG master
GIT_PROGRESS true
)
FetchContent_MakeAvailable(pantor_inja)
if(NOT TARGET nlohmann_json::nlohmann_json)
FetchContent_Declare(
nlohmann_json
GIT_REPOSITORY "https://github.com/nlohmann/json"
GIT_TAG master
GIT_PROGRESS true
)
FetchContent_MakeAvailable(nlohmann_json)
endif()

if(NOT TARGET pantor::inja)
set(BUILD_TESTING 0)
set(BUILD_BENCHMARK 0)
set(INJA_USE_EMBEDDED_JSON 0)
FetchContent_Declare(
pantor_inja
GIT_REPOSITORY "https://github.com/pantor/inja"
GIT_TAG main
GIT_PROGRESS true
)
FetchContent_MakeAvailable(pantor_inja)
endif()
5 changes: 5 additions & 0 deletions cmake/avendish.max.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,11 @@ endif()
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")
set(MAXSDK_JIT_INCLUDE_DIR "${AVND_MAXSDK_PATH}/source/c74support/jit-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")
set(MAXSDK_JIT_INCLUDE_DIR "${AVND_MAXSDK_PATH}/c74support/jit-includes")
endif()

if(APPLE)
Expand All @@ -29,6 +31,7 @@ string(STRIP "${MAXSDK_LINKER_FLAGS}" MAXSDK_LINKER_FLAGS)

set(MAXSDK_MAX_INCLUDE_DIR "${MAXSDK_MAX_INCLUDE_DIR}" CACHE INTERNAL "MAXSDK_MAX_INCLUDE_DIR")
set(MAXSDK_MSP_INCLUDE_DIR "${MAXSDK_MSP_INCLUDE_DIR}" CACHE INTERNAL "MAXSDK_MSP_INCLUDE_DIR")
set(MAXSDK_JIT_INCLUDE_DIR "${MAXSDK_JIT_INCLUDE_DIR}" CACHE INTERNAL "MAXSDK_JIT_INCLUDE_DIR")
set(MAXSDK_API_LIBRARY "${MAXSDK_API_LIBRARY}" CACHE INTERNAL "MAXSDK_API_LIBRARY")
set(MAXSDK_LINKER_FLAGS "${MAXSDK_LINKER_FLAGS}" CACHE INTERNAL "MAXSDK_LINKER_FLAGS")

Expand All @@ -47,6 +50,7 @@ target_compile_definitions(
target_include_directories(maxmsp_commonsyms PRIVATE
"${MAXSDK_MAX_INCLUDE_DIR}"
"${MAXSDK_MSP_INCLUDE_DIR}"
"${MAXSDK_JIT_INCLUDE_DIR}"
)

# We only want to export this on Mac
Expand Down Expand Up @@ -125,6 +129,7 @@ function(avnd_make_max)
target_include_directories(${AVND_FX_TARGET} PRIVATE
"${MAXSDK_MAX_INCLUDE_DIR}"
"${MAXSDK_MSP_INCLUDE_DIR}"
"${MAXSDK_JIT_INCLUDE_DIR}"
)

target_link_libraries(
Expand Down
4 changes: 4 additions & 0 deletions include/avnd/binding/max/outputs.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ struct do_process_outlet
{
outlet_anything(p, gensym(v.data()), 0, nullptr);
}
void operator()(const std::string& v) const noexcept
{
outlet_anything(p, gensym(v.data()), 0, nullptr);
}

template<typename T>
requires std::is_aggregate_v<T>
Expand Down

0 comments on commit b1f9c9a

Please sign in to comment.