diff --git a/cmake/wrap_standalone.cmake b/cmake/wrap_standalone.cmake index 8074a131..a4ed15fc 100644 --- a/cmake/wrap_standalone.cmake +++ b/cmake/wrap_standalone.cmake @@ -107,6 +107,11 @@ function(target_add_standalone_wrapper) WIN32_TITLE="${SA_OUTPUT_NAME}" ) + elseif(WIN32 AND (CMAKE_CXX_COMPILER_ID MATCHES "GNU")) + target_sources(${SA_TARGET} PRIVATE + ${CLAP_WRAPPER_CMAKE_CURRENT_SOURCE_DIR}/src/detail/standalone/windows/standalone_functions.cpp + ) + elseif(UNIX) target_sources(${SA_TARGET} PRIVATE ${CLAP_WRAPPER_CMAKE_CURRENT_SOURCE_DIR}/src/wrapasstandalone.cpp) diff --git a/src/detail/standalone/windows/standalone_functions.cpp b/src/detail/standalone/windows/standalone_functions.cpp index 0298e4b9..fcad00ae 100644 --- a/src/detail/standalone/windows/standalone_functions.cpp +++ b/src/detail/standalone/windows/standalone_functions.cpp @@ -1,11 +1,13 @@ +#if CLAP_WRAPPER_HAS_WIN32 #include #include +#endif #include - #include "detail/standalone/standalone_host.h" namespace freeaudio::clap_wrapper::standalone { +#if CLAP_WRAPPER_HAS_WIN32 std::optional getStandaloneSettingsPath() { std::wstring path; @@ -23,4 +25,11 @@ std::optional getStandaloneSettingsPath() return std::nullopt; } +#else +std::optional getStandaloneSettingsPath() +{ + TRACE; + return std::nullopt; +} +#endif } // namespace freeaudio::clap_wrapper::standalone