Skip to content

Commit aa48450

Browse files
committed
cmake: find sol2 on system, or use fetch content
1 parent b56faa3 commit aa48450

4 files changed

Lines changed: 9 additions & 6 deletions

File tree

.gitmodules

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
[submodule "deps/sol2"]
2-
path = deps/sol2
3-
url = https://github.com/ThePhD/sol2.git
41
[submodule "deps/clap-juce-extensions"]
52
path = deps/clap-juce-extensions
63
url = https://github.com/free-audio/clap-juce-extensions

CMakeLists.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,7 @@ if(APPLE AND ELEMENT_ENABLE_UPDATER)
1111
include(cmake/FindSparkle.cmake)
1212
endif()
1313
include(cmake/FindJack.cmake)
14-
15-
add_subdirectory(deps/sol2 EXCLUDE_FROM_ALL)
14+
include(cmake/FindSol2.cmake)
1615
include(cmake/FindJUCE.cmake)
1716

1817
# Global JUCE properties

cmake/FindSol2.cmake

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
find_package(sol2 4.0.0 CONFIG)
2+
if(NOT sol2_FOUND)
3+
FetchContent_Declare(sol2
4+
GIT_REPOSITORY https://github.com/ThePhD/sol2.git
5+
GIT_TAG c1f95a773c6f8f4fde8ca3efe872e7286afe4444
6+
GIT_SHALLOW ON)
7+
FetchContent_MakeAvailable(sol2)
8+
endif()

deps/sol2

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)