obs-studio/UI/CMakeLists.txt

392 lines
8.8 KiB
CMake
Raw Normal View History

if(DISABLE_UI)
message(STATUS "UI disabled")
return()
elseif(ENABLE_UI)
set(FIND_MODE REQUIRED)
else()
set(FIND_MODE QUIET)
endif()
UI: Remove mac browser workarounds, improve stability The workarounds were made because of conflicts with running multiple UI threads at once on macOS, which macOS can't do very well, and would be susceptible to crashes. This would cause crashes not only on startup but seemingly at random when using the browser source on macOS. The original "fix" was a hack to try to minimize UI code and browser UI code from executing at the same time. The macOS initial scene loading was deferred until all Qt-related and main window initialization was completed. Although this worked to some extent to prevent conflicts, it made it so that there was an initial period on startup where the entire UI seemed "blank" for users, and it was still possible for the main UI thread and the browser UI thread to clash, causing crashes seemingly at random for users. The external message pump method of CEF is the solution to the problem, which is the method which allows the main UI thread to share events with CEF. To do this, all CEF operations need to be performed in the UI thread (Qt's main thread), and CefDoMessageLoopWork() needs to be called when CefApp::OnScheduleMessagePumpWork callback is triggered. A number of other issues had to be solved as well, such as CefBrowser references getting "stuck" in the Qt event queue. With this, macOS no longer needs to do the "deferred load" hack, and browsers are now much more stable and no longer as susceptible to seemingly random crashes, improving overall program stability when browsers are used.
2019-05-01 12:13:35 -07:00
if(BROWSER_AVAILABLE_INTERNAL)
add_definitions(-DBROWSER_AVAILABLE)
endif()
add_subdirectory(obs-frontend-api)
# ----------------------------------------------------------------------------
project(obs)
set(DISABLE_UPDATE_MODULE TRUE CACHE BOOL "Disables building the update module")
2017-02-20 04:46:29 -08:00
2019-02-06 22:45:06 -08:00
if(NOT DEFINED TWITCH_CLIENTID OR "${TWITCH_CLIENTID}" STREQUAL "" OR
NOT DEFINED TWITCH_HASH OR "${TWITCH_HASH}" STREQUAL "" OR
NOT BROWSER_AVAILABLE_INTERNAL)
set(TWITCH_ENABLED FALSE)
set(TWITCH_CLIENTID "")
set(TWITCH_HASH "0")
else()
set(TWITCH_ENABLED TRUE)
endif()
2019-02-06 22:44:28 -08:00
if(NOT DEFINED MIXER_CLIENTID OR "${MIXER_CLIENTID}" STREQUAL "" OR
NOT DEFINED MIXER_HASH OR "${MIXER_HASH}" STREQUAL "" OR
NOT BROWSER_AVAILABLE_INTERNAL)
set(MIXER_ENABLED FALSE)
set(MIXER_CLIENTID "")
set(MIXER_HASH "0")
else()
set(MIXER_ENABLED TRUE)
endif()
if(NOT DEFINED RESTREAM_CLIENTID OR "${RESTREAM_CLIENTID}" STREQUAL "" OR
NOT DEFINED RESTREAM_HASH OR "${RESTREAM_HASH}" STREQUAL "" OR
NOT BROWSER_AVAILABLE_INTERNAL)
set(RESTREAM_ENABLED FALSE)
set(RESTREAM_CLIENTID "")
set(RESTREAM_HASH "0")
else()
set(RESTREAM_ENABLED TRUE)
endif()
2019-02-06 22:44:28 -08:00
configure_file(
"${CMAKE_CURRENT_SOURCE_DIR}/ui-config.h.in"
"${CMAKE_CURRENT_BINARY_DIR}/ui-config.h")
set(CMAKE_INCLUDE_CURRENT_DIR TRUE)
set(CMAKE_AUTOMOC TRUE)
2018-12-14 05:42:05 -08:00
find_package(Qt5Svg ${FIND_MODE})
find_package(FFmpeg REQUIRED COMPONENTS avcodec avutil avformat)
2018-02-06 17:08:57 -08:00
if(APPLE)
find_package(Qt5MacExtras REQUIRED)
endif(APPLE)
if(NOT Qt5Widgets_FOUND)
if (ENABLE_UI)
message(FATAL_ERROR "Failed to find Qt5")
else()
message(STATUS "Qt5 not found - UI disabled")
return()
endif()
endif()
include_directories(${FFMPEG_INCLUDE_DIRS})
2019-02-06 22:44:28 -08:00
include_directories(${CMAKE_CURRENT_BINARY_DIR})
include_directories(SYSTEM "obs-frontend-api")
include_directories(SYSTEM "${CMAKE_SOURCE_DIR}/libobs")
include_directories(SYSTEM "${CMAKE_SOURCE_DIR}/deps/libff")
include_directories(SYSTEM "${CMAKE_SOURCE_DIR}/deps/json11")
if(BROWSER_AVAILABLE_INTERNAL)
include_directories(SYSTEM "${CMAKE_SOURCE_DIR}/plugins/obs-browser/panel")
endif()
find_package(Libcurl REQUIRED)
include_directories(${LIBCURL_INCLUDE_DIRS})
add_definitions(${LIBCURL_DEFINITIONS})
if(WIN32)
2017-02-20 04:46:29 -08:00
include_directories(${OBS_JANSSON_INCLUDE_DIRS})
include_directories(${BLAKE2_INCLUDE_DIR})
2017-02-20 04:46:29 -08:00
set(obs_PLATFORM_SOURCES
platform-windows.cpp
2017-02-20 04:46:29 -08:00
win-update/update-window.cpp
win-update/win-update.cpp
win-update/win-update-helpers.cpp
${obs-studio_BINARY_DIR}/obs.rc)
2017-02-20 04:46:29 -08:00
set(obs_PLATFORM_HEADERS
win-update/update-window.hpp
win-update/win-update.hpp
win-update/win-update-helpers.hpp)
set(obs_PLATFORM_LIBRARIES
crypt32
blake2
2017-02-20 04:46:29 -08:00
${OBS_JANSSON_IMPORT})
if(CMAKE_SIZEOF_VOID_P EQUAL 4)
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /LARGEADDRESSAWARE")
endif()
elseif(APPLE)
set(obs_PLATFORM_SOURCES
platform-osx.mm)
find_package(AppKit REQUIRED)
2014-09-15 10:38:18 -07:00
set(obs_PLATFORM_LIBRARIES ${APPKIT_LIBRARIES})
add_definitions(-fobjc-arc)
option(ENABLE_SPARKLE_UPDATER "Enables updates via the Sparkle framework (don't forget to update the Info.plist for your .app)" OFF)
if(ENABLE_SPARKLE_UPDATER)
find_library(SPARKLE Sparkle)
include_directories(${SPARKLE})
set(obs_PLATFORM_SOURCES
${obs_PLATFORM_SOURCES}
sparkle-updater.mm)
set(obs_PLATFORM_LIBRARIES
${obs_PLATFORM_LIBRARIES}
${SPARKLE})
add_definitions(-DUPDATE_SPARKLE=1)
endif()
elseif(UNIX)
find_package(Qt5X11Extras REQUIRED)
set(obs_PLATFORM_SOURCES
platform-x11.cpp)
set(obs_PLATFORM_LIBRARIES
2014-05-18 18:02:57 -07:00
Qt5::X11Extras)
endif()
if(BROWSER_AVAILABLE_INTERNAL)
list(APPEND obs_PLATFORM_SOURCES
obf.c
auth-oauth.cpp
)
list(APPEND obs_PLATFORM_HEADERS
obf.h
auth-oauth.hpp
)
2019-02-06 22:44:28 -08:00
2019-02-06 22:45:06 -08:00
if(TWITCH_ENABLED)
list(APPEND obs_PLATFORM_SOURCES
auth-twitch.cpp
)
list(APPEND obs_PLATFORM_HEADERS
auth-twitch.hpp
)
endif()
2019-02-06 22:44:28 -08:00
if(MIXER_ENABLED)
list(APPEND obs_PLATFORM_SOURCES
auth-mixer.cpp
)
list(APPEND obs_PLATFORM_HEADERS
auth-mixer.hpp
)
endif()
if(RESTREAM_ENABLED)
list(APPEND obs_PLATFORM_SOURCES
auth-restream.cpp
)
list(APPEND obs_PLATFORM_HEADERS
auth-restream.hpp
)
endif()
endif()
set(obs_libffutil_SOURCES
../deps/libff/libff/ff-util.c
)
set(obs_libffutil_HEADERS
../deps/libff/libff/ff-util.h
)
if(MSVC)
set_source_files_properties(
../deps/libff/libff/ff-util.c
PROPERTIES COMPILE_FLAGS -Dinline=__inline
)
endif()
set(obs_SOURCES
${obs_PLATFORM_SOURCES}
${obs_libffutil_SOURCES}
../deps/json11/json11.cpp
obs-app.cpp
window-dock.cpp
api-interface.cpp
window-basic-main.cpp
window-basic-stats.cpp
2015-02-25 21:23:57 -08:00
window-basic-filters.cpp
window-basic-settings.cpp
2014-09-15 16:16:16 -07:00
window-basic-interaction.cpp
Add source properties window (very preliminary) - Add a properties window for sources so that you can now actually edit the settings for sources. Also, display the source by itself in the window (Note: not working on mac, and possibly not working on linux). When changing the settings for a source, it will call obs_source_update on that source when you have modified any values automatically. - Add a properties 'widget', eventually I want to turn this in to a regular nice properties view like you'd see in the designer, but right now it just uses a form layout in a QScrollArea with regular controls to display the properties. It's clunky but works for the time being. - Make it so that swap chains and the main graphics subsystem will automatically use at least one backbuffer if none was specified - Fix bug where displays weren't added to the main display array - Make it so that you can get the properties of a source via the actual pointer of a source/encoder/output in addition to being able to look up properties via identifier. - When registering source types, check for required functions (wasn't doing it before). getheight/getwidth should not be optional if it's a video source as well. - Add an RAII OBSObj wrapper to obs.hpp for non-reference-counted libobs pointers - Add an RAII OBSSignal wrapper to obs.hpp for libobs signals to automatically disconnect them on destruction - Move the "scale and center" calculation in window-basic-main.cpp to its own function and in its own source file - Add an 'update' callback to WASAPI audio sources
2014-03-23 01:07:54 -07:00
window-basic-properties.cpp
window-basic-auto-config.cpp
window-basic-main-outputs.cpp
window-basic-source-select.cpp
window-basic-settings-stream.cpp
window-basic-auto-config-test.cpp
window-basic-main-scene-collections.cpp
window-basic-main-transitions.cpp
2016-09-26 12:40:23 -07:00
window-basic-main-dropfiles.cpp
window-basic-main-profiles.cpp
window-basic-main-browser.cpp
window-basic-status-bar.cpp
window-basic-adv-audio.cpp
UI: Add scene editing So, scene editing was interesting (and by interesting I mean excruciating). I almost implemented 'manipulator' visuals (ala 3dsmax for example), and used 3 modes for controlling position/rotation/size, but in a 2D editing, it felt clunky, so I defaulted back to simply click-and-drag for movement, and then took a similar though slightly different looking approach for handling scaling and reszing. I also added a number of menu item helpers related to positioning, scaling, rotating, flipping, and resetting the transform back to default. There is also a new 'transform' dialog (accessible via menu) which will allow you to manually edit every single transform variable of a scene item directly if desired. If a scene item does not have bounds active, pulling on the sides of a source will cause it to resize it via base scale rather than by the bounding box system (if the source resizes that scale will apply). If bounds are active, it will modify the bounding box only instead. How a source scales when a bounding box is active depends on the type of bounds being used. You can set it to scale to the inner bounds, the outer bounds, scale to bounds width only, scale to bounds height only, and a setting to stretch to bounds (which forces a source to always draw at the bounding box size rather than be affected by its internal size). You can also set it to be used as a 'maximum' size, so that the source doesn't necessarily get scaled unless it extends beyond the bounds. Like in OBS1, objects will snap to the edges unless the control key is pressed. However, this will now happen even if the object is rotated or oriented in any strange way. Snapping will also occur when stretching or changing the bounding box size.
2014-06-15 00:54:48 -07:00
window-basic-transform.cpp
window-basic-preview.cpp
2018-08-17 23:13:20 -07:00
window-basic-about.cpp
window-namedialog.cpp
window-log-reply.cpp
window-projector.cpp
window-remux.cpp
auth-base.cpp
2018-06-02 09:45:01 -07:00
source-tree.cpp
Add source properties window (very preliminary) - Add a properties window for sources so that you can now actually edit the settings for sources. Also, display the source by itself in the window (Note: not working on mac, and possibly not working on linux). When changing the settings for a source, it will call obs_source_update on that source when you have modified any values automatically. - Add a properties 'widget', eventually I want to turn this in to a regular nice properties view like you'd see in the designer, but right now it just uses a form layout in a QScrollArea with regular controls to display the properties. It's clunky but works for the time being. - Make it so that swap chains and the main graphics subsystem will automatically use at least one backbuffer if none was specified - Fix bug where displays weren't added to the main display array - Make it so that you can get the properties of a source via the actual pointer of a source/encoder/output in addition to being able to look up properties via identifier. - When registering source types, check for required functions (wasn't doing it before). getheight/getwidth should not be optional if it's a video source as well. - Add an RAII OBSObj wrapper to obs.hpp for non-reference-counted libobs pointers - Add an RAII OBSSignal wrapper to obs.hpp for libobs signals to automatically disconnect them on destruction - Move the "scale and center" calculation in window-basic-main.cpp to its own function and in its own source file - Add an 'update' callback to WASAPI audio sources
2014-03-23 01:07:54 -07:00
properties-view.cpp
focus-list.cpp
menu-button.cpp
2015-03-17 18:33:21 -07:00
double-slider.cpp
slider-ignorewheel.cpp
combobox-ignorewheel.cpp
spinbox-ignorewheel.cpp
record-button.cpp
volume-control.cpp
adv-audio-control.cpp
item-widget-helpers.cpp
2018-04-27 19:49:48 -07:00
horizontal-scroll-area.cpp
vertical-scroll-area.cpp
visibility-item-widget.cpp
slider-absoluteset-style.cpp
qt-display.cpp
crash-report.cpp
hotkey-edit.cpp
2015-05-01 18:38:01 -07:00
source-label.cpp
remote-text.cpp
audio-encoders.cpp
qt-wrappers.cpp)
set(obs_HEADERS
2017-02-20 04:46:29 -08:00
${obs_PLATFORM_HEADERS}
${obs_libffutil_HEADERS}
../deps/json11/json11.hpp
obs-app.hpp
platform.hpp
window-dock.hpp
window-main.hpp
window-basic-main.hpp
window-basic-stats.hpp
2015-02-25 21:23:57 -08:00
window-basic-filters.hpp
window-basic-settings.hpp
2014-09-15 16:16:16 -07:00
window-basic-interaction.hpp
Add source properties window (very preliminary) - Add a properties window for sources so that you can now actually edit the settings for sources. Also, display the source by itself in the window (Note: not working on mac, and possibly not working on linux). When changing the settings for a source, it will call obs_source_update on that source when you have modified any values automatically. - Add a properties 'widget', eventually I want to turn this in to a regular nice properties view like you'd see in the designer, but right now it just uses a form layout in a QScrollArea with regular controls to display the properties. It's clunky but works for the time being. - Make it so that swap chains and the main graphics subsystem will automatically use at least one backbuffer if none was specified - Fix bug where displays weren't added to the main display array - Make it so that you can get the properties of a source via the actual pointer of a source/encoder/output in addition to being able to look up properties via identifier. - When registering source types, check for required functions (wasn't doing it before). getheight/getwidth should not be optional if it's a video source as well. - Add an RAII OBSObj wrapper to obs.hpp for non-reference-counted libobs pointers - Add an RAII OBSSignal wrapper to obs.hpp for libobs signals to automatically disconnect them on destruction - Move the "scale and center" calculation in window-basic-main.cpp to its own function and in its own source file - Add an 'update' callback to WASAPI audio sources
2014-03-23 01:07:54 -07:00
window-basic-properties.hpp
window-basic-auto-config.hpp
window-basic-main-outputs.hpp
window-basic-source-select.hpp
2018-08-17 23:13:20 -07:00
window-basic-about.hpp
window-basic-status-bar.hpp
window-basic-adv-audio.hpp
UI: Add scene editing So, scene editing was interesting (and by interesting I mean excruciating). I almost implemented 'manipulator' visuals (ala 3dsmax for example), and used 3 modes for controlling position/rotation/size, but in a 2D editing, it felt clunky, so I defaulted back to simply click-and-drag for movement, and then took a similar though slightly different looking approach for handling scaling and reszing. I also added a number of menu item helpers related to positioning, scaling, rotating, flipping, and resetting the transform back to default. There is also a new 'transform' dialog (accessible via menu) which will allow you to manually edit every single transform variable of a scene item directly if desired. If a scene item does not have bounds active, pulling on the sides of a source will cause it to resize it via base scale rather than by the bounding box system (if the source resizes that scale will apply). If bounds are active, it will modify the bounding box only instead. How a source scales when a bounding box is active depends on the type of bounds being used. You can set it to scale to the inner bounds, the outer bounds, scale to bounds width only, scale to bounds height only, and a setting to stretch to bounds (which forces a source to always draw at the bounding box size rather than be affected by its internal size). You can also set it to be used as a 'maximum' size, so that the source doesn't necessarily get scaled unless it extends beyond the bounds. Like in OBS1, objects will snap to the edges unless the control key is pressed. However, this will now happen even if the object is rotated or oriented in any strange way. Snapping will also occur when stretching or changing the bounding box size.
2014-06-15 00:54:48 -07:00
window-basic-transform.hpp
window-basic-preview.hpp
window-namedialog.hpp
window-log-reply.hpp
window-projector.hpp
window-remux.hpp
auth-base.hpp
2018-06-02 09:45:01 -07:00
source-tree.hpp
Add source properties window (very preliminary) - Add a properties window for sources so that you can now actually edit the settings for sources. Also, display the source by itself in the window (Note: not working on mac, and possibly not working on linux). When changing the settings for a source, it will call obs_source_update on that source when you have modified any values automatically. - Add a properties 'widget', eventually I want to turn this in to a regular nice properties view like you'd see in the designer, but right now it just uses a form layout in a QScrollArea with regular controls to display the properties. It's clunky but works for the time being. - Make it so that swap chains and the main graphics subsystem will automatically use at least one backbuffer if none was specified - Fix bug where displays weren't added to the main display array - Make it so that you can get the properties of a source via the actual pointer of a source/encoder/output in addition to being able to look up properties via identifier. - When registering source types, check for required functions (wasn't doing it before). getheight/getwidth should not be optional if it's a video source as well. - Add an RAII OBSObj wrapper to obs.hpp for non-reference-counted libobs pointers - Add an RAII OBSSignal wrapper to obs.hpp for libobs signals to automatically disconnect them on destruction - Move the "scale and center" calculation in window-basic-main.cpp to its own function and in its own source file - Add an 'update' callback to WASAPI audio sources
2014-03-23 01:07:54 -07:00
properties-view.hpp
properties-view.moc.hpp
Add source properties window (very preliminary) - Add a properties window for sources so that you can now actually edit the settings for sources. Also, display the source by itself in the window (Note: not working on mac, and possibly not working on linux). When changing the settings for a source, it will call obs_source_update on that source when you have modified any values automatically. - Add a properties 'widget', eventually I want to turn this in to a regular nice properties view like you'd see in the designer, but right now it just uses a form layout in a QScrollArea with regular controls to display the properties. It's clunky but works for the time being. - Make it so that swap chains and the main graphics subsystem will automatically use at least one backbuffer if none was specified - Fix bug where displays weren't added to the main display array - Make it so that you can get the properties of a source via the actual pointer of a source/encoder/output in addition to being able to look up properties via identifier. - When registering source types, check for required functions (wasn't doing it before). getheight/getwidth should not be optional if it's a video source as well. - Add an RAII OBSObj wrapper to obs.hpp for non-reference-counted libobs pointers - Add an RAII OBSSignal wrapper to obs.hpp for libobs signals to automatically disconnect them on destruction - Move the "scale and center" calculation in window-basic-main.cpp to its own function and in its own source file - Add an 'update' callback to WASAPI audio sources
2014-03-23 01:07:54 -07:00
display-helpers.hpp
balance-slider.hpp
2015-03-17 18:33:21 -07:00
double-slider.hpp
slider-ignorewheel.hpp
combobox-ignorewheel.hpp
spinbox-ignorewheel.hpp
focus-list.hpp
menu-button.hpp
2015-03-22 14:54:50 -07:00
mute-checkbox.hpp
record-button.hpp
volume-control.hpp
adv-audio-control.hpp
item-widget-helpers.hpp
visibility-checkbox.hpp
locked-checkbox.hpp
2018-04-27 19:49:48 -07:00
horizontal-scroll-area.hpp
2018-06-02 09:45:01 -07:00
expand-checkbox.hpp
vertical-scroll-area.hpp
visibility-item-widget.hpp
slider-absoluteset-style.hpp
qt-display.hpp
crash-report.hpp
hotkey-edit.hpp
2015-05-01 18:38:01 -07:00
source-label.hpp
remote-text.hpp
audio-encoders.hpp
2018-08-17 23:13:20 -07:00
qt-wrappers.hpp
clickable-label.hpp)
set(obs_UI
forms/NameDialog.ui
forms/AutoConfigStartPage.ui
forms/AutoConfigVideoPage.ui
forms/AutoConfigStreamPage.ui
forms/AutoConfigTestPage.ui
forms/ColorSelect.ui
forms/OBSLogReply.ui
forms/OBSBasic.ui
UI: Add scene editing So, scene editing was interesting (and by interesting I mean excruciating). I almost implemented 'manipulator' visuals (ala 3dsmax for example), and used 3 modes for controlling position/rotation/size, but in a 2D editing, it felt clunky, so I defaulted back to simply click-and-drag for movement, and then took a similar though slightly different looking approach for handling scaling and reszing. I also added a number of menu item helpers related to positioning, scaling, rotating, flipping, and resetting the transform back to default. There is also a new 'transform' dialog (accessible via menu) which will allow you to manually edit every single transform variable of a scene item directly if desired. If a scene item does not have bounds active, pulling on the sides of a source will cause it to resize it via base scale rather than by the bounding box system (if the source resizes that scale will apply). If bounds are active, it will modify the bounding box only instead. How a source scales when a bounding box is active depends on the type of bounds being used. You can set it to scale to the inner bounds, the outer bounds, scale to bounds width only, scale to bounds height only, and a setting to stretch to bounds (which forces a source to always draw at the bounding box size rather than be affected by its internal size). You can also set it to be used as a 'maximum' size, so that the source doesn't necessarily get scaled unless it extends beyond the bounds. Like in OBS1, objects will snap to the edges unless the control key is pressed. However, this will now happen even if the object is rotated or oriented in any strange way. Snapping will also occur when stretching or changing the bounding box size.
2014-06-15 00:54:48 -07:00
forms/OBSBasicTransform.ui
2015-02-25 21:23:57 -08:00
forms/OBSBasicFilters.ui
Add source properties window (very preliminary) - Add a properties window for sources so that you can now actually edit the settings for sources. Also, display the source by itself in the window (Note: not working on mac, and possibly not working on linux). When changing the settings for a source, it will call obs_source_update on that source when you have modified any values automatically. - Add a properties 'widget', eventually I want to turn this in to a regular nice properties view like you'd see in the designer, but right now it just uses a form layout in a QScrollArea with regular controls to display the properties. It's clunky but works for the time being. - Make it so that swap chains and the main graphics subsystem will automatically use at least one backbuffer if none was specified - Fix bug where displays weren't added to the main display array - Make it so that you can get the properties of a source via the actual pointer of a source/encoder/output in addition to being able to look up properties via identifier. - When registering source types, check for required functions (wasn't doing it before). getheight/getwidth should not be optional if it's a video source as well. - Add an RAII OBSObj wrapper to obs.hpp for non-reference-counted libobs pointers - Add an RAII OBSSignal wrapper to obs.hpp for libobs signals to automatically disconnect them on destruction - Move the "scale and center" calculation in window-basic-main.cpp to its own function and in its own source file - Add an 'update' callback to WASAPI audio sources
2014-03-23 01:07:54 -07:00
forms/OBSBasicSettings.ui
forms/OBSBasicSourceSelect.ui
2014-09-15 16:16:16 -07:00
forms/OBSBasicInteraction.ui
2017-02-20 04:46:29 -08:00
forms/OBSUpdate.ui
2018-08-17 23:13:20 -07:00
forms/OBSRemux.ui
forms/OBSAbout.ui)
set(obs_QRC
forms/obs.qrc)
qt5_wrap_ui(obs_UI_HEADERS ${obs_UI})
qt5_add_resources(obs_QRC_SOURCES ${obs_QRC})
add_executable(obs WIN32
${obs_SOURCES}
${obs_HEADERS}
${obs_UI_HEADERS}
${obs_QRC_SOURCES})
if(WIN32)
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
set(_output_suffix "64")
else()
set(_output_suffix "32")
endif()
set_target_properties(obs
PROPERTIES
OUTPUT_NAME "obs${_output_suffix}")
endif()
target_link_libraries(obs
libobs
2014-05-18 18:02:57 -07:00
Qt5::Widgets
2018-12-14 05:42:05 -08:00
Qt5::Svg
obs-frontend-api
${FFMPEG_LIBRARIES}
${LIBCURL_LIBRARIES}
${obs_PLATFORM_LIBRARIES})
if (APPLE)
2018-02-06 17:08:57 -08:00
target_link_libraries(obs
Qt5::MacExtras)
set_target_properties(obs PROPERTIES LINK_FLAGS "-pagezero_size 10000 -image_base 100000000")
set_property(
TARGET obs
APPEND
PROPERTY INSTALL_RPATH
2018-01-29 16:12:32 -08:00
"/usr/local/Cellar/python3/3.6.4_2/Frameworks/Python.framework/Versions/3.6/lib/"
"/Library/Frameworks/Python.framework/Versions/3.6/lib/"
"/opt/local/Library/Frameworks/Python.framework/Versions/3.6/lib/"
)
endif()
define_graphic_modules(obs)
install_obs_core(obs)
install_obs_data(obs data obs-studio)
2018-08-17 23:13:20 -07:00
install_obs_data_file(obs ../AUTHORS obs-studio/authors)
if (UNIX AND UNIX_STRUCTURE AND NOT APPLE)
2019-03-12 10:29:07 -07:00
add_subdirectory(xdg-data)
endif()
add_subdirectory(frontend-plugins)
2017-02-20 04:50:17 -08:00
if(WIN32)
add_subdirectory(win-update/updater)
endif()