2014-01-20 07:58:58 -08:00
|
|
|
project(obs)
|
|
|
|
|
2014-09-15 14:20:43 -07:00
|
|
|
option(ENABLE_UI "Enables the OBS user interfaces" ON)
|
|
|
|
if(DISABLE_UI)
|
|
|
|
message(STATUS "UI disabled")
|
|
|
|
return()
|
|
|
|
elseif(ENABLE_UI)
|
|
|
|
set(FIND_MODE REQUIRED)
|
2014-01-20 07:58:58 -08:00
|
|
|
else()
|
2014-09-15 14:20:43 -07:00
|
|
|
set(FIND_MODE QUIET)
|
2014-01-20 07:58:58 -08:00
|
|
|
endif()
|
|
|
|
|
2015-07-11 10:11:57 -07:00
|
|
|
if(DEFINED QTDIR${_lib_suffix})
|
|
|
|
list(APPEND CMAKE_PREFIX_PATH "${QTDIR${_lib_suffix}}")
|
|
|
|
elseif(DEFINED QTDIR)
|
|
|
|
list(APPEND CMAKE_PREFIX_PATH "${QTDIR}")
|
|
|
|
elseif(DEFINED ENV{QTDIR${_lib_suffix}})
|
2014-01-20 07:58:58 -08:00
|
|
|
list(APPEND CMAKE_PREFIX_PATH "$ENV{QTDIR${_lib_suffix}}")
|
|
|
|
elseif(DEFINED ENV{QTDIR})
|
|
|
|
list(APPEND CMAKE_PREFIX_PATH "$ENV{QTDIR}")
|
|
|
|
endif()
|
|
|
|
|
|
|
|
set(CMAKE_INCLUDE_CURRENT_DIR TRUE)
|
|
|
|
set(CMAKE_AUTOMOC TRUE)
|
|
|
|
|
2014-09-15 14:20:43 -07:00
|
|
|
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
|
|
|
|
set(_lib_suffix 64)
|
|
|
|
else()
|
|
|
|
set(_lib_suffix 32)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
find_package(Qt5Widgets ${FIND_MODE})
|
|
|
|
|
2015-05-23 23:40:15 -07:00
|
|
|
if(NOT Qt5Widgets_FOUND)
|
2014-09-15 14:20:43 -07:00
|
|
|
if (ENABLE_UI)
|
|
|
|
message(FATAL_ERROR "Failed to find Qt5")
|
|
|
|
else()
|
|
|
|
message(STATUS "Qt5 not found - UI disabled")
|
|
|
|
return()
|
|
|
|
endif()
|
|
|
|
endif()
|
|
|
|
|
|
|
|
include_directories(SYSTEM "${CMAKE_SOURCE_DIR}/libobs")
|
2014-01-20 07:58:58 -08:00
|
|
|
|
2015-05-23 23:37:07 -07:00
|
|
|
find_package(Libcurl REQUIRED)
|
|
|
|
include_directories(${LIBCURL_INCLUDE_DIRS})
|
|
|
|
add_definitions(${LIBCURL_DEFINITIONS})
|
|
|
|
|
2014-01-20 07:58:58 -08:00
|
|
|
if(WIN32)
|
|
|
|
set(obs_PLATFORM_SOURCES
|
2015-04-04 15:35:15 -07:00
|
|
|
platform-windows.cpp
|
|
|
|
obs.rc)
|
2014-01-20 07:58:58 -08:00
|
|
|
elseif(APPLE)
|
|
|
|
set(obs_PLATFORM_SOURCES
|
|
|
|
platform-osx.mm)
|
2014-01-24 14:04:42 -08:00
|
|
|
|
|
|
|
find_package(AppKit REQUIRED)
|
2014-09-15 10:38:18 -07:00
|
|
|
set(obs_PLATFORM_LIBRARIES ${APPKIT_LIBRARIES})
|
2014-01-24 14:04:42 -08:00
|
|
|
|
2014-01-20 07:58:58 -08:00
|
|
|
add_definitions(-fobjc-arc)
|
2014-10-05 15:32:18 -07:00
|
|
|
|
|
|
|
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()
|
|
|
|
|
2014-01-20 07:58:58 -08:00
|
|
|
elseif(UNIX)
|
2014-04-03 14:41:22 -07:00
|
|
|
find_package(Qt5X11Extras REQUIRED)
|
|
|
|
|
2014-01-20 07:58:58 -08:00
|
|
|
set(obs_PLATFORM_SOURCES
|
|
|
|
platform-x11.cpp)
|
|
|
|
|
2014-12-01 23:35:42 -08:00
|
|
|
find_package(XCB COMPONENTS XCB REQUIRED RANDR REQUIRED XINERAMA REQUIRED)
|
|
|
|
|
|
|
|
include_directories(
|
|
|
|
${XCB_INCLUDE_DIRS}
|
|
|
|
${X11_XCB_INCLUDE_DIRS})
|
|
|
|
|
|
|
|
add_definitions(
|
|
|
|
${XCB_DEFINITIONS}
|
|
|
|
${X11_XCB_DEFINITIONS})
|
2014-01-20 07:58:58 -08:00
|
|
|
|
|
|
|
set(obs_PLATFORM_LIBRARIES
|
2014-12-01 23:35:42 -08:00
|
|
|
${XCB_LIBRARIES}
|
|
|
|
${X11_XCB_LIBRARIES}
|
2014-05-18 18:02:57 -07:00
|
|
|
Qt5::X11Extras)
|
2014-01-20 07:58:58 -08:00
|
|
|
endif()
|
|
|
|
|
|
|
|
set(obs_SOURCES
|
|
|
|
${obs_PLATFORM_SOURCES}
|
|
|
|
obs-app.cpp
|
|
|
|
window-basic-main.cpp
|
2015-02-25 21:23:57 -08:00
|
|
|
window-basic-filters.cpp
|
2014-01-24 20:31:25 -08:00
|
|
|
window-basic-settings.cpp
|
2014-09-15 16:16:16 -07:00
|
|
|
window-basic-interaction.cpp
|
2014-03-23 01:07:54 -07:00
|
|
|
window-basic-properties.cpp
|
2015-02-06 03:17:33 -08:00
|
|
|
window-basic-main-outputs.cpp
|
2014-05-10 18:47:48 -07:00
|
|
|
window-basic-source-select.cpp
|
2015-06-23 19:29:07 -07:00
|
|
|
window-basic-main-scene-collections.cpp
|
2015-06-23 19:38:01 -07:00
|
|
|
window-basic-main-profiles.cpp
|
2014-07-13 11:36:47 -07:00
|
|
|
window-license-agreement.cpp
|
2014-07-06 16:19:27 -07:00
|
|
|
window-basic-status-bar.cpp
|
2014-12-28 00:38:00 -08:00
|
|
|
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
|
2014-01-20 07:58:58 -08:00
|
|
|
window-namedialog.cpp
|
2014-05-18 17:44:10 -07:00
|
|
|
window-log-reply.cpp
|
2015-04-04 00:37:02 -07:00
|
|
|
window-projector.cpp
|
2014-09-02 19:11:55 -07:00
|
|
|
window-remux.cpp
|
2014-03-23 01:07:54 -07:00
|
|
|
properties-view.cpp
|
2015-03-23 19:15:19 -07:00
|
|
|
focus-list.cpp
|
2015-03-17 18:33:21 -07:00
|
|
|
double-slider.cpp
|
2014-05-03 22:54:38 -07:00
|
|
|
volume-control.cpp
|
2014-12-28 00:38:00 -08:00
|
|
|
adv-audio-control.cpp
|
2015-06-27 18:44:36 -07:00
|
|
|
item-widget-helpers.cpp
|
2015-03-17 18:37:51 -07:00
|
|
|
visibility-checkbox.cpp
|
2015-01-03 02:42:57 -08:00
|
|
|
vertical-scroll-area.cpp
|
2015-03-17 19:00:10 -07:00
|
|
|
visibility-item-widget.cpp
|
2015-04-04 06:13:48 -07:00
|
|
|
slider-absoluteset-style.cpp
|
2015-01-04 11:24:51 -08:00
|
|
|
source-list-widget.cpp
|
2015-08-01 20:38:12 -07:00
|
|
|
qt-display.cpp
|
2015-01-02 17:11:27 -08:00
|
|
|
crash-report.cpp
|
2014-11-01 13:44:01 -07:00
|
|
|
hotkey-edit.cpp
|
2015-05-01 18:38:01 -07:00
|
|
|
source-label.cpp
|
2015-05-23 23:37:07 -07:00
|
|
|
remote-text.cpp
|
2015-07-02 00:52:59 -07:00
|
|
|
audio-encoders.cpp
|
2014-01-20 07:58:58 -08:00
|
|
|
qt-wrappers.cpp)
|
|
|
|
|
|
|
|
set(obs_HEADERS
|
|
|
|
obs-app.hpp
|
|
|
|
platform.hpp
|
2014-01-25 08:18:40 -08:00
|
|
|
window-main.hpp
|
2014-01-20 07:58:58 -08:00
|
|
|
window-basic-main.hpp
|
2015-02-25 21:23:57 -08:00
|
|
|
window-basic-filters.hpp
|
2014-01-24 20:31:25 -08:00
|
|
|
window-basic-settings.hpp
|
2014-09-15 16:16:16 -07:00
|
|
|
window-basic-interaction.hpp
|
2014-03-23 01:07:54 -07:00
|
|
|
window-basic-properties.hpp
|
2015-02-06 03:17:33 -08:00
|
|
|
window-basic-main-outputs.hpp
|
2014-05-10 18:47:48 -07:00
|
|
|
window-basic-source-select.hpp
|
2014-07-13 11:36:47 -07:00
|
|
|
window-license-agreement.hpp
|
2014-07-06 16:19:27 -07:00
|
|
|
window-basic-status-bar.hpp
|
2014-12-28 00:38:00 -08:00
|
|
|
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
|
2014-01-20 07:58:58 -08:00
|
|
|
window-namedialog.hpp
|
2014-05-18 17:44:10 -07:00
|
|
|
window-log-reply.hpp
|
2015-04-04 00:37:02 -07:00
|
|
|
window-projector.hpp
|
2014-09-02 19:11:55 -07:00
|
|
|
window-remux.hpp
|
2014-03-23 01:07:54 -07:00
|
|
|
properties-view.hpp
|
2015-08-18 05:57:36 -07:00
|
|
|
properties-view.moc.hpp
|
2014-03-23 01:07:54 -07:00
|
|
|
display-helpers.hpp
|
2015-03-17 18:33:21 -07:00
|
|
|
double-slider.hpp
|
2015-03-23 19:15:19 -07:00
|
|
|
focus-list.hpp
|
2015-03-22 14:54:50 -07:00
|
|
|
mute-checkbox.hpp
|
2014-05-03 22:54:38 -07:00
|
|
|
volume-control.hpp
|
2014-12-28 00:38:00 -08:00
|
|
|
adv-audio-control.hpp
|
2015-06-27 18:44:36 -07:00
|
|
|
item-widget-helpers.hpp
|
2015-03-17 18:37:51 -07:00
|
|
|
visibility-checkbox.hpp
|
2015-01-03 02:42:57 -08:00
|
|
|
vertical-scroll-area.hpp
|
2015-03-17 19:00:10 -07:00
|
|
|
visibility-item-widget.hpp
|
2015-04-04 06:13:48 -07:00
|
|
|
slider-absoluteset-style.hpp
|
2015-01-04 11:24:51 -08:00
|
|
|
source-list-widget.hpp
|
2014-01-20 07:58:58 -08:00
|
|
|
qt-display.hpp
|
2015-01-02 17:11:27 -08:00
|
|
|
crash-report.hpp
|
2014-11-01 13:44:01 -07:00
|
|
|
hotkey-edit.hpp
|
2015-05-01 18:38:01 -07:00
|
|
|
source-label.hpp
|
2015-05-23 23:37:07 -07:00
|
|
|
remote-text.hpp
|
2015-07-02 00:52:59 -07:00
|
|
|
audio-encoders.hpp
|
2014-01-20 07:58:58 -08:00
|
|
|
qt-wrappers.hpp)
|
|
|
|
|
|
|
|
set(obs_UI
|
|
|
|
forms/NameDialog.ui
|
2014-07-13 11:36:47 -07:00
|
|
|
forms/OBSLicenseAgreement.ui
|
2014-05-18 17:44:10 -07:00
|
|
|
forms/OBSLogReply.ui
|
2014-01-20 07:58:58 -08:00
|
|
|
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
|
2014-03-23 01:07:54 -07:00
|
|
|
forms/OBSBasicSettings.ui
|
2014-05-10 18:47:48 -07:00
|
|
|
forms/OBSBasicSourceSelect.ui
|
2014-09-15 16:16:16 -07:00
|
|
|
forms/OBSBasicInteraction.ui
|
2014-09-02 19:11:55 -07:00
|
|
|
forms/OBSRemux.ui)
|
2014-01-20 07:58:58 -08:00
|
|
|
|
|
|
|
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})
|
2014-02-02 06:16:40 -08:00
|
|
|
|
|
|
|
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()
|
|
|
|
|
2014-01-20 07:58:58 -08:00
|
|
|
target_link_libraries(obs
|
|
|
|
libobs
|
2015-03-28 00:21:16 -07:00
|
|
|
libff
|
2014-05-18 18:02:57 -07:00
|
|
|
Qt5::Widgets
|
2015-05-23 23:37:07 -07:00
|
|
|
${LIBCURL_LIBRARIES}
|
2014-01-20 07:58:58 -08:00
|
|
|
${obs_PLATFORM_LIBRARIES})
|
|
|
|
|
2015-01-09 11:19:22 -08:00
|
|
|
define_graphic_modules(obs)
|
|
|
|
|
2014-01-20 07:58:58 -08:00
|
|
|
install_obs_core(obs)
|
2014-07-15 06:02:03 -07:00
|
|
|
install_obs_data(obs data obs-studio)
|
2014-08-02 07:12:53 -07:00
|
|
|
|
|
|
|
if (UNIX AND UNIX_STRUCTURE AND NOT APPLE)
|
|
|
|
install(FILES dist/obs.desktop DESTINATION share/applications)
|
|
|
|
install(FILES forms/images/obs.png
|
|
|
|
DESTINATION share/icons/hicolor/256x256/apps)
|
|
|
|
endif()
|