Skip to content

Commit 7817fd1

Browse files
committed
Move JUCE depedency from git submodule to CPM
1 parent b16312d commit 7817fd1

File tree

3 files changed

+26
-5
lines changed

3 files changed

+26
-5
lines changed

.gitmodules

Lines changed: 0 additions & 4 deletions
This file was deleted.

CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ project(pluginval VERSION ${CURRENT_VERSION})
55

66
# Just compliing pluginval
77
if (pluginval_IS_TOP_LEVEL)
8-
add_subdirectory(modules/juce)
8+
include(cmake/CPM.cmake)
9+
CPMAddPackage("gh:juce-framework/juce#8.0.4")
910

1011
if (APPLE)
1112
# Target OS versions down to 10.11

cmake/CPM.cmake

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# SPDX-License-Identifier: MIT
2+
#
3+
# SPDX-FileCopyrightText: Copyright (c) 2019-2023 Lars Melchior and contributors
4+
5+
set(CPM_DOWNLOAD_VERSION 0.40.2)
6+
set(CPM_HASH_SUM "c8cdc32c03816538ce22781ed72964dc864b2a34a310d3b7104812a5ca2d835d")
7+
8+
if(CPM_SOURCE_CACHE)
9+
set(CPM_DOWNLOAD_LOCATION "${CPM_SOURCE_CACHE}/cpm/CPM_${CPM_DOWNLOAD_VERSION}.cmake")
10+
elseif(DEFINED ENV{CPM_SOURCE_CACHE})
11+
set(CPM_DOWNLOAD_LOCATION "$ENV{CPM_SOURCE_CACHE}/cpm/CPM_${CPM_DOWNLOAD_VERSION}.cmake")
12+
else()
13+
set(CPM_DOWNLOAD_LOCATION "${CMAKE_BINARY_DIR}/cmake/CPM_${CPM_DOWNLOAD_VERSION}.cmake")
14+
endif()
15+
16+
# Expand relative path. This is important if the provided path contains a tilde (~)
17+
get_filename_component(CPM_DOWNLOAD_LOCATION ${CPM_DOWNLOAD_LOCATION} ABSOLUTE)
18+
19+
file(DOWNLOAD
20+
https://github.com/cpm-cmake/CPM.cmake/releases/download/v${CPM_DOWNLOAD_VERSION}/CPM.cmake
21+
${CPM_DOWNLOAD_LOCATION} EXPECTED_HASH SHA256=${CPM_HASH_SUM}
22+
)
23+
24+
include(${CPM_DOWNLOAD_LOCATION})

0 commit comments

Comments
 (0)