Skip to content

Commit

Permalink
Merge pull request #2172 from timothyschoen/cmake-build
Browse files Browse the repository at this point in the history
  • Loading branch information
porres authored Sep 4, 2024
2 parents e8f1f20 + e941279 commit 7eed756
Show file tree
Hide file tree
Showing 325 changed files with 676 additions and 778 deletions.
18 changes: 12 additions & 6 deletions .github/workflows/c-cpp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ on:
branches: ["master", "CI"]

env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: Release
CMAKE_BUILD_PARALLEL_LEVEL: 4

Expand Down Expand Up @@ -78,14 +77,20 @@ jobs:
# ===============================================================

Windows-Build:
runs-on: windows-latest
timeout-minutes: 25
runs-on: windows-2022
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
fetch-depth: 0

- if: runner.os == 'Windows'
name: "Install mingw deps"
uses: msys2/setup-msys2@v2
with:
install: make mingw-w64-x86_64-gcc mingw64/mingw-w64-x86_64-cmake
update: false

- name: Get Pd
shell: bash
run: |
Expand All @@ -95,14 +100,15 @@ jobs:
mv pd-0.55-0 pd
- name: Configure pd-else
shell: bash
shell: msys2 {0}
run: |
cmake -BBuild -DPD_PATH=./pd -DPD_LIB_PATH=./pd/bin -G"MinGW Makefiles"
cmake -G"MSYS Makefiles" -BBuild -DPD_PATH=./pd
- name: Build pd-else
shell: bash
shell: msys2 {0}
run: |
cmake --build Build
rm -rf ./Build/else/*.a
- name: Upload Zip
uses: actions/upload-artifact@v3
Expand Down
17 changes: 10 additions & 7 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,14 @@ set(CMAKE_CXX_EXTENSIONS OFF)
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
set(CMAKE_MACOSX_RPATH ON)
set(CMAKE_BUILD_RPATH "$ORIGIN")
set(CMAKE_INSTALL_RPATH "$ORIGIN")
if(UNIX AND NOT APPLE)
set(CMAKE_BUILD_RPATH "$ORIGIN")
set(CMAKE_INSTALL_RPATH "$ORIGIN")
endif()
if(APPLE)
set(CMAKE_BUILD_RPATH "@loader_path")
set(CMAKE_INSTALL_RPATH "@loader_path")
endif()

set(CMAKE_OSX_DEPLOYMENT_TARGET "10.9" CACHE STRING "Minimum OS X deployment version")
set(CMAKE_OSX_ARCHITECTURES "arm64;x86_64" CACHE STRING "" FORCE)
Expand Down Expand Up @@ -38,7 +44,7 @@ file(GLOB else_sources

file(GLOB aubio_sources
${CMAKE_CURRENT_SOURCE_DIR}/Source/Shared/aubio/src/**/*.c
${CMAKE_CURRENT_SOURCE_DIR}/Source/shared/aubio/src/*.c
${CMAKE_CURRENT_SOURCE_DIR}/Source/Shared/aubio/src/*.c
)

include_directories(${PD_SOURCES_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/Source/Shared ${CMAKE_CURRENT_SOURCE_DIR}/Source/Shared/aubio/src)
Expand All @@ -52,6 +58,7 @@ foreach(file ${else_sources})
endforeach()

target_sources(beat_tilde PRIVATE ${aubio_sources})
target_link_libraries(else PRIVATE pdlua)

add_subdirectory(Source/Control/pd.link)
add_subdirectory(Source/Audio/circuit~)
Expand All @@ -61,8 +68,6 @@ add_subdirectory(Source/Audio/sfont~)
add_subdirectory(Source/Audio/sfz~)
add_subdirectory(Source/Control/lua)

target_link_libraries(else PRIVATE pdlua)

set(pdf_help "${CMAKE_CURRENT_SOURCE_DIR}/Documentation/README.pdf")
file(GLOB help_files "${CMAKE_CURRENT_SOURCE_DIR}/Documentation/Help-files/*")
file(GLOB extra_files
Expand All @@ -80,11 +85,9 @@ set(lua_resources
file(GLOB merda_files "${CMAKE_CURRENT_SOURCE_DIR}/Abstractions/Merda/Modules/*")
file(GLOB tcl_files "${CMAKE_CURRENT_SOURCE_DIR}/Source/Extra/*.tcl")
file(GLOB abstractions ${CMAKE_CURRENT_SOURCE_DIR}/Abstractions/Audio/*.pd ${CMAKE_CURRENT_SOURCE_DIR}/Abstractions/Control/*.pd ${CMAKE_CURRENT_SOURCE_DIR}/Abstractions/Extra/*)
file(MAKE_DIRECTORY ${else})
file(COPY ${pdf_help} ${extra_files} ${help_files} ${abstractions} ${tcl_files} ${lua_resources} DESTINATION ${PD_OUTPUT_PATH})
file(COPY ${merda_files} DESTINATION ${PD_OUTPUT_PATH})
file(COPY "${CMAKE_CURRENT_SOURCE_DIR}/Source/Audio/sfz~/sfz" DESTINATION ${PD_OUTPUT_PATH}/sfz)
file(COPY "${CMAKE_CURRENT_SOURCE_DIR}/Documentation/Live-Electronics-Tutorial" DESTINATION ${PD_OUTPUT_PATH}/Live-Electronics-Tutorial)
file(COPY "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE" DESTINATION ${PD_OUTPUT_PATH}/LICENSE)
file(REMOVE_RECURSE ${PD_OUTPUT_PATH}/audio)
file(REMOVE_RECURSE ${PD_OUTPUT_PATH}/*.a)
2 changes: 1 addition & 1 deletion Source/Audio/above~.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Porres 2017

#include "m_pd.h"
#include <m_pd.h>

static t_class *above_class;

Expand Down
2 changes: 1 addition & 1 deletion Source/Audio/add~.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Porres 2016

#include "m_pd.h"
#include <m_pd.h>

static t_class *add_class;

Expand Down
2 changes: 1 addition & 1 deletion Source/Audio/adsr~.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// porres 2017-2023

#include "m_pd.h"
#include <m_pd.h>
#include <math.h>

#define LOG001 log(0.001)
Expand Down
2 changes: 1 addition & 1 deletion Source/Audio/allpass.2nd~.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Porres 2017

#include "m_pd.h"
#include <m_pd.h>
#include <math.h>

#define PI 3.14159265358979323846
Expand Down
2 changes: 1 addition & 1 deletion Source/Audio/allpass.rev~.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

#include <math.h>
#include <stdlib.h>
#include "m_pd.h"
#include <m_pd.h>

#define allpass_rev_STACK 48000 // stack buf size, 1 sec at 48k
#define allpass_rev_MAXD 4294967294 // max delay = 2**32 - 2
Expand Down
2 changes: 1 addition & 1 deletion Source/Audio/asr~.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// porres 2017

#include "m_pd.h"
#include <m_pd.h>
#include <math.h>

#define LOG001 log(0.001)
Expand Down
4 changes: 2 additions & 2 deletions Source/Audio/autofade.mc~.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// porres 2017-2024

#include "m_pd.h"
#include "buffer.h"
#include <m_pd.h>
#include <buffer.h>

#define MAX_INOUT 4096

Expand Down
4 changes: 2 additions & 2 deletions Source/Audio/autofade2.mc~.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// porres 2017-2024

#include "m_pd.h"
#include "buffer.h"
#include <m_pd.h>
#include <buffer.h>

#define MAX_INOUT 4096

Expand Down
4 changes: 2 additions & 2 deletions Source/Audio/autofade2~.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// porres 2017-2024

#include "m_pd.h"
#include "buffer.h"
#include <m_pd.h>
#include <buffer.h>

#define MAX_INOUT 4096

Expand Down
4 changes: 2 additions & 2 deletions Source/Audio/autofade~.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// porres 2017-2024

#include "m_pd.h"
#include "buffer.h"
#include <m_pd.h>
#include <buffer.h>

#define MAX_INOUT 4096

Expand Down
4 changes: 2 additions & 2 deletions Source/Audio/balance~.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Porres 2016-2023

#include "m_pd.h"
#include "buffer.h"
#include <m_pd.h>
#include <buffer.h>

static t_class *balance_class;

Expand Down
2 changes: 1 addition & 1 deletion Source/Audio/bandpass~.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Porres 2017

#include "m_pd.h"
#include <m_pd.h>
#include <math.h>

#define PI 3.14159265358979323846
Expand Down
2 changes: 1 addition & 1 deletion Source/Audio/bandstop~.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Porres 2017

#include "m_pd.h"
#include <m_pd.h>
#include <math.h>

#define PI 3.14159265358979323846
Expand Down
2 changes: 1 addition & 1 deletion Source/Audio/biquads~.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "m_pd.h"
#include <m_pd.h>

#define COEFFS 5 // number of coeffs per filter stage
#define MAX_COEFFS 250 // defining max number of coeffs to take
Expand Down
2 changes: 1 addition & 1 deletion Source/Audio/bitnormal~.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// based on the code by Matt Barber for cyclone's bitsafe~

#include "m_pd.h"
#include <m_pd.h>

#define NAN_V 0x7FFFFFFFul
#define POS_INF 0x7F800000ul
Expand Down
2 changes: 1 addition & 1 deletion Source/Audio/bl.imp2~.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

#include "m_pd.h"
#include <m_pd.h>

#define _USE_MATH_DEFINES

Expand Down
2 changes: 1 addition & 1 deletion Source/Audio/bl.imp~.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// tim schoen

#include "m_pd.h"
#include <m_pd.h>

#define _USE_MATH_DEFINES

Expand Down
2 changes: 1 addition & 1 deletion Source/Audio/bl.saw2~.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
// Synthesis" by Jari Kleimola, Victor Lazzarini, Joseph Timoney, and Vesa
// Valimaki. http://www.acoustics.hut.fi/publications/papers/smc2010-phaseshaping/

#include "m_pd.h"
#include <m_pd.h>
#include <math.h>
#include <stdint.h>

Expand Down
2 changes: 1 addition & 1 deletion Source/Audio/bl.saw~.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
// Synthesis" by Jari Kleimola, Victor Lazzarini, Joseph Timoney, and Vesa
// Valimaki. http://www.acoustics.hut.fi/publications/papers/smc2010-phaseshaping/

#include "m_pd.h"
#include <m_pd.h>
#include <math.h>
#include <stdint.h>

Expand Down
2 changes: 1 addition & 1 deletion Source/Audio/bl.square~.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
// Synthesis" by Jari Kleimola, Victor Lazzarini, Joseph Timoney, and Vesa
// Valimaki. http://www.acoustics.hut.fi/publications/papers/smc2010-phaseshaping/

#include "m_pd.h"
#include <m_pd.h>
#include <math.h>
#include <stdint.h>

Expand Down
2 changes: 1 addition & 1 deletion Source/Audio/bl.tri~.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
// Synthesis" by Jari Kleimola, Victor Lazzarini, Joseph Timoney, and Vesa
// Valimaki. http://www.acoustics.hut.fi/publications/papers/smc2010-phaseshaping/

#include "m_pd.h"
#include <m_pd.h>
#include <math.h>
#include <stdint.h>

Expand Down
2 changes: 1 addition & 1 deletion Source/Audio/bl.vsaw~.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
// Synthesis" by Jari Kleimola, Victor Lazzarini, Joseph Timoney, and Vesa
// Valimaki. http://www.acoustics.hut.fi/publications/papers/smc2010-phaseshaping/

#include "m_pd.h"
#include <m_pd.h>
#include <math.h>
#include <stdint.h>

Expand Down
2 changes: 1 addition & 1 deletion Source/Audio/blocksize~.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// porres 2018-2020

#include "m_pd.h"
#include <m_pd.h>

static t_class *blocksize_class;

Expand Down
8 changes: 4 additions & 4 deletions Source/Audio/brown~.c
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
// Matt Barber and Porres (2017-2022)

#include "m_pd.h"
#include "g_canvas.h"
#include "magic.h"
#include "random.h"
#include <m_pd.h>
#include <g_canvas.h>
#include <magic.h>
#include <random.h>

static t_class *brown_class;

Expand Down
2 changes: 1 addition & 1 deletion Source/Audio/car2pol~.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// porres

#include "m_pd.h"
#include <m_pd.h>
#include <math.h>

static t_class *car2pol_tilde_class;
Expand Down
2 changes: 1 addition & 1 deletion Source/Audio/ceil~.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Porres 2017-2023

#include "m_pd.h"
#include <m_pd.h>
#include <math.h>

static t_class *ceil_class;
Expand Down
2 changes: 1 addition & 1 deletion Source/Audio/cents2ratio~.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Porres 2016

#include "m_pd.h"
#include <m_pd.h>
#include <math.h>

static t_class *cents2ratio_class;
Expand Down
6 changes: 3 additions & 3 deletions Source/Audio/chance~.c
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
// porres 2020

#include "m_pd.h"
#include "else_alloca.h"
#include <m_pd.h>
#include <else_alloca.h>
#include <stdlib.h>
#include "random.h"
#include <random.h>

typedef struct _chance{
t_object x_obj;
Expand Down
2 changes: 1 addition & 1 deletion Source/Audio/changed2~.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Porres 2017

#include "m_pd.h"
#include <m_pd.h>
#include "math.h"

static t_class *changed2_class;
Expand Down
2 changes: 1 addition & 1 deletion Source/Audio/changed~.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Porres 2016

#include "m_pd.h"
#include <m_pd.h>
#include "math.h"

static t_class *changed_class;
Expand Down
Loading

0 comments on commit 7eed756

Please sign in to comment.