fix older cmake versions

This commit is contained in:
Astazium 2026-08-23 20:49:30 +03:00 • committed by GitHub
parent 9a942cf634
commit 7388a2c835
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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)