diff --git a/RELEASE.md b/RELEASE.md index 7720c99..ca0211a 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -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) diff --git a/audio-unit/auwrapper/CMakeLists.txt b/audio-unit/auwrapper/CMakeLists.txt index 40826dc..02fcdb2 100644 --- a/audio-unit/auwrapper/CMakeLists.txt +++ b/audio-unit/auwrapper/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.28) +cmake_minimum_required(VERSION 3.19) if (MAC) if (XCODE) diff --git a/blank-plugin/CMakeLists.txt b/blank-plugin/CMakeLists.txt index a08d56d..965ab36 100644 --- a/blank-plugin/CMakeLists.txt +++ b/blank-plugin/CMakeLists.txt @@ -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-]) diff --git a/blank-plugin/fetch_jamba.cmake b/blank-plugin/fetch_jamba.cmake index 4ca3c61..9a0b453 100644 --- a/blank-plugin/fetch_jamba.cmake +++ b/blank-plugin/fetch_jamba.cmake @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.28) +cmake_minimum_required(VERSION 3.19) include(FetchContent) diff --git a/cmake/JambaFetchContent.cmake b/cmake/JambaFetchContent.cmake index 1d29efc..38df809 100644 --- a/cmake/JambaFetchContent.cmake +++ b/cmake/JambaFetchContent.cmake @@ -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) @@ -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) diff --git a/cmake/JambaFetchGoogleTest.cmake b/cmake/JambaFetchGoogleTest.cmake index c824e89..00468fc 100644 --- a/cmake/JambaFetchGoogleTest.cmake +++ b/cmake/JambaFetchGoogleTest.cmake @@ -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 @@ -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") diff --git a/cmake/JambaOptions.cmake b/cmake/JambaOptions.cmake index 0ee0fdd..8384aa8 100644 --- a/cmake/JambaOptions.cmake +++ b/cmake/JambaOptions.cmake @@ -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 @@ -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 diff --git a/jamba-test-plugin/CMakeLists.txt b/jamba-test-plugin/CMakeLists.txt index 98e6c48..8df1c44 100644 --- a/jamba-test-plugin/CMakeLists.txt +++ b/jamba-test-plugin/CMakeLists.txt @@ -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)