Skip to content

Commit

Permalink
Return std::nullopt for settings path on GCC
Browse files Browse the repository at this point in the history
  • Loading branch information
mthierman committed Oct 28, 2023
1 parent dac560d commit 932beb5
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
5 changes: 5 additions & 0 deletions cmake/wrap_standalone.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
11 changes: 10 additions & 1 deletion src/detail/standalone/windows/standalone_functions.cpp
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
#if CLAP_WRAPPER_HAS_WIN32
#include <Windows.h>
#include <ShlObj.h>
#endif
#include <string>

#include "detail/standalone/standalone_host.h"

namespace freeaudio::clap_wrapper::standalone
{
#if CLAP_WRAPPER_HAS_WIN32
std::optional<fs::path> getStandaloneSettingsPath()
{
std::wstring path;
Expand All @@ -23,4 +25,11 @@ std::optional<fs::path> getStandaloneSettingsPath()

return std::nullopt;
}
#else
std::optional<fs::path> getStandaloneSettingsPath()
{
TRACE;
return std::nullopt;
}
#endif
} // namespace freeaudio::clap_wrapper::standalone

0 comments on commit 932beb5

Please sign in to comment.