| 1 |
Fromscip-debian debian augustus-game 4.0.0+dfsg-1 augustus-game/patches/`0002-fix-arch-all-build.patch`#From.: =?utf-8?q?Sandro_Knau=C3=9F?= <[email protected]scip-debian . . . identity/`[email protected]`.> |
| 2 |
Datescip-debian debian augustus-game 4.0.0+dfsg-1 augustus-game/patches/`0002-fix-arch-all-build.patch`#Date.: Fri, 8 Aug 2025 08:21:35 +0200 |
| 3 |
Subjectscip-debian debian augustus-game 4.0.0+dfsg-1 augustus-game/patches/`0002-fix-arch-all-build.patch`#Subject.: fix arch-all build. |
| 4 |
|
| 5 |
--- |
| 6 |
CMakeLists.txt | 19 ++++++++++++------- |
| 7 |
1 file changed, 12 insertions(+), 7 deletions(-) |
| 8 |
|
| 9 |
diff --git a/CMakeLists.txtscip-debian debian augustus-game 4.0.0+dfsg-1 augustus-game/upstream/`CMakeLists.txt`: b/CMakeLists.txtscip-debian debian augustus-game 4.0.0+dfsg-1 augustus-game/upstream/`CMakeLists.txt`: |
| 10 |
index 4bef528..411b9df 100644 |
| 11 |
--- a/CMakeLists.txt |
| 12 |
+++ b/CMakeLists.txt |
| 13 |
@@ -12,6 +12,7 @@ option(DRAW_HIGHWAY_TERRAIN "Draw highway debug information." OFF) |
| 14 |
option(DRAW_ROAD_NETWORK_IDS "Draw road network IDs for debugging." OFF) |
| 15 |
option(DRAW_TILE_COORDS "Draw tile coordinates." OFF) |
| 16 |
option(SYSTEM_LIBS "Use system libraries when available." ON) |
| 17 |
+option(ARCH_ALL_ONLY "Arch all only build" OFF) |
| 18 |
|
| 19 |
if(${TARGET_PLATFORM} STREQUAL "vita" AND NOT DEFINED CMAKE_TOOLCHAIN_FILE) |
| 20 |
if(DEFINED ENV{VITASDK}) |
| 21 |
@@ -780,14 +781,15 @@ elseif(${TARGET_PLATFORM} STREQUAL "android") |
| 22 |
set(SDL2_LIBRARY SDL2::SDL2) |
| 23 |
set(SDL2_MIXER_LIBRARY SDL2::SDL2_mixer) |
| 24 |
else() |
| 25 |
|
| 26 |
|
| 27 |
+ find_package(SDL2) |
| 28 |
+ find_package(SDL2_mixer) |
| 29 |
endif() |
| 30 |
|
| 31 |
+ |
| 32 |
if(${TARGET_PLATFORM} STREQUAL "android") |
| 33 |
add_library(${SHORT_NAME} SHARED ${SOURCE_FILES}) |
| 34 |
|
| 35 |
|
| 36 |
+ elseif(NOT ARCH_ALL_ONLY) |
| 37 |
+ add_executable(${SHORT_NAME} WIN32 ${SOURCE_FILES}) |
| 38 |
endif() |
| 39 |
|
| 40 |
if(${TARGET_PLATFORM} STREQUAL "emscripten") |
| 41 |
@@ -895,10 +897,11 @@ if(SYSTEM_LIBS) |
| 42 |
find_package(EXPAT) |
| 43 |
endif() |
| 44 |
|
| 45 |
+ |
| 46 |
if(ZLIB_FOUND) |
| 47 |
include_directories(${ZLIB_INCLUDE_DIRS}) |
| 48 |
target_link_libraries(${SHORT_NAME} ${ZLIB_LIBRARIES}) |
| 49 |
|
| 50 |
+elseif(NOT ARCH_ALL_ONLY) |
| 51 |
include_directories("ext/zlib") |
| 52 |
target_sources(${SHORT_NAME} PRIVATE "${ZLIB_FILES}") |
| 53 |
endif() |
| 54 |
@@ -906,7 +909,7 @@ endif() |
| 55 |
if(PNG_FOUND) |
| 56 |
include_directories(SYSTEM ${PNG_INCLUDE_DIRS}) |
| 57 |
target_link_libraries(${SHORT_NAME} ${PNG_LIBRARIES}) |
| 58 |
|
| 59 |
+elseif(NOT ARCH_ALL_ONLY) |
| 60 |
if(SYSTEM_LIBS) |
| 61 |
message(STATUS "PNG was not found but that's ok: falling back to internal version") |
| 62 |
endif() |
| 63 |
@@ -917,7 +920,7 @@ endif() |
| 64 |
if(EXPAT_FOUND) |
| 65 |
include_directories(${EXPAT_INCLUDE_DIRS}) |
| 66 |
target_link_libraries(${SHORT_NAME} ${EXPAT_LIBRARIES}) |
| 67 |
|
| 68 |
+elseif(NOT ARCH_ALL_ONLY) |
| 69 |
include_directories("ext/expat") |
| 70 |
target_sources(${SHORT_NAME} PRIVATE "${EXPAT_FILES}") |
| 71 |
if(NOT WIN32) |
| 72 |
@@ -1003,6 +1006,7 @@ nx_create_nro (${PROJECT_NAME} |
| 73 |
) |
| 74 |
|
| 75 |
else() |
| 76 |
+ if (NOT ARCH_ALL_ONLY) |
| 77 |
if (UNIX AND NOT APPLE AND (CMAKE_COMPILER_IS_GNUCC OR CMAKE_C_COMPILER_ID STREQUAL "Clang")) |
| 78 |
target_link_libraries(${SHORT_NAME} m) |
| 79 |
endif() |
| 80 |
@@ -1016,6 +1020,7 @@ else() |
| 81 |
if(NOT APPLE AND NOT ${TARGET_PLATFORM} STREQUAL "android") |
| 82 |
install(TARGETS ${SHORT_NAME} RUNTIME DESTINATION bin) |
| 83 |
endif() |
| 84 |
+ endif() |
| 85 |
|
| 86 |
if(WIN32) |
| 87 |
target_link_libraries(${SHORT_NAME} dbghelp shlwapi) |