Skip to content

Commit

Permalink
CPP 20 flags
Browse files Browse the repository at this point in the history
Sigh. CPP20 has .u8string and .string not compatible. Apply the
flag in a few places we were missing to fix this with the
appropriate generator expression
  • Loading branch information
baconpaul committed Aug 19, 2024
1 parent 4b1972d commit 23baadb
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
1 change: 1 addition & 0 deletions cmake/wrap_auv2.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ function(target_add_auv2_wrapper)
set(bhtg ${AUV2_TARGET}-build-helper)
set(bhsc "${CLAP_WRAPPER_CMAKE_CURRENT_SOURCE_DIR}/src/detail/auv2/build-helper/")
add_executable(${bhtg} ${bhsc}/build-helper.cpp)
target_compile_options(${bhtg} PRIVATE $<$<VERSION_GREATER_EQUAL:${CMAKE_CXX_STANDARD},20>:-fno-char8_t>)
target_link_libraries(${bhtg} PRIVATE
clap-wrapper-shared-detail
macos_filesystem_support
Expand Down
8 changes: 6 additions & 2 deletions cmake/wrap_standalone.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,16 @@ function(target_add_standalone_wrapper)
)
target_link_libraries(${salib}
PUBLIC
clap-wrapper-compile-options
clap-wrapper-shared-detail
base-sdk-rtmidi
base-sdk-rtaudio
)
target_link_libraries(${salib} PRIVATE clap-wrapper-compile-options)
if (MSVC)
target_compile_options(${salib} PRIVATE $<$<VERSION_GREATER_EQUAL:${CMAKE_CXX_STANDARD},20>:/Zc:char8_t->)
else()
target_compile_options(${salib} PRIVATE $<$<VERSION_GREATER_EQUAL:${CMAKE_CXX_STANDARD},20>:-fno-char8_t>)
endif()

if (APPLE)
target_sources(${salib} PRIVATE)
Expand Down Expand Up @@ -185,7 +190,6 @@ function(target_add_standalone_wrapper)
)

target_link_libraries(${SA_TARGET} PRIVATE
clap-wrapper-compile-options
${salib}
)
endfunction(target_add_standalone_wrapper)
6 changes: 6 additions & 0 deletions cmake/wrap_vst3.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,12 @@ function(private_add_vst3_wrapper_sources)
${sd}/src/detail/vst3/aravst3.h
)

if (MSVC)
target_compile_options(${tg} PRIVATE $<$<VERSION_GREATER_EQUAL:${CMAKE_CXX_STANDARD},20>:/Zc:char8_t->)
else()
target_compile_options(${tg} PRIVATE $<$<VERSION_GREATER_EQUAL:${CMAKE_CXX_STANDARD},20>:-fno-char8_t>)
endif()

target_include_directories(${V3_TARGET}-clap-wrapper-vst3-lib PRIVATE "${sd}/include")
endfunction(private_add_vst3_wrapper_sources)

Expand Down

0 comments on commit 23baadb

Please sign in to comment.