gogins / cloud-5

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

Consolidation #69

Open gogins opened 2 weeks ago

gogins commented 2 weeks ago

Bring into this project, most likely as ExternalTargets:

gogins commented 2 weeks 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 2 weeks 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.