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