From 7388a2c8358518eb645c330c8e2812d9b20b9126 Mon Sep 17 00:00:00 2001 From: Astazium <113135541+Astazium@users.noreply.github.com> Date: Sun, 23 Aug 2026 20:49:30 +0300 Subject: [PATCH] fix older cmake versions --- src/CMakeLists.txt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 12ece0f7f..2f4969a29 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -14,6 +14,13 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Windows") find_package(OpenAL CONFIG REQUIRED) else() find_package(OpenAL REQUIRED) + if(NOT TARGET OpenAL::OpenAL) + add_library(OpenAL::OpenAL UNKNOWN IMPORTED) + set_target_properties(OpenAL::OpenAL PROPERTIES + IMPORTED_LOCATION "${OPENAL_LIBRARY}" + INTERFACE_INCLUDE_DIRECTORIES "${OPENAL_INCLUDE_DIR}" + ) + endif() endif() find_package(ZLIB REQUIRED) find_package(PNG REQUIRED)