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 OpenAL (required).
|
||||||
find_package(OpenAL REQUIRED)
|
find_package(OpenAL REQUIRED)
|
||||||
|
|
||||||
if(WIN32)
|
|
||||||
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
|
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
|
||||||
find_library(FMT fmtd)
|
find_library(FMT_LIBRARY NAMES fmtd fmt)
|
||||||
else()
|
else()
|
||||||
find_library(FMT fmt)
|
find_library(FMT_LIBRARY fmt)
|
||||||
endif()
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Workaround of static liblzma not being found on MSYS2.
|
# Workaround of static liblzma not being found on MSYS2.
|
||||||
|
@ -283,8 +281,12 @@ function(configure_wx_target target)
|
||||||
if(OPENAL_STATIC)
|
if(OPENAL_STATIC)
|
||||||
_add_compile_definitions(AL_LIBTYPE_STATIC)
|
_add_compile_definitions(AL_LIBTYPE_STATIC)
|
||||||
|
|
||||||
|
if(FMT_LIBRARY)
|
||||||
|
list(APPEND OPENAL_LIBRARY ${FMT_LIBRARY} avrt)
|
||||||
|
endif()
|
||||||
|
|
||||||
if(WIN32)
|
if(WIN32)
|
||||||
list(APPEND OPENAL_LIBRARY ${FMT} avrt)
|
list(APPEND OPENAL_LIBRARY avrt)
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
_add_include_directories(${OPENAL_INCLUDE_DIR})
|
_add_include_directories(${OPENAL_INCLUDE_DIR})
|
||||||
|
|
Loading…
Reference in New Issue