From a200b7b4afd3158aec013689129408bd7200165c Mon Sep 17 00:00:00 2001 From: Paul Date: Sat, 28 Sep 2024 11:09:12 -0400 Subject: [PATCH] Dont public-ify clap-wrapper-compile-options (#314) clap-wrapper-shared-details had a PUBLIC of clap-wrapper-compile-options which leaked a Wall upstream, causing problems using JUCE 8.0.2 and clap first vst3s. So move the bits which are public to the -public target (macOS filesystem, windows utf8, etc...) and make the shared detail have a public/private split which matches the compile options. --- cmake/shared_prologue.cmake | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/cmake/shared_prologue.cmake b/cmake/shared_prologue.cmake index cf179106..a8c4de3b 100644 --- a/cmake/shared_prologue.cmake +++ b/cmake/shared_prologue.cmake @@ -42,9 +42,9 @@ target_link_libraries(clap-wrapper-compile-options INTERFACE clap-wrapper-compil # target_compile_definitions(clap-wrapper-compile-options-public INTERFACE -DTHIS_BUILD_USED_CLAP_WRAPPER_COMPILE_OPTIONS_PUBLIC=1) add_library(clap-wrapper-sanitizer-options INTERFACE) -target_compile_options(clap-wrapper-compile-options INTERFACE -D${CLAP_WRAPPER_PLATFORM}=1 -DCLAP_WRAPPER_VERSION="${CLAP_WRAPPER_VERSION}") +target_compile_options(clap-wrapper-compile-options-public INTERFACE -D${CLAP_WRAPPER_PLATFORM}=1 -DCLAP_WRAPPER_VERSION="${CLAP_WRAPPER_VERSION}") if (APPLE) - target_link_libraries(clap-wrapper-compile-options INTERFACE macos_filesystem_support) + target_link_libraries(clap-wrapper-compile-options-public INTERFACE macos_filesystem_support) endif() if(CMAKE_CXX_COMPILER_ID MATCHES "Clang|GNU") target_compile_options(clap-wrapper-compile-options INTERFACE -Wall -Wextra -Wno-unused-parameter -Wpedantic) @@ -85,7 +85,7 @@ if(CMAKE_CXX_COMPILER_ID MATCHES "Clang|GNU") endif() if(CMAKE_CXX_COMPILER_ID MATCHES "MSVC") - target_compile_options(clap-wrapper-compile-options INTERFACE /utf-8 /Zc:__cplusplus) + target_compile_options(clap-wrapper-compile-options-public INTERFACE /utf-8 /Zc:__cplusplus) if (${CMAKE_CXX_STANDARD} GREATER_EQUAL 20) message(STATUS "clap-wrapper: Turning off char8_t c++20 changes") target_compile_options(clap-wrapper-compile-options-public INTERFACE /Zc:char8_t-) @@ -149,7 +149,8 @@ function(guarantee_clap_wrapper_shared) src/detail/clap/fsutil.cpp src/detail/clap/automation.h ) - target_link_libraries(clap-wrapper-shared-detail PUBLIC clap clap-wrapper-extensions clap-wrapper-compile-options) + target_link_libraries(clap-wrapper-shared-detail PUBLIC clap clap-wrapper-extensions clap-wrapper-compile-options-public) + target_link_libraries(clap-wrapper-shared-detail PRIVATE clap-wrapper-compile-options) target_include_directories(clap-wrapper-shared-detail PUBLIC libs/fmt) target_include_directories(clap-wrapper-shared-detail PUBLIC src)