libobs: Add currently used Qt version to obsconfig.h.in

Allows the ability to have code depending on whether OBS is being
compiled with Qt5 or Qt6
master
jp9000 2022-07-28 14:29:34 -07:00
parent 8f1ab15281
commit 97b34ebb76
2 changed files with 7 additions and 0 deletions

View File

@ -11,6 +11,12 @@ find_package(
OPTIONAL_COMPONENTS avcodec)
find_package(ZLIB REQUIRED)
if(ENABLE_UI)
find_qt(COMPONENTS Core)
else()
set(_QT_VERSION 0)
endif()
add_library(libobs SHARED)
add_library(OBS::libobs ALIAS libobs)

View File

@ -14,6 +14,7 @@
#define OBS_DATA_PATH "@OBS_DATA_PATH@"
#define OBS_INSTALL_PREFIX "@OBS_INSTALL_PREFIX@"
#define OBS_PLUGIN_DESTINATION "@OBS_PLUGIN_DESTINATION@"
#define OBS_QT_VERSION @_QT_VERSION@
#cmakedefine LINUX_PORTABLE
#cmakedefine GIO_FOUND