Merge pull request #210 from Pistonight/lib/migrade_sdk

lib: botw migrate to new nnsdk repo
This commit is contained in:
Léo Lam
2026-10-11 03:50:14 +01:00
committed by GitHub
11 changed files with 33 additions and 12 deletions
+8
View File
@@ -14,6 +14,14 @@
path = lib/NintendoSDK
url = https://github.com/open-ead/nnheaders
branch = master
[submodule "lib/nnsdk"]
path = lib/nnsdk
url = https://github.com/open-ead/nnsdk
branch = main
[submodule "lib/nnware"]
path = lib/nnware
url = https://github.com/open-ead/nnware
branch = main
[submodule "lib/agl"]
path = lib/agl
url = https://github.com/open-ead/agl
+6 -3
View File
@@ -1,6 +1,8 @@
cmake_minimum_required(VERSION 3.15)
cmake_minimum_required(VERSION 3.30)
project(uking CXX)
set(SEAD_USE_OLD_NNHEADERS_REPO OFF CACHE BOOL "Enable new nnsdk repo")
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
# Use response files when linking objects because of the large number of source files
set(CMAKE_CXX_USE_RESPONSE_FILE_FOR_OBJECTS ON)
@@ -33,8 +35,9 @@ target_compile_options(uking PRIVATE -Wextra-semi)
set(NN_SDK 4.4.0)
set(NN_WARE 1.6.1)
set(NN_SDK_TYPE "Release")
add_subdirectory(lib/NintendoSDK)
target_link_libraries(uking PUBLIC NintendoSDK)
add_subdirectory(lib/nnsdk)
add_subdirectory(lib/nnware)
target_link_libraries(uking PUBLIC $<LINK_LIBRARY:whole_archive,nn_gfx>)
add_subdirectory(lib/sead)
target_link_libraries(uking PUBLIC sead)
+2
View File
@@ -37,3 +37,5 @@ if(NOT TARGET agl)
add_subdirectory(../agl)
endif()
target_link_libraries(gsys PUBLIC agl)
target_link_libraries(gsys PUBLIC nn_g3d)
+1 -1
View File
@@ -1,7 +1,7 @@
#pragma once
#include <gsys/gsysModelUnit.h>
#include <nn/g3d/ModelObj.h>
#include <nn/g3d/g3d_ModelObj.h>
#include <nn/gfx/gfx_MemoryPool.h>
#include <nn/gfx/gfx_Types.h>
#include <prim/seadDelegate.h>
+1 -1
View File
@@ -6,7 +6,7 @@
#include <math/seadBoundBox.h>
#include <math/seadMatrix.h>
#include <math/seadVector.h>
#include <nn/g3d/World.h>
#include <nn/g3d/g3d_World.h>
#include <prim/seadBitFlag.h>
#include <prim/seadDelegate.h>
#include <prim/seadRuntimeTypeInfo.h>
+1 -4
View File
@@ -240,7 +240,4 @@ target_compile_options(hkStubs PRIVATE -fno-strict-aliasing)
target_compile_options(hkStubs PRIVATE -Wno-invalid-offsetof)
target_include_directories(hkStubs PUBLIC ./)
if(NOT TARGET NintendoSDK)
add_subdirectory(../NintendoSDK)
endif()
target_link_libraries(hkStubs PUBLIC NintendoSDK)
target_link_libraries(hkStubs PUBLIC nnSdk)
Submodule
+1
Submodule lib/nnsdk added at 02dab8893e
Submodule
+1
Submodule lib/nnware added at 8a9e2d2496
@@ -6,8 +6,8 @@
#include <gsys/gsysModelNW.h>
#include <heap/seadExpHeap.h>
#include <heap/seadHeapMgr.h>
#include <nn/g3d/ResSkeleton.h>
#include <nn/g3d/SkeletonObj.h>
#include <nn/g3d/g3d_ResSkeleton.h>
#include <nn/g3d/g3d_SkeletonObj.h>
#include <type_traits>
#include "KingSystem/Physics/physConversions.h"
#include "KingSystem/Utils/MathUtil.h"
+9
View File
@@ -48,3 +48,12 @@ else()
# Use lld for performance reasons (and because we don't want a dependency on GNU tools)
add_link_options(-fuse-ld=lld)
endif()
set(CMAKE_CXX_LINK_LIBRARY_USING_whole_archive
"LINKER:--whole-archive" "<LINK_ITEM>" "LINKER:--no-whole-archive")
set(CMAKE_CXX_LINK_LIBRARY_USING_whole_archive_SUPPORTED TRUE)
# Allow mixing with links of the same library without a feature (requires CMake 3.30)
# This is important because some dependencies in the middle can link a library
# without whole_archive, for example your_project -links-> nn_g3d -links-> nn_gfx
set(CMAKE_LINK_LIBRARY_whole_archive_ATTRIBUTES
LIBRARY_TYPE=STATIC DEDUPLICATION=YES OVERRIDE=DEFAULT)