diff --git a/cmake/FindLibultra.cmake b/cmake/FindLibultra.cmake index 24715ea..3ce174b 100644 --- a/cmake/FindLibultra.cmake +++ b/cmake/FindLibultra.cmake @@ -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" ) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 7ac80b8..9a118f4 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -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 $ + PRIVATE $ ) endif()