build: generalize linking openal-soft to libfmt
Followup on the previous 3 commits to fix MSVC builds by linking libfmt which openal-soft now needs. Change the relevant CMake to link libfmt when it is found on all platforms. Signed-off-by: Rafael Kitover <rkitover@gmail.com>
This commit is contained in:
parent
5912be5a32
commit
34e46945f9
|
@ -181,12 +181,10 @@ endif()
|
|||
# Find OpenAL (required).
|
||||
find_package(OpenAL REQUIRED)
|
||||
|
||||
if(WIN32)
|
||||
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
|
||||
find_library(FMT fmtd)
|
||||
else()
|
||||
find_library(FMT fmt)
|
||||
endif()
|
||||
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
|
||||
find_library(FMT_LIBRARY NAMES fmtd fmt)
|
||||
else()
|
||||
find_library(FMT_LIBRARY fmt)
|
||||
endif()
|
||||
|
||||
# Workaround of static liblzma not being found on MSYS2.
|
||||
|
@ -283,8 +281,12 @@ function(configure_wx_target target)
|
|||
if(OPENAL_STATIC)
|
||||
_add_compile_definitions(AL_LIBTYPE_STATIC)
|
||||
|
||||
if(FMT_LIBRARY)
|
||||
list(APPEND OPENAL_LIBRARY ${FMT_LIBRARY} avrt)
|
||||
endif()
|
||||
|
||||
if(WIN32)
|
||||
list(APPEND OPENAL_LIBRARY ${FMT} avrt)
|
||||
list(APPEND OPENAL_LIBRARY avrt)
|
||||
endif()
|
||||
endif()
|
||||
_add_include_directories(${OPENAL_INCLUDE_DIR})
|
||||
|
|
Loading…
Reference in New Issue