Skip to content

Commit

Permalink
Merge pull request #750 from McMartin/support-JUCE-7.0.3
Browse files Browse the repository at this point in the history
Support building FRUT with JUCE 7.0.3
  • Loading branch information
McMartin committed Dec 13, 2022
2 parents 6c2670f + e3298a4 commit 102b590
Show file tree
Hide file tree
Showing 21 changed files with 69 additions and 87 deletions.
14 changes: 7 additions & 7 deletions .appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ install:
-- https://github.com/juce-framework/JUCE.git ci/tmp/JUCE-6.0.5
- git clone --branch=6.1.6 --depth=1 --single-branch
-- https://github.com/juce-framework/JUCE.git ci/tmp/JUCE-6.1.6
- git clone --branch=7.0.2 --depth=1 --single-branch
-- https://github.com/juce-framework/JUCE.git ci/tmp/JUCE-7.0.2
- git clone --branch=7.0.3 --depth=1 --single-branch
-- https://github.com/juce-framework/JUCE.git ci/tmp/JUCE-7.0.3

for:
- matrix:
Expand Down Expand Up @@ -306,8 +306,8 @@ build_script:
- cmake .. -G "%GENERATOR%" -DJUCE_ROOT="%APPVEYOR_BUILD_FOLDER%/ci/tmp/JUCE-6.1.6"
- cmake --build . --config Debug --parallel

# Configure and build FRUT with JUCE 7.0.2
- cmake .. -G "%GENERATOR%" -DJUCE_ROOT="%APPVEYOR_BUILD_FOLDER%/ci/tmp/JUCE-7.0.2"
# Configure and build FRUT with JUCE 7.0.3
- cmake .. -G "%GENERATOR%" -DJUCE_ROOT="%APPVEYOR_BUILD_FOLDER%/ci/tmp/JUCE-7.0.3"
- cmake --build . --config Debug --parallel

# Build and install FRUT in ./prefix
Expand Down Expand Up @@ -360,7 +360,7 @@ test_script:
-DJucer2CMake_EXE="prefix/FRUT/bin/Jucer2CMake.exe"
-P ci/apply-Jucer2CMake-reprojucer-to-JUCE-jucers.cmake
- >
cmake -DJUCE_VERSION="7.0.2"
cmake -DJUCE_VERSION="7.0.3"
-DJucer2CMake_EXE="prefix/FRUT/bin/Jucer2CMake.exe"
-P ci/apply-Jucer2CMake-reprojucer-to-JUCE-jucers.cmake
- git diff --quiet
Expand Down Expand Up @@ -410,5 +410,5 @@ test_script:
# Configure all JUCE 6.1.6 projects
- cmake .. -G "%GENERATOR%" -DJUCE_VERSION="6.1.6"

# Configure all JUCE 7.0.2 projects
- cmake .. -G "%GENERATOR%" -DJUCE_VERSION="7.0.2"
# Configure all JUCE 7.0.3 projects
- cmake .. -G "%GENERATOR%" -DJUCE_VERSION="7.0.3"
2 changes: 1 addition & 1 deletion .azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ trigger:
parameters:
- name: juceVersions
type: object
default: [4.2.0, 4.3.1, 5.0.0, 5.2.1, 5.3.1, 5.4.3, 5.4.7, 6.0.5, 6.1.6, 7.0.2]
default: [4.2.0, 4.3.1, 5.0.0, 5.2.1, 5.3.1, 5.4.3, 5.4.7, 6.0.5, 6.1.6, 7.0.3]

jobs:
- job: iOS
Expand Down
14 changes: 6 additions & 8 deletions Jucer2CMake/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (C) 2020-2021 Alain Martin
# Copyright (C) 2020-2022 Alain Martin
#
# This file is part of FRUT.
#
Expand Down Expand Up @@ -41,12 +41,7 @@ endif()


set(CMAKE_CXX_EXTENSIONS OFF)
if(DEFINED CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION
AND NOT CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION VERSION_LESS 10.0.20348.0)
set(CMAKE_CXX_STANDARD 17)
else()
set(CMAKE_CXX_STANDARD 14)
endif()
set(CMAKE_CXX_STANDARD 17)


add_library(Jucer2CMake_JUCE STATIC "")
Expand All @@ -71,7 +66,10 @@ target_compile_definitions(Jucer2CMake_JUCE PUBLIC
)

if(APPLE)
target_compile_options(Jucer2CMake_JUCE PRIVATE -Wno-deprecated-declarations)
target_compile_options(Jucer2CMake_JUCE PRIVATE
-Wno-deprecated-declarations
-Wno-register
)

find_library(Cocoa_framework "Cocoa")
find_library(IOKit_framework "IOKit")
Expand Down
3 changes: 2 additions & 1 deletion Jucer2CMake/src/juce_core.hpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (C) 2021 Alain Martin
// Copyright (C) 2021-2022 Alain Martin
//
// This file is part of FRUT.
//
Expand Down Expand Up @@ -32,6 +32,7 @@
#if __has_warning("-Winconsistent-missing-destructor-override")
#pragma clang diagnostic ignored "-Winconsistent-missing-destructor-override"
#endif
#pragma clang diagnostic ignored "-Wmissing-variable-declarations"
#pragma clang diagnostic ignored "-Wold-style-cast"
#pragma clang diagnostic ignored "-Wsign-conversion"
#pragma clang diagnostic ignored "-Wundef"
Expand Down
4 changes: 4 additions & 0 deletions Jucer2CMake/src/reprojucer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -767,6 +767,10 @@ inline void writeReprojucerCMakeLists(const Arguments& args,
return {};
});
}
else if (jucerVersionAsTuple >= Version{7, 0, 3})
{
writeQuoted("CXX_LANGUAGE_STANDARD", "C++17");
}
else if (jucerVersionAsTuple > Version{5, 2, 0})
{
writeQuoted("CXX_LANGUAGE_STANDARD", "C++14");
Expand Down
6 changes: 3 additions & 3 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ FRUT currently contains:
- ``examples`` and ``extras`` projects from `JUCE 5.4.7`_ (in `generated/JUCE-5.4.7`_)
- ``examples`` and ``extras`` projects from `JUCE 6.0.5`_ (in `generated/JUCE-6.0.5`_)
- ``examples`` and ``extras`` projects from `JUCE 6.1.6`_ (in `generated/JUCE-6.1.6`_)
- ``examples`` and ``extras`` projects from `JUCE 7.0.2`_ (in `generated/JUCE-7.0.2`_)
- ``examples`` and ``extras`` projects from `JUCE 7.0.3`_ (in `generated/JUCE-7.0.3`_)


Requirements
Expand Down Expand Up @@ -429,7 +429,7 @@ even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE
.. _generated/JUCE-5.4.7: generated/JUCE-5.4.7
.. _generated/JUCE-6.0.5: generated/JUCE-6.0.5
.. _generated/JUCE-6.1.6: generated/JUCE-6.1.6
.. _generated/JUCE-7.0.2: generated/JUCE-7.0.2
.. _generated/JUCE-7.0.3: generated/JUCE-7.0.3

.. _CMake Generators: https://cmake.org/cmake/help/latest/manual/cmake-generators.7.html
.. _CMake: https://cmake.org
Expand All @@ -443,7 +443,7 @@ even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE
.. _JUCE 5.4.7: https://github.com/juce-framework/JUCE/tree/5.4.7
.. _JUCE 6.0.5: https://github.com/juce-framework/JUCE/tree/6.0.5
.. _JUCE 6.1.6: https://github.com/juce-framework/JUCE/tree/6.1.6
.. _JUCE 7.0.2: https://github.com/juce-framework/JUCE/tree/7.0.2
.. _JUCE 7.0.3: https://github.com/juce-framework/JUCE/tree/7.0.3
.. _JUCE: https://github.com/juce-framework/JUCE
.. _Projucer: https://juce.com/discover/projucer
.. _all-contributors: https://github.com/all-contributors/all-contributors
44 changes: 14 additions & 30 deletions cmake/Reprojucer.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -6415,8 +6415,16 @@ endfunction()

function(_FRUT_set_cxx_language_standard_properties target)

if(DEFINED JUCER_CXX_LANGUAGE_STANDARD)
set(cxx_language_standard "${JUCER_CXX_LANGUAGE_STANDARD}")
if(NOT (DEFINED JUCER_VERSION AND JUCER_VERSION VERSION_LESS 5.1.0))
if(DEFINED JUCER_CXX_LANGUAGE_STANDARD)
set(cxx_language_standard "${JUCER_CXX_LANGUAGE_STANDARD}")
elseif(DEFINED JUCER_VERSION AND JUCER_VERSION VERSION_LESS 5.2.1)
set(cxx_language_standard "11")
elseif(DEFINED JUCER_VERSION AND JUCER_VERSION VERSION_LESS 7.0.3)
set(cxx_language_standard "14")
else()
set(cxx_language_standard "17")
endif()

if(CMAKE_GENERATOR STREQUAL "Xcode")
if(cxx_language_standard STREQUAL "latest")
Expand Down Expand Up @@ -6469,13 +6477,7 @@ function(_FRUT_set_cxx_language_standard_properties target)
if(APPLE)
if(CMAKE_GENERATOR STREQUAL "Xcode")
foreach(config IN LISTS JUCER_PROJECT_CONFIGURATIONS)
if(DEFINED JUCER_VERSION AND JUCER_VERSION VERSION_LESS 5.1.0)
set(cxx_language_standard "c++0x")
elseif(DEFINED JUCER_VERSION AND JUCER_VERSION VERSION_LESS 5.2.1)
set(cxx_language_standard "c++11")
else()
set(cxx_language_standard "c++14")
endif()
set(cxx_language_standard "c++0x")
if(DEFINED JUCER_CXX_LANGUAGE_STANDARD_${config})
string(TOLOWER cxx_language_standard
"${JUCER_CXX_LANGUAGE_STANDARD_${config}}"
Expand All @@ -6488,11 +6490,7 @@ function(_FRUT_set_cxx_language_standard_properties target)
endforeach()
else()
set_target_properties(${target} PROPERTIES CXX_EXTENSIONS OFF)
if(DEFINED JUCER_VERSION AND JUCER_VERSION VERSION_LESS 5.2.1)
set_target_properties(${target} PROPERTIES CXX_STANDARD 11)
else()
set_target_properties(${target} PROPERTIES CXX_STANDARD 14)
endif()
set_target_properties(${target} PROPERTIES CXX_STANDARD 11)

set(cxx_language_standard "${JUCER_CXX_LANGUAGE_STANDARD_${CMAKE_BUILD_TYPE}}")
if(cxx_language_standard)
Expand All @@ -6501,8 +6499,6 @@ function(_FRUT_set_cxx_language_standard_properties target)
endif()
if(cxx_language_standard MATCHES "98$")
set_target_properties(${target} PROPERTIES CXX_STANDARD 98)
elseif(cxx_language_standard MATCHES "11$")
set_target_properties(${target} PROPERTIES CXX_STANDARD 11)
elseif(cxx_language_standard MATCHES "14$")
set_target_properties(${target} PROPERTIES CXX_STANDARD 14)
endif()
Expand All @@ -6515,36 +6511,24 @@ function(_FRUT_set_cxx_language_standard_properties target)
target_compile_options(${target} PRIVATE "-std:c++14")
elseif(JUCER_CXX_STANDARD_TO_USE STREQUAL "latest")
target_compile_options(${target} PRIVATE "-std:c++latest")
elseif(NOT (DEFINED JUCER_VERSION AND JUCER_VERSION VERSION_LESS 5.2.1))
target_compile_options(${target} PRIVATE "-std:c++14")
endif()
endif()

elseif(CMAKE_HOST_SYSTEM_NAME STREQUAL "Linux")
set_target_properties(${target} PROPERTIES CXX_EXTENSIONS OFF)
if(DEFINED JUCER_VERSION AND JUCER_VERSION VERSION_LESS 5.2.1)
set_target_properties(${target} PROPERTIES CXX_STANDARD 11)
else()
set_target_properties(${target} PROPERTIES CXX_STANDARD 14)
endif()
set_target_properties(${target} PROPERTIES CXX_STANDARD 11)

if(DEFINED JUCER_CXX_STANDARD_TO_USE)
if(JUCER_CXX_STANDARD_TO_USE MATCHES "03$")
set_target_properties(${target} PROPERTIES CXX_STANDARD 98)
elseif(JUCER_CXX_STANDARD_TO_USE MATCHES "11$")
set_target_properties(${target} PROPERTIES CXX_STANDARD 11)
elseif(JUCER_CXX_STANDARD_TO_USE MATCHES "14$")
set_target_properties(${target} PROPERTIES CXX_STANDARD 14)
endif()
endif()

elseif(WIN32 AND NOT MSVC)
set_target_properties(${target} PROPERTIES CXX_EXTENSIONS OFF)
if(DEFINED JUCER_VERSION AND JUCER_VERSION VERSION_LESS 5.2.1)
set_target_properties(${target} PROPERTIES CXX_STANDARD 11)
else()
set_target_properties(${target} PROPERTIES CXX_STANDARD 14)
endif()
set_target_properties(${target} PROPERTIES CXX_STANDARD 11)

endif()
endif()
Expand Down
9 changes: 2 additions & 7 deletions cmake/tools/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (C) 2020-2021 Alain Martin
# Copyright (C) 2020-2022 Alain Martin
#
# This file is part of FRUT.
#
Expand Down Expand Up @@ -60,12 +60,7 @@ endif()


set(CMAKE_CXX_EXTENSIONS OFF)
if(DEFINED CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION
AND NOT CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION VERSION_LESS 10.0.20348.0)
set(CMAKE_CXX_STANDARD 17)
else()
set(CMAKE_CXX_STANDARD 14)
endif()
set(CMAKE_CXX_STANDARD 17)


if(built_by_Reprojucer)
Expand Down
7 changes: 5 additions & 2 deletions cmake/tools/juce_core.cmake
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (C) 2017-2020 Alain Martin
# Copyright (C) 2017-2020, 2022 Alain Martin
#
# This file is part of FRUT.
#
Expand Down Expand Up @@ -37,7 +37,10 @@ target_compile_definitions(tools_juce_core PUBLIC
)

if(APPLE)
target_compile_options(tools_juce_core PRIVATE -Wno-deprecated-declarations)
target_compile_options(tools_juce_core PRIVATE
-Wno-deprecated-declarations
-Wno-register
)

find_library(Cocoa_framework "Cocoa")
find_library(IOKit_framework "IOKit")
Expand Down
5 changes: 4 additions & 1 deletion cmake/tools/juce_gui_basics.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,10 @@ target_compile_definitions(tools_juce_gui_basics PUBLIC
)

if(APPLE)
target_compile_options(tools_juce_gui_basics PRIVATE -Wno-deprecated-declarations)
target_compile_options(tools_juce_gui_basics PRIVATE
-Wno-deprecated-declarations
-Wno-register
)

find_library(Cocoa_framework "Cocoa")
find_library(IOKit_framework "IOKit")
Expand Down
6 changes: 3 additions & 3 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ FRUT currently contains:
- ``examples`` and ``extras`` projects from `JUCE 5.4.7`_ (in `generated/JUCE-5.4.7`_)
- ``examples`` and ``extras`` projects from `JUCE 6.0.5`_ (in `generated/JUCE-6.0.5`_)
- ``examples`` and ``extras`` projects from `JUCE 6.1.6`_ (in `generated/JUCE-6.1.6`_)
- ``examples`` and ``extras`` projects from `JUCE 7.0.2`_ (in `generated/JUCE-7.0.2`_)
- ``examples`` and ``extras`` projects from `JUCE 7.0.3`_ (in `generated/JUCE-7.0.3`_)


User documentation
Expand All @@ -70,7 +70,7 @@ User documentation
.. _JUCE 5.4.7: https://github.com/juce-framework/JUCE/tree/5.4.7
.. _JUCE 6.0.5: https://github.com/juce-framework/JUCE/tree/6.0.5
.. _JUCE 6.1.6: https://github.com/juce-framework/JUCE/tree/6.1.6
.. _JUCE 7.0.2: https://github.com/juce-framework/JUCE/tree/7.0.2
.. _JUCE 7.0.3: https://github.com/juce-framework/JUCE/tree/7.0.3
.. _JUCE: https://github.com/juce-framework/JUCE
.. _Projucer: https://juce.com/discover/projucer
.. _generated/JUCE-4.2.0: https://github.com/McMartin/FRUT/tree/main/generated/JUCE-4.2.0
Expand All @@ -82,4 +82,4 @@ User documentation
.. _generated/JUCE-5.4.7: https://github.com/McMartin/FRUT/tree/main/generated/JUCE-5.4.7
.. _generated/JUCE-6.0.5: https://github.com/McMartin/FRUT/tree/main/generated/JUCE-6.0.5
.. _generated/JUCE-6.1.6: https://github.com/McMartin/FRUT/tree/main/generated/JUCE-6.1.6
.. _generated/JUCE-7.0.2: https://github.com/McMartin/FRUT/tree/main/generated/JUCE-7.0.2
.. _generated/JUCE-7.0.3: https://github.com/McMartin/FRUT/tree/main/generated/JUCE-7.0.3
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,14 @@ get_filename_component(DemoRunner_jucer_FILE

jucer_project_begin(
JUCER_FORMAT_VERSION "1"
JUCER_VERSION "7.0.2"
JUCER_VERSION "7.0.3"
PROJECT_FILE "${DemoRunner_jucer_FILE}"
PROJECT_ID "yj7xMM"
)

jucer_project_settings(
PROJECT_NAME "DemoRunner"
PROJECT_VERSION "7.0.2"
PROJECT_VERSION "7.0.3"
COMPANY_NAME "Raw Material Software Limited"
COMPANY_COPYRIGHT "Copyright (c) 2020 - Raw Material Software Limited"
COMPANY_WEBSITE "https://www.juce.com/"
Expand All @@ -38,7 +38,7 @@ jucer_project_settings(
DISPLAY_THE_JUCE_SPLASH_SCREEN ON # Required for closed source applications without an Indie or Pro JUCE license
PROJECT_TYPE "GUI Application"
BUNDLE_IDENTIFIER "com.rmsl.jucedemorunner"
CXX_LANGUAGE_STANDARD "C++14"
CXX_LANGUAGE_STANDARD "C++17"
PREPROCESSOR_DEFINITIONS
"JUCE_DEMO_RUNNER=1"
"JUCE_UNIT_TESTS=1"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ get_filename_component(AudioPerformanceTest_jucer_FILE

jucer_project_begin(
JUCER_FORMAT_VERSION "1"
JUCER_VERSION "7.0.2"
JUCER_VERSION "7.0.3"
PROJECT_FILE "${AudioPerformanceTest_jucer_FILE}"
PROJECT_ID "AKfc5m"
)
Expand All @@ -36,7 +36,7 @@ jucer_project_settings(
DISPLAY_THE_JUCE_SPLASH_SCREEN OFF # Required for closed source applications without an Indie or Pro JUCE license
PROJECT_TYPE "GUI Application"
BUNDLE_IDENTIFIER "com.juce.AudioPerformanceTest"
CXX_LANGUAGE_STANDARD "C++14"
CXX_LANGUAGE_STANDARD "C++17"
)

jucer_project_files("AudioPerformanceTest/Source"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ get_filename_component(AudioPluginHost_jucer_FILE

jucer_project_begin(
JUCER_FORMAT_VERSION "1"
JUCER_VERSION "7.0.2"
JUCER_VERSION "7.0.3"
PROJECT_FILE "${AudioPluginHost_jucer_FILE}"
PROJECT_ID "NTe0XB0ij"
)
Expand All @@ -36,7 +36,7 @@ jucer_project_settings(
DISPLAY_THE_JUCE_SPLASH_SCREEN OFF # Required for closed source applications without an Indie or Pro JUCE license
PROJECT_TYPE "GUI Application"
BUNDLE_IDENTIFIER "com.juce.pluginhost"
CXX_LANGUAGE_STANDARD "C++14"
CXX_LANGUAGE_STANDARD "C++17"
)

jucer_project_files("AudioPluginHost/Source/Plugins"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ get_filename_component(BinaryBuilder_jucer_FILE

jucer_project_begin(
JUCER_FORMAT_VERSION "1"
JUCER_VERSION "7.0.2"
JUCER_VERSION "7.0.3"
PROJECT_FILE "${BinaryBuilder_jucer_FILE}"
PROJECT_ID "3t6YqETY1"
)
Expand All @@ -36,7 +36,7 @@ jucer_project_settings(
DISPLAY_THE_JUCE_SPLASH_SCREEN OFF # Required for closed source applications without an Indie or Pro JUCE license
PROJECT_TYPE "Console Application"
BUNDLE_IDENTIFIER "com.juce.binarybuilder"
CXX_LANGUAGE_STANDARD "C++14"
CXX_LANGUAGE_STANDARD "C++17"
)

jucer_project_files("BinaryBuilder/Source"
Expand Down
Loading

0 comments on commit 102b590

Please sign in to comment.