Skip to content

Commit

Permalink
MacOS: Fix link issue with cmake xcode generator
Browse files Browse the repository at this point in the history
  • Loading branch information
tyrone-sudeium committed Nov 16, 2023
1 parent 74132d7 commit d9dc94c
Show file tree
Hide file tree
Showing 9 changed files with 22 additions and 22 deletions.
20 changes: 10 additions & 10 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)
Expand Down Expand Up @@ -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)
Expand All @@ -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)
Expand Down Expand Up @@ -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)

Expand Down
12 changes: 6 additions & 6 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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)
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/main_data.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
# include <SDL_system.h>
#elif defined(__APPLE__) && TARGET_OS_OSX
# include <sys/syslimits.h>
# include "platform/macos/utils.h"
# include "platform/macos/macos_utils.h"
#endif

// Global variables.
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
#ifdef __APPLE__
#import <Foundation/Foundation.h>
#include <string>
#include "platform/macos/utils.h"
#include "platform/macos/macos_utils.h"

bool MacOSUtils::IsAppBundle() {
bool is_bundle = false;
Expand Down
4 changes: 2 additions & 2 deletions src/platform/sdl/sdl2_ui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
# include <emscripten.h>
#endif

#include "audio.h"
#include "sdl_audio.h"
#include "output.h"

using namespace std::chrono_literals;
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion src/platform/sdl/sdl_ui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
#endif

#ifdef SUPPORT_AUDIO
# include "audio.h"
# include "sdl_audio.h"

AudioInterface& SdlUi::GetAudio() {
return *audio_;
Expand Down

0 comments on commit d9dc94c

Please sign in to comment.