Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
project(eui CXX ASM)

# see https://github.com/open-ead/nnheaders/blob/master/MIGRATE.md#phase-2-compatibility-gate-of-open-ead-libraries-sead-and-nintendosdk-nex
option(EUI_USE_OLD_NNHEADERS_REPO "Migration setting for the nnsdk and nnware repo split" ON)

add_library(eui OBJECT
include/euiControlBase.h
include/message/euiFontMgr.h
Expand All @@ -21,3 +24,16 @@ if(NOT TARGET agl)
add_subdirectory(../agl)
endif()
target_link_libraries(eui PUBLIC agl sead)

if(EUI_USE_OLD_NNHEADERS_REPO)
# we are supposed to link old SDK here but eui never did,
# it just depended on other projects to provide the sdk headers
target_compile_definitions(eui PUBLIC EUI_USE_OLD_NNHEADERS_REPO)
else()
message(STATUS "Using new nnware repo! Please see https://github.com/open-ead/nnheaders/blob/master/MIGRATE.md")
message(STATUS "If you do not wish to migrate at this time, put `set(EUI_USE_OLD_NNHEADERS_REPO OFF CACHE BOOL \"Disable nnsdk migration\") in your CMakeLists.txt, or pass -DSEAD_USE_OLD_NNHEADERS_REPO=ON to cmake command")
if(NOT TARGET nn_font)
message(FATAL_ERROR "Cannot find NintendoWare. You need to add open-ead/nnware to your project, and put `add_subdirectory(path/to/nnware)` somewhere in your CMakeLists.txt")
endif()
target_link_libraries(eui PUBLIC nn_font)
endif()
Loading