Allows the ability to have code depending on whether OBS is being compiled with Qt5 or Qt6
@@ -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)
@@ -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