Namespaced name for imported libultra target

This commit is contained in:
Matt Penny 2024-10-19 21:33:42 -04:00
parent e61142b902
commit 80a896d508
2 changed files with 6 additions and 6 deletions

View File

@ -19,12 +19,12 @@ find_package_handle_standard_args(Libultra
Libultra_LIBRARY
)
if(Libultra_FOUND AND NOT TARGET libultra)
add_library(libultra STATIC IMPORTED)
set_target_properties(libultra PROPERTIES
if(Libultra_FOUND AND NOT TARGET libultra::libultra)
add_library(libultra::libultra STATIC IMPORTED)
set_target_properties(libultra::libultra PROPERTIES
IMPORTED_LOCATION ${Libultra_LIBRARY}
)
target_include_directories(libultra INTERFACE
target_include_directories(libultra::libultra INTERFACE
"${Libultra_INCLUDE_DIR}"
"${Libultra_INCLUDE_DIR}/PR"
)

View File

@ -204,10 +204,10 @@ if (USING_LIBULTRA)
target_compile_definitions(portal PRIVATE F3DEX_GBI_2)
find_package(Libultra REQUIRED)
target_link_libraries(portal libultra)
target_link_libraries(portal libultra::libultra)
# Need explicit call for proper ordering
target_include_directories(portal BEFORE
PRIVATE $<TARGET_PROPERTY:libultra,INTERFACE_INCLUDE_DIRECTORIES>
PRIVATE $<TARGET_PROPERTY:libultra::libultra,INTERFACE_INCLUDE_DIRECTORIES>
)
endif()