From d9dc94c9e2fe3be39c633f8b3b71c62519fbff25 Mon Sep 17 00:00:00 2001 From: Tyrone Trevorrow <819705+tyrone-sudeium@users.noreply.github.com> Date: Thu, 16 Nov 2023 18:17:32 +1100 Subject: [PATCH] MacOS: Fix link issue with cmake xcode generator --- CMakeLists.txt | 20 +++++++++---------- Makefile.am | 12 +++++------ src/main_data.cpp | 2 +- src/platform/macos/{utils.h => macos_utils.h} | 0 .../macos/{utils.mm => macos_utils.mm} | 2 +- src/platform/sdl/sdl2_ui.cpp | 4 ++-- src/platform/sdl/{audio.cpp => sdl_audio.cpp} | 2 +- src/platform/sdl/{audio.h => sdl_audio.h} | 0 src/platform/sdl/sdl_ui.cpp | 2 +- 9 files changed, 22 insertions(+), 22 deletions(-) rename src/platform/macos/{utils.h => macos_utils.h} (100%) rename src/platform/macos/{utils.mm => macos_utils.mm} (97%) rename src/platform/sdl/{audio.cpp => sdl_audio.cpp} (99%) rename src/platform/sdl/{audio.h => sdl_audio.h} (100%) diff --git a/CMakeLists.txt b/CMakeLists.txt index 688eb2d970e..ecc7e73e49a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -551,8 +551,8 @@ endif() if(${PLAYER_TARGET_PLATFORM} STREQUAL "SDL2") target_sources(${PROJECT_NAME} PRIVATE - src/platform/sdl/audio.cpp - src/platform/sdl/audio.h + src/platform/sdl/sdl_audio.cpp + src/platform/sdl/sdl_audio.h src/platform/sdl/sdl2_ui.cpp src/platform/sdl/sdl2_ui.h) target_compile_definitions(${PROJECT_NAME} PUBLIC USE_SDL=2) @@ -574,8 +574,8 @@ if(${PLAYER_TARGET_PLATFORM} STREQUAL "SDL2") endif() elseif(${PLAYER_TARGET_PLATFORM} STREQUAL "SDL1") target_sources(${PROJECT_NAME} PRIVATE - src/platform/sdl/audio.cpp - src/platform/sdl/audio.h + src/platform/sdl/sdl_audio.cpp + src/platform/sdl/sdl_audio.h src/platform/sdl/axis.h src/platform/sdl/sdl_ui.cpp src/platform/sdl/sdl_ui.h) @@ -668,8 +668,8 @@ elseif(${PLAYER_TARGET_PLATFORM} STREQUAL "wii") src/platform/wii/clock.cpp src/platform/wii/clock.h src/platform/wii/input_buttons.cpp - src/platform/sdl/audio.cpp - src/platform/sdl/audio.h + src/platform/sdl/sdl_audio.cpp + src/platform/sdl/sdl_audio.h src/platform/sdl/axis.h src/platform/sdl/sdl_ui.cpp src/platform/sdl/sdl_ui.h) @@ -681,8 +681,8 @@ elseif(${PLAYER_TARGET_PLATFORM} STREQUAL "amigaos4") target_compile_definitions(${PROJECT_NAME} PUBLIC USE_SDL=1) target_include_directories(${PROJECT_NAME} PUBLIC ${SDL_INCLUDE_DIR}) target_sources(${PROJECT_NAME} PRIVATE - src/platform/sdl/audio.cpp - src/platform/sdl/audio.h + src/platform/sdl/sdl_audio.cpp + src/platform/sdl/sdl_audio.h src/platform/sdl/axis.h src/platform/sdl/sdl_ui.cpp src/platform/sdl/sdl_ui.h) @@ -753,8 +753,8 @@ endif() if(APPLE) target_sources(${PROJECT_NAME} PRIVATE - src/platform/macos/utils.mm - src/platform/macos/utils.h + src/platform/macos/macos_utils.mm + src/platform/macos/macos_utils.h src/platform/macos/midiout_device_coreaudio.cpp src/platform/macos/midiout_device_coreaudio.h) diff --git a/Makefile.am b/Makefile.am index 3c4246bd1b1..11554f283b3 100644 --- a/Makefile.am +++ b/Makefile.am @@ -443,8 +443,8 @@ libeasyrpg_player_a_SOURCES = \ SOURCEFILES_SDL2 = \ src/platform/sdl/sdl2_ui.cpp \ src/platform/sdl/sdl2_ui.h \ - src/platform/sdl/audio.cpp \ - src/platform/sdl/audio.h + src/platform/sdl/sdl_audio.cpp \ + src/platform/sdl/sdl_audio.h if HAVE_SDL2 libeasyrpg_player_a_SOURCES += $(SOURCEFILES_SDL2) else @@ -454,8 +454,8 @@ endif SOURCEFILES_SDL1 = \ src/platform/sdl/sdl_ui.cpp \ src/platform/sdl/sdl_ui.h \ - src/platform/sdl/audio.cpp \ - src/platform/sdl/audio.h \ + src/platform/sdl/sdl_audio.cpp \ + src/platform/sdl/sdl_audio.h \ src/platform/sdl/axis.h if HAVE_SDL1 libeasyrpg_player_a_SOURCES += $(SOURCEFILES_SDL1) @@ -493,8 +493,8 @@ EXTRA_DIST += $(SOURCEFILES_ALSA) endif SOURCEFILES_MACOS = \ - src/platform/macos/utils.h \ - src/platform/macos/utils.mm \ + src/platform/macos/macos_utils.h \ + src/platform/macos/macos_utils.mm \ src/platform/macos/midiout_device_coreaudio.cpp \ src/platform/macos/midiout_device_coreaudio.h if MACOS diff --git a/src/main_data.cpp b/src/main_data.cpp index 8a57dd79fff..86d4a8cc31c 100644 --- a/src/main_data.cpp +++ b/src/main_data.cpp @@ -49,7 +49,7 @@ # include #elif defined(__APPLE__) && TARGET_OS_OSX # include -# include "platform/macos/utils.h" +# include "platform/macos/macos_utils.h" #endif // Global variables. diff --git a/src/platform/macos/utils.h b/src/platform/macos/macos_utils.h similarity index 100% rename from src/platform/macos/utils.h rename to src/platform/macos/macos_utils.h diff --git a/src/platform/macos/utils.mm b/src/platform/macos/macos_utils.mm similarity index 97% rename from src/platform/macos/utils.mm rename to src/platform/macos/macos_utils.mm index 53ca53ea770..5f6745118f9 100644 --- a/src/platform/macos/utils.mm +++ b/src/platform/macos/macos_utils.mm @@ -22,7 +22,7 @@ #ifdef __APPLE__ #import #include -#include "platform/macos/utils.h" +#include "platform/macos/macos_utils.h" bool MacOSUtils::IsAppBundle() { bool is_bundle = false; diff --git a/src/platform/sdl/sdl2_ui.cpp b/src/platform/sdl/sdl2_ui.cpp index 97416c953ac..f51d3b0942b 100644 --- a/src/platform/sdl/sdl2_ui.cpp +++ b/src/platform/sdl/sdl2_ui.cpp @@ -42,10 +42,10 @@ #include "lcf/scope_guard.h" #ifdef SUPPORT_AUDIO -# include "audio.h" +# include "sdl_audio.h" # if defined(__APPLE__) && TARGET_OS_OSX -# include "platform/macos/utils.h" +# include "platform/macos/macos_utils.h" # endif diff --git a/src/platform/sdl/audio.cpp b/src/platform/sdl/sdl_audio.cpp similarity index 99% rename from src/platform/sdl/audio.cpp rename to src/platform/sdl/sdl_audio.cpp index ffab5f4a844..c5430278818 100644 --- a/src/platform/sdl/audio.cpp +++ b/src/platform/sdl/sdl_audio.cpp @@ -30,7 +30,7 @@ # include #endif -#include "audio.h" +#include "sdl_audio.h" #include "output.h" using namespace std::chrono_literals; diff --git a/src/platform/sdl/audio.h b/src/platform/sdl/sdl_audio.h similarity index 100% rename from src/platform/sdl/audio.h rename to src/platform/sdl/sdl_audio.h diff --git a/src/platform/sdl/sdl_ui.cpp b/src/platform/sdl/sdl_ui.cpp index 1019fa7ea9a..dc8cee1b423 100644 --- a/src/platform/sdl/sdl_ui.cpp +++ b/src/platform/sdl/sdl_ui.cpp @@ -33,7 +33,7 @@ #endif #ifdef SUPPORT_AUDIO -# include "audio.h" +# include "sdl_audio.h" AudioInterface& SdlUi::GetAudio() { return *audio_;