gogins / cloud-5

Complete browser-based computer music studio for algorithmic composition and live coding
Other
9 stars 1 forks source link

Consolidation #69

Closed gogins closed 2 months ago

gogins commented 3 months ago

Bring into this project, most likely as ExternalTargets:

gogins commented 3 months ago
# Ensure ExternalProject is available
include(ExternalProject)

# Define where to clone the csound-wasm repository
set(CSOUND_WASM_SOURCE_DIR ${CMAKE_BINARY_DIR}/csound-wasm-src)

# ExternalProject configuration for csound-wasm
ExternalProject_Add(csound-wasm
    PREFIX ${CMAKE_BINARY_DIR}/csound-wasm
    GIT_REPOSITORY https://github.com/csound/csound-wasm.git
    GIT_TAG main  # or specify a specific tag or branch
    SOURCE_DIR ${CSOUND_WASM_SOURCE_DIR}
    CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=<INSTALL_DIR>
    BUILD_ALWAYS ON  # Optionally always rebuild
)

# Specify dependency relationships if needed
add_dependencies(your_target csound-wasm)

# Include the install directory
include_directories(<INSTALL_DIR>/include)
link_directories(<INSTALL_DIR>/lib)

# Link the csound-wasm libraries to your project target
target_link_libraries(your_target csound-wasm-lib)
gogins commented 3 months ago

This is actually working, but there are obvious problems. I need to separate the build directory from the source directory in order to get dependency checking to work.

gogins commented 2 months ago

I an closing this as the objectives have changed somewhat. Will open a new issue to address both consolidation and porting to Csound version 7,