Skip to content

Commit

Permalink
reverted CMake changes which causes issues
Browse files Browse the repository at this point in the history
  • Loading branch information
ypujante committed Nov 24, 2024
1 parent 3b31a18 commit 7f93941
Show file tree
Hide file tree
Showing 8 changed files with 25 additions and 22 deletions.
1 change: 0 additions & 1 deletion RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ Check the [Requirements](https://jamba.dev/requirements/) documentation for info
## [7.1.0 | 2024-11-24](https://github.com/pongasoft/jamba/tree/v7.1.0)

* Migrated Jamba to use VST3 SDK 3.7.12 ([release notes](https://steinbergmedia.github.io/vst3_dev_portal/pages/Versions/Version+3.7.12.html))
* Upgraded CMake dependency to 3.28 and fixed warning due to `FetchContent_Populate`

## [7.0.1 | 2023-05-27](https://github.com/pongasoft/jamba/tree/v7.0.1)

Expand Down
2 changes: 1 addition & 1 deletion audio-unit/auwrapper/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.28)
cmake_minimum_required(VERSION 3.19)

if (MAC)
if (XCODE)
Expand Down
2 changes: 1 addition & 1 deletion blank-plugin/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.28)
cmake_minimum_required(VERSION 3.19)

# build Audio Unit?
option(JAMBA_ENABLE_AUDIO_UNIT "Enable Audio Unit" [-enable_audio_unit-])
Expand Down
2 changes: 1 addition & 1 deletion blank-plugin/fetch_jamba.cmake
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.28)
cmake_minimum_required(VERSION 3.19)

include(FetchContent)

Expand Down
25 changes: 13 additions & 12 deletions cmake/JambaFetchContent.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@
#
# @author Yan Pujante

cmake_minimum_required(VERSION 3.28)
cmake_minimum_required(VERSION 3.19)

cmake_policy(SET CMP0169 OLD)

include(FetchContent)

Expand Down Expand Up @@ -52,42 +54,41 @@ function(jamba_fetch_content)

string(TOUPPER "${ARG_NAME}" UPPERCASE_NAME)

# if root dir is defined, fetch content will not use git
set(FETCHCONTENT_SOURCE_DIR_${UPPERCASE_NAME} ${ARG_ROOT_DIR})

if(ARG_DOWNLOAD_URL)
FetchContent_Declare( ${ARG_NAME}
EXCLUDE_FROM_ALL
URL "${ARG_DOWNLOAD_URL}"
URL_HASH "${ARG_DOWNLOAD_URL_HASH}"
SOURCE_DIR "${CMAKE_CURRENT_BINARY_DIR}/${ARG_NAME}-src"
BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}/${ARG_NAME}-build"
DOWNLOAD_EXTRACT_TIMESTAMP true
)
)
set(FETCH_SOURCE "${ARG_DOWNLOAD_URL}")
else()
FetchContent_Declare(${ARG_NAME}
EXCLUDE_FROM_ALL
GIT_REPOSITORY ${ARG_GIT_REPO}
GIT_TAG ${ARG_GIT_TAG}
GIT_CONFIG advice.detachedHead=false
GIT_SHALLOW true
SOURCE_DIR "${CMAKE_CURRENT_BINARY_DIR}/${ARG_NAME}-src"
BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}/${ARG_NAME}-build"
)
)
set(FETCH_SOURCE "${ARG_GIT_REPO}/tree/${ARG_GIT_TAG}")
endif()


FetchContent_GetProperties(${ARG_NAME})

if(FETCHCONTENT_SOURCE_DIR_${UPPERCASE_NAME})
message(STATUS "Using ${ARG_NAME} from local ${FETCHCONTENT_SOURCE_DIR_${UPPERCASE_NAME}}")
else()
message(STATUS "Fetching ${ARG_NAME} from ${FETCH_SOURCE}")
endif()
if(NOT ${ARG_NAME}_POPULATED)
if(FETCHCONTENT_SOURCE_DIR_${UPPERCASE_NAME})
message(STATUS "Using ${ARG_NAME} from local ${FETCHCONTENT_SOURCE_DIR_${UPPERCASE_NAME}}")
else()
message(STATUS "Fetching ${ARG_NAME} from ${FETCH_SOURCE}")
endif()

FetchContent_MakeAvailable(${ARG_NAME})
FetchContent_Populate(${ARG_NAME})
endif()

set(${ARG_NAME}_ROOT_DIR "${${ARG_NAME}_SOURCE_DIR}" PARENT_SCOPE)
set(${ARG_NAME}_SOURCE_DIR "${${ARG_NAME}_SOURCE_DIR}" PARENT_SCOPE)
Expand Down
7 changes: 5 additions & 2 deletions cmake/JambaFetchGoogleTest.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@
#
# @author Yan Pujante

cmake_minimum_required(VERSION 3.28)
cmake_minimum_required(VERSION 3.19)

jamba_fetch_content(NAME googletest)

# Prevent overriding the parent project's compiler/linker
# settings on Windows
Expand All @@ -23,7 +25,8 @@ set(gtest_force_shared_crt ON CACHE BOOL "Set by Jamba" FORCE)
# Do not install GoogleTest!
option(INSTALL_GTEST "Enable installation of googletest. (Projects embedding googletest may want to turn this OFF.)" OFF)

jamba_fetch_content(NAME googletest)
# Add googletest directly to our build. This defines the gtest and gtest_main targets.
add_subdirectory(${googletest_SOURCE_DIR} ${googletest_BINARY_DIR} EXCLUDE_FROM_ALL)

smtg_target_setup_universal_binary("gtest")
smtg_target_setup_universal_binary("gtest_main")
Expand Down
6 changes: 3 additions & 3 deletions cmake/JambaOptions.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -103,9 +103,9 @@ set(googletest_GIT_REPO "https://github.com/google/googletest" CACHE STRING "goo

#------------------------------------------------------------------------
# The git tag for googletest
# v1.13.0 (2023/01/17)
# v1.15.2 (2024/07/31)
#------------------------------------------------------------------------
set(googletest_GIT_TAG "v1.13.0" CACHE STRING "googletest git tag")
set(googletest_GIT_TAG "v1.15.2" CACHE STRING "googletest git tag")

#------------------------------------------------------------------------
# The download URL for googletest
Expand All @@ -115,7 +115,7 @@ set(googletest_DOWNLOAD_URL "${googletest_GIT_REPO}/archive/refs/tags/${googlete
#------------------------------------------------------------------------
# The download URL hash for googletest
#------------------------------------------------------------------------
set(googletest_DOWNLOAD_URL_HASH "SHA256=ffa17fbc5953900994e2deec164bb8949879ea09b411e07f215bfbb1f87f4632" CACHE STRING "googletest download url hash" FORCE)
set(googletest_DOWNLOAD_URL_HASH "SHA256=f179ec217f9b3b3f3c6e8b02d3e7eda997b49e4ce26d6b235c9053bec9c0bf9f" CACHE STRING "googletest download url hash" FORCE)

#------------------------------------------------------------------------
# Option to enable generating the dev script which allows to build and install the plugin
Expand Down
2 changes: 1 addition & 1 deletion jamba-test-plugin/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.28)
cmake_minimum_required(VERSION 3.19)

# build Audio Unit?
option(JAMBA_ENABLE_AUDIO_UNIT "Enable Audio Unit" ON)
Expand Down

0 comments on commit 7f93941

Please sign in to comment.