mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-13 19:49:51 +01:00
Add cmake flag to use system-provided miniaudio (#4867)
Example usage: `cmake -DUSE_SYSTEM_MINIAUDIO=ON ..`
This commit is contained in:
parent
86c2a070cc
commit
5d5d265ae0
|
@ -31,6 +31,7 @@
|
|||
- Dev: Fixed flickering when running with Direct2D on Windows. (#4851)
|
||||
- Dev: Fix qtkeychain include for Qt6 users. (#4863)
|
||||
- Dev: Add a compile-time flag `CHATTERINO_UPDATER` which can be turned off to disable update checks. (#4854)
|
||||
- Dev: Add a compile-time flag `USE_SYSTEM_MINIAUDIO` which can be turned on to use the system miniaudio. (#4867)
|
||||
|
||||
## 2.4.6
|
||||
|
||||
|
|
|
@ -17,6 +17,7 @@ option(USE_SYSTEM_PAJLADA_SETTINGS "Use system pajlada settings library" OFF)
|
|||
option(USE_SYSTEM_LIBCOMMUNI "Use system communi library" OFF)
|
||||
option(USE_SYSTEM_QTKEYCHAIN "Use system QtKeychain library" OFF)
|
||||
option(BUILD_WITH_QTKEYCHAIN "Build Chatterino with support for your system key chain" ON)
|
||||
option(USE_SYSTEM_MINIAUDIO "Build Chatterino with your system miniaudio" OFF)
|
||||
option(BUILD_WITH_CRASHPAD "Build chatterino with crashpad" OFF)
|
||||
option(USE_PRECOMPILED_HEADERS "Use precompiled headers" ON)
|
||||
option(BUILD_WITH_QT6 "Use Qt6 instead of default Qt5" OFF)
|
||||
|
|
|
@ -912,7 +912,16 @@ target_include_directories(${LIBRARY_PROJECT} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}
|
|||
target_include_directories(${LIBRARY_PROJECT} PUBLIC ${CMAKE_SOURCE_DIR}/lib/semver/include)
|
||||
|
||||
# miniaudio dependency https://github.com/mackron/miniaudio
|
||||
target_include_directories(${LIBRARY_PROJECT} PUBLIC ${CMAKE_SOURCE_DIR}/lib/miniaudio)
|
||||
if (USE_SYSTEM_MINIAUDIO)
|
||||
message(STATUS "Building with system miniaudio")
|
||||
include(CheckIncludeFileCXX)
|
||||
CHECK_INCLUDE_FILE_CXX("miniaudio.h" MINIAUDIO_FOUND)
|
||||
if (NOT MINIAUDIO_FOUND)
|
||||
message(FATAL_ERROR "miniaudio.h not found on your system")
|
||||
endif()
|
||||
else ()
|
||||
target_include_directories(${LIBRARY_PROJECT} PUBLIC ${CMAKE_SOURCE_DIR}/lib/miniaudio)
|
||||
endif ()
|
||||
|
||||
if (UNIX)
|
||||
if (CMAKE_DL_LIBS)
|
||||
|
|
Loading…
Reference in a new issue