cmake: Set correct flags when building with obs-studio

The commit 8163e3e917 introduced a complete refactor of the CMake script in order to improve future updates, but accidentally broke building with OBS Studio due to only testing the standalone model. By correctly adjusting the option name again, this should work again with this change.

Fixed: #351
This commit is contained in:
Xaymar 2020-10-03 10:06:20 +02:00 committed by Michael Fabian 'Xaymar' Dirks
parent ab2b632fb4
commit 3d70814b93
1 changed files with 7 additions and 7 deletions

View File

@ -190,7 +190,7 @@ set(_CXX_EXTENSIONS OFF)
if(TARGET libobs) if(TARGET libobs)
# Plugin is built together with libOBS. # Plugin is built together with libOBS.
message(STATUS "${PROJECT_NAME}: Using native libOBS.") message(STATUS "${PROJECT_NAME}: Using native libOBS.")
set(OBS_NATIVE TRUE) set(${PREFIX}OBS_NATIVE TRUE)
if (TARGET obs-frontend-api) if (TARGET obs-frontend-api)
set(HAVE_OBS_FRONTEND TRUE) set(HAVE_OBS_FRONTEND TRUE)
endif() endif()
@ -200,7 +200,7 @@ else()
if(NOT WIN32) if(NOT WIN32)
message(STATUS "${PROJECT_NAME}: Linux builds require preinstalled development packages. Refer to the manual for more information.") message(STATUS "${PROJECT_NAME}: Linux builds require preinstalled development packages. Refer to the manual for more information.")
endif() endif()
set(OBS_NATIVE FALSE) set(${PREFIX}OBS_NATIVE FALSE)
endif() endif()
################################################################################ ################################################################################
@ -435,7 +435,7 @@ endfunction()
refresh_components() refresh_components()
# OBS (Always first) # OBS (Always first)
if(NOT OBS_NATIVE) if(NOT ${PREFIX}OBS_NATIVE)
if(WIN32) if(WIN32)
set(DLSUFFIX "vs2019") set(DLSUFFIX "vs2019")
elseif(UNIX AND NOT APPLE) elseif(UNIX AND NOT APPLE)
@ -506,7 +506,7 @@ endif()
# FFmpeg # FFmpeg
if(REQUIRE_FFMPEG) if(REQUIRE_FFMPEG)
if(WIN32 AND NOT OBS_NATIVE) if(WIN32 AND NOT ${PREFIX}OBS_NATIVE)
find_path( find_path(
FFmpegPath "libavcodec/avcodec.h" FFmpegPath "libavcodec/avcodec.h"
HINTS HINTS
@ -555,7 +555,7 @@ endif()
# Qt # Qt
if(REQUIRE_QT) if(REQUIRE_QT)
if(WIN32 AND NOT OBS_NATIVE) if(WIN32 AND NOT ${PREFIX}OBS_NATIVE)
download_project( download_project(
PROJ qt PROJ qt
URL https://github.com/Xaymar/obs-studio/releases/download/${OBS_DEPENDENCIES_VERSION}/qt_${OBS_QT_VERSION}.7z URL https://github.com/Xaymar/obs-studio/releases/download/${OBS_DEPENDENCIES_VERSION}/qt_${OBS_QT_VERSION}.7z
@ -586,7 +586,7 @@ endif()
# OBS Frontend API # OBS Frontend API
if(REQUIRE_OBSFE) if(REQUIRE_OBSFE)
if(NOT OBS_NATIVE) if(NOT ${PREFIX}OBS_NATIVE)
if (EXISTS "${_INCLUDE_PREFIX}/obs-frontend-api/obs-frontend-apiConfig.cmake") if (EXISTS "${_INCLUDE_PREFIX}/obs-frontend-api/obs-frontend-apiConfig.cmake")
include("${_INCLUDE_PREFIX}/obs-frontend-api/obs-frontend-apiConfig.cmake") include("${_INCLUDE_PREFIX}/obs-frontend-api/obs-frontend-apiConfig.cmake")
set(HAVE_OBSFE TRUE) set(HAVE_OBSFE TRUE)
@ -785,7 +785,7 @@ if(WIN32)
list(APPEND PROJECT_PRIVATE_GENERATED list(APPEND PROJECT_PRIVATE_GENERATED
"${PROJECT_BINARY_DIR}/generated/version.rc" "${PROJECT_BINARY_DIR}/generated/version.rc"
) )
if(NOT OBS_NATIVE) if(NOT ${PREFIX}OBS_NATIVE)
list(APPEND PROJECT_TEMPLATES list(APPEND PROJECT_TEMPLATES
"templates/installer.iss.in" "templates/installer.iss.in"
) )