Skip to content

Commit

Permalink
Fixing FindMETAL.cmake
Browse files Browse the repository at this point in the history
Using `target_link_libraries` instead of `set_target_properties` fixes the link line, so that
it includes `Metal` and `CoreServices`.

Closes #674
  • Loading branch information
andrsd committed Apr 9, 2024
1 parent 3cba084 commit b51252d
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions cmake/FindMETAL.cmake
Expand Up @@ -20,7 +20,5 @@ if(METAL_FOUND AND NOT TARGET OCCA::depends::METAL)
# Create our wrapper imported target
# Put it in the OCCA namespace to make it clear that we created it.
add_library(OCCA::depends::METAL INTERFACE IMPORTED)
set_target_properties(OCCA::depends::METAL PROPERTIES
INTERFACE_LINK_LIBRARIES "${METAL_LIBRARY} ${CORE_SERVICES} ${APP_KIT}"
)
target_link_libraries(OCCA::depends::METAL INTERFACE ${METAL_LIBRARY} ${CORE_SERVICES} ${APP_KIT})
endif()

0 comments on commit b51252d

Please sign in to comment.