diff --git a/cmake/dependencies-helpers/OpenAL.cmake b/cmake/dependencies-helpers/OpenAL.cmake index a0e28669bd..c33f4f762f 100644 --- a/cmake/dependencies-helpers/OpenAL.cmake +++ b/cmake/dependencies-helpers/OpenAL.cmake @@ -1,7 +1,12 @@ # Refind OpenAL to add the OpenAL::OpenAL target if (${_PREFIX}USE_OPENAL STREQUAL "SYSTEM") + find_package(OpenAL QUIET) if (NOT TARGET OpenAL::OpenAL) - find_package(OpenAL QUIET CONFIG) + add_library(OpenAL::OpenAL INTERFACE IMPORTED) + set_target_properties(OpenAL::OpenAL PROPERTIES + INTERFACE_LINK_LIBRARIES "${OPENAL_LIBRARY}" + INTERFACE_INCLUDE_DIRECTORIES "${OPENAL_INCLUDE_DIR}" + ) endif () endif () \ No newline at end of file diff --git a/cmake/dependencies-helpers/RapidJSON.cmake b/cmake/dependencies-helpers/RapidJSON.cmake index 59f8eea90c..ebd31f778c 100644 --- a/cmake/dependencies-helpers/RapidJSON.cmake +++ b/cmake/dependencies-helpers/RapidJSON.cmake @@ -1,9 +1,8 @@ # Add the RapidJSON target if (${_PREFIX}USE_RAPIDJSON STREQUAL "SYSTEM") - if (NOT TARGET RapidJSON::RapidJSON AND TARGET rapidjson) + if (NOT TARGET RapidJSON::RapidJSON) message(STATUS "Adding RapidJSON::RapidJSON target") - set_target_properties(rapidjson PROPERTIES IMPORTED_GLOBAL TRUE) - add_library(RapidJSON::RapidJSON ALIAS rapidjson) + add_library(RapidJSON::RapidJSON INTERFACE IMPORTED) endif () endif () \ No newline at end of file