Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/pionere/devilutionX into ps4
Browse files Browse the repository at this point in the history
  • Loading branch information
pionere committed Dec 6, 2023
2 parents efe98a0 + 98eafb2 commit f7dc4aa
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 21 deletions.
20 changes: 10 additions & 10 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -751,7 +751,7 @@ if(CMAKE_STRIP AND NOT DISABLE_STRIP)
COMMAND $<$<OR:$<CONFIG:Release>,$<CONFIG:MinSizeRel>>:${CMAKE_STRIP}>
ARGS $<TARGET_FILE:${BIN_TARGET}>)

if(TARGET ${DEVIL_PATCHER})
if(DEVIL_PATCHER)
add_custom_command(
TARGET ${DEVIL_PATCHER} POST_BUILD
DEPENDS ${DEVIL_PATCHER}
Expand All @@ -766,7 +766,7 @@ get_property(is_multi_config GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG)
if(is_multi_config)
set(CONFIG_PATH $<CONFIG>/config.h)
target_include_directories(${BIN_TARGET} PRIVATE ${CMAKE_BINARY_DIR}/$<CONFIG>)
if(TARGET ${DEVIL_PATCHER})
if(DEVIL_PATCHER)
target_include_directories(${DEVIL_PATCHER} PRIVATE ${CMAKE_BINARY_DIR}/$<CONFIG>)
endif()
else()
Expand Down Expand Up @@ -944,7 +944,7 @@ endforeach(def_name)

target_compile_definitions(${BIN_TARGET} PRIVATE ${def_list})
target_compile_definitions(smacker PRIVATE ${def_list})
if(TARGET ${DEVIL_PATCHER})
if(DEVIL_PATCHER)
target_compile_definitions(${DEVIL_PATCHER} PRIVATE ${def_list})
endif()

Expand Down Expand Up @@ -1040,7 +1040,7 @@ endif()

if(CMAKE_CXX_COMPILER_ID MATCHES "GNU" AND NOT GPERF AND NOT HAIKU AND NOT VITA)
target_link_libraries(${BIN_TARGET} PUBLIC "$<$<NOT:$<CONFIG:Debug>>:-static-libgcc;-static-libstdc++>")
if(TARGET ${DEVIL_PATCHER})
if(DEVIL_PATCHER)
target_link_libraries(${DEVIL_PATCHER} PUBLIC "$<$<NOT:$<CONFIG:Debug>>:-static-libgcc;-static-libstdc++>")
endif()
endif()
Expand Down Expand Up @@ -1069,12 +1069,12 @@ if(NOT CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
if((CMAKE_CXX_COMPILER_ID MATCHES "Clang" AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 12)
OR (CMAKE_CXX_COMPILER_ID MATCHES "GNU" AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 8))
target_compile_options(${BIN_TARGET} PUBLIC "-fmacro-prefix-map=${CMAKE_SOURCE_DIR}/=")
if(TARGET ${DEVIL_PATCHER})
if(DEVIL_PATCHER)
target_compile_options(${DEVIL_PATCHER} PUBLIC "-fmacro-prefix-map=${CMAKE_SOURCE_DIR}/=")
endif()
else()
get_target_property(devilutionx_SRCS ${BIN_TARGET} SOURCES)
if(TARGET ${DEVIL_PATCHER})
if(DEVIL_PATCHER)
get_target_property(devil_patcher_SRCS ${DEVIL_PATCHER} SOURCES)
list(APPEND devilutionx_SRCS ${devil_patcher_SRCS})
endif()
Expand Down Expand Up @@ -1147,7 +1147,7 @@ if(APPLE)

install (TARGETS ${BIN_TARGET} DESTINATION ./)

if(TARGET ${DEVIL_PATCHER})
if(DEVIL_PATCHER)
set_target_properties(${DEVIL_PATCHER} PROPERTIES MACOSX_BUNDLE_ICON_FILE "AppIcon.icns")
set_target_properties(${DEVIL_PATCHER} PROPERTIES MACOSX_BUNDLE_INFO_PLIST "${CMAKE_CURRENT_SOURCE_DIR}/Packaging/apple/Info.plist")

Expand All @@ -1159,7 +1159,7 @@ if(APPLE)
include(BundleUtilities)
fixup_bundle(\"${CMAKE_BINARY_DIR}/${BIN_TARGET}.app\" \"\" \"\")
")
if(TARGET ${DEVIL_PATCHER})
if(DEVIL_PATCHER)
set(BUNDLE_FIXUP_CODE "${BUNDLE_FIXUP_CODE}fixup_bundle(\"${CMAKE_BINARY_DIR}/${DEVIL_PATCHER}.app\" \"\" \"\")
")
endif()
Expand Down Expand Up @@ -1361,7 +1361,7 @@ if(CPACK)
install(FILES "${PROJECT_SOURCE_DIR}/Packaging/resources/devilx.mpq"
DESTINATION "."
)
if(TARGET ${DEVIL_PATCHER})
if(DEVIL_PATCHER)
install(TARGETS ${DEVIL_PATCHER} DESTINATION .)

install(FILES "${PROJECT_SOURCE_DIR}/Packaging/resources/listfiles.txt"
Expand Down Expand Up @@ -1462,7 +1462,7 @@ if(CPACK)
install(FILES "${PROJECT_SOURCE_DIR}/Packaging/resources/devilx.mpq"
DESTINATION "share/diasurgical/${project_name}"
)
if(TARGET ${DEVIL_PATCHER})
if(DEVIL_PATCHER)
install(TARGETS ${DEVIL_PATCHER} DESTINATION bin)

install(FILES "${PROJECT_SOURCE_DIR}/Packaging/resources/listfiles.txt"
Expand Down
2 changes: 1 addition & 1 deletion Packaging/OpenDingux/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ cmake_configure() {
"-DTARGET_PLATFORM=$TARGET" \
-DCMAKE_VERBOSE_MAKEFILE=ON \
-DCMAKE_TOOLCHAIN_FILE="${TOOLCHAIN}/usr/share/buildroot/toolchainfile.cmake" \
"${CMAKE_ARGS}" \
${CMAKE_ARGS} \
"$@"
}

Expand Down
4 changes: 0 additions & 4 deletions Source/all.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,8 @@

#include <SDL.h>

#ifdef USE_SDL1
#include "utils/sdl2_to_1_2_backports.h"
#else
#include "utils/sdl2_backports.h"
#endif

#include "utils/sdl_compat.h"
#include "utils/log.h"

Expand Down
3 changes: 2 additions & 1 deletion Source/utils/sdl2_backports.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#pragma once
// Backports for older versions of SDL 2.

#ifndef USE_SDL1
#include <SDL.h>

#if !SDL_VERSION_ATLEAST(2, 0, 4)
Expand Down Expand Up @@ -45,3 +45,4 @@ SDL_CreateRGBSurfaceWithFormatFrom(void* pixels,
return surface;
}
#endif
#endif // !USE_SDL1
4 changes: 0 additions & 4 deletions tools/patcher/all.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,8 @@

#include <SDL.h>

#ifdef USE_SDL1
#include "utils/sdl2_to_1_2_backports.h"
#else
#include "utils/sdl2_backports.h"
#endif

#include "utils/sdl_compat.h"
#include "utils/log.h"

Expand Down
3 changes: 2 additions & 1 deletion tools/patcher/utils/sdl2_backports.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#pragma once
// Backports for older versions of SDL 2.

#ifndef USE_SDL1
#include <SDL.h>

#if !SDL_VERSION_ATLEAST(2, 0, 4)
Expand Down Expand Up @@ -45,3 +45,4 @@ SDL_CreateRGBSurfaceWithFormatFrom(void* pixels,
return surface;
}
#endif
#endif // !USE_SDL1

0 comments on commit f7dc4aa

Please sign in to comment.