Skip to content

Commit

Permalink
Quick and dirty fix for psp-fixup-imports warning - Forcing PSP-SDK l…
Browse files Browse the repository at this point in the history
…ibs to be linked last via extra interface target
  • Loading branch information
dbeef committed Apr 28, 2024
1 parent ba83aa3 commit 6c23b40
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 26 deletions.
54 changes: 31 additions & 23 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -38,30 +38,21 @@ add_subdirectory(src/texture-bank)
add_subdirectory(src/collisions)
add_subdirectory(src/patterns)

target_link_libraries(Spelunky_PSP PRIVATE
Logger
Video
Audio
Level
RenderingTypes
Input
GameLoop
TextureBank
Dependencies
)
add_library(PSP_SDK INTERFACE)
target_link_libraries(PSP_SDK INTERFACE
-lSDL_mixer
-lSDLmain
-lSDL

target_link_libraries(Spelunky_PSP PRIVATE
-L${PSPDEV}/psp/sdk/lib
-L${PSPDEV}/psp
-lGL
-lmodplug
-lvorbisenc
-lvorbisfile
-lvorbis
-logg

-L${PSPDEV}/psp/sdk/lib
-lpspirkeyb
-lpsppower_driver
-lpsppower
-lpspdebug
-lpspgu
-lpspvram
Expand All @@ -71,6 +62,23 @@ target_link_libraries(Spelunky_PSP PRIVATE
-lpspdisplay
-lpsphprm
-lpspaudio
-lpsppower_driver
-lpsppower
)

target_link_libraries(Spelunky_PSP PRIVATE
-L${PSPDEV}/psp

Logger
Video
Audio
Level
RenderingTypes
Input
GameLoop
TextureBank
Dependencies
PSP_SDK
)

set_target_properties(Spelunky_PSP
Expand All @@ -85,17 +93,17 @@ if (SPELUNKY_PSP_PLATFORM_LINUX OR
SPELUNKY_PSP_PLATFORM_DARWIN OR
SPELUNKY_PSP_PLATFORM_PSP OR
SPELUNKY_PSP_PLATFORM_ANDROID)
set_target_properties(Spelunky_PSP
PROPERTIES
COMPILE_FLAGS
# set_target_properties(Spelunky_PSP
# PROPERTIES
# COMPILE_FLAGS
# Disable generation of information about every class with virtual functions for use by
# the C++ runtime type identification features (dynamic_cast and typeid).
-fno-rtti
# -fno-rtti
# Debugging information level. 0 is lowest.
-G0
# -G0
# Optimize
-O2
)
# -O2
# )
endif()

install(TARGETS Spelunky_PSP
Expand Down
3 changes: 0 additions & 3 deletions cmake/DependenciesPSP.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@
macro(add_psp_dependencies)
add_library(SDL_1_XX INTERFACE)
target_link_libraries(SDL_1_XX INTERFACE
-lSDL_mixer
-lSDLmain
-lSDL
)

add_library(Dependencies INTERFACE)
Expand Down

0 comments on commit 6c23b40

Please sign in to comment.