Prefer config mode for finding OpenAL
This commit is contained in:
@@ -98,6 +98,7 @@ if(WIN32)
|
||||
endif()
|
||||
|
||||
set(CMAKE_CXX_STANDARD 11)
|
||||
set(CMAKE_FIND_PACKAGE_PREFER_CONFIG ON)
|
||||
|
||||
# Optional features
|
||||
#
|
||||
|
@@ -89,8 +89,12 @@ endif()
|
||||
|
||||
if(OPENAL)
|
||||
find_package(OpenAL REQUIRED)
|
||||
if(TARGET OpenAL::OpenAL)
|
||||
target_link_libraries(86Box OpenAL::OpenAL)
|
||||
else()
|
||||
include_directories(${OPENAL_INCLUDE_DIR})
|
||||
target_link_libraries(86Box ${OPENAL_LIBRARY})
|
||||
endif()
|
||||
endif()
|
||||
|
||||
find_package(SDL2 REQUIRED)
|
||||
|
Reference in New Issue
Block a user