Skip to content

Hardcoded dependency path #1

Description

@ssabug

Hello,

First, thank you for sharing this plugin.

in CMakeLists.txt, the path to the JUCE library is hardcoded, therefore, nobody except you can build this project .
set(JUCE_DIR "C:/MS/Build/_deps/juce-src")

Moreover, putting absolute path kills the cross-platform feature of cmake, which is one of the main reason people take time to implement it in their project .

Cmake enables retrieving automatically JUCE sources from github, so why should we deprive ourselves ?

With cmake_minimum_required(VERSION 3.15) fulfilled, we can replace it with

include(FetchContent)

# -------------------------------------------------
# Fetch JUCE
# -------------------------------------------------
FetchContent_Declare(
    juce
    GIT_REPOSITORY https://github.com/juce-framework/JUCE.git
    GIT_TAG 8.0.12
)

FetchContent_MakeAvailable(juce)

This will automatically download JUCE v8.0.12 sources and make them available for the build. Interesting, isn't it?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions