mirror of
https://github.com/Xaymar/obs-StreamFX
synced 2024-12-29 11:01:23 +00:00
cmake: Version 0.3.0
- Improved cmake script to allow packaging from within the IDE. - Fixed a crash/freeze caused by not closing the rendering context. Blur Filter: - Reduced blur CPU usage and GPU usage. - Fixed LOD being calculated causing slower rendering. - Fixed an issue where the effect would randomly not load depending on the actions before starting obs. - Improved rendering speed via pre-calculated Blur Kernel for those filters supporting it. - Added 'Color Format' option to improve de-noise type blur for cameras. - Added 'Bilateral Blur', a de-noise type blur which can be used to reduce low frequency noise. - Changed default blur size to 5 pixels. - Improved effect loading to only compile the shader once instead of every time. Transform Filter: - Added shearing support allowing for more weird shapes to be rendered. - Fixed camera aspect ratio when source width is smaller than source height. - Fixed scaling being affected by rotation. - Fixed an issue with the mesh reconstruction logic causing invisible sources. Displace Filter:
This commit is contained in:
parent
c7cfbff7dd
commit
a0eb5444cd
1 changed files with 42 additions and 42 deletions
|
@ -1,25 +1,26 @@
|
||||||
cmake_minimum_required(VERSION 2.8.12)
|
cmake_minimum_required(VERSION 3.2)
|
||||||
PROJECT(obs-stream-effects)
|
PROJECT(obs-stream-effects)
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
# Version
|
# Version
|
||||||
################################################################################
|
################################################################################
|
||||||
SET(VERSION_MAJOR 0)
|
SET(VERSION_MAJOR 0)
|
||||||
SET(VERSION_MINOR 2)
|
SET(VERSION_MINOR 3)
|
||||||
SET(VERSION_PATCH 0)
|
SET(VERSION_PATCH 0)
|
||||||
#configure_file(
|
SET(VERSION_STR "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}")
|
||||||
# "${PROJECT_SOURCE_DIR}/#Resources/package.in.bat"
|
|
||||||
# "${PROJECT_SOURCE_DIR}/#Resources/package.bat"
|
|
||||||
#)
|
|
||||||
#configure_file(
|
|
||||||
# "${PROJECT_SOURCE_DIR}/#Resources/Installer.in.iss"
|
|
||||||
# "${PROJECT_SOURCE_DIR}/#Resources/Installer.iss"
|
|
||||||
#)
|
|
||||||
configure_file(
|
configure_file(
|
||||||
"${PROJECT_SOURCE_DIR}/source/version.h.in"
|
"${PROJECT_SOURCE_DIR}/source/version.h.in"
|
||||||
"${PROJECT_BINARY_DIR}/source/version.h"
|
"${PROJECT_BINARY_DIR}/source/version.h"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
################################################################################
|
||||||
|
# Configuration
|
||||||
|
################################################################################
|
||||||
|
math(EXPR BITS "8*${CMAKE_SIZEOF_VOID_P}")
|
||||||
|
|
||||||
|
SET(INSTALL_DIR "${PROJECT_BINARY_DIR}/distribute" CACHE PATH "Installation directory")
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
# Code
|
# Code
|
||||||
################################################################################
|
################################################################################
|
||||||
|
@ -89,8 +90,6 @@ source_group("Data Files\\Effects" FILES ${obs-stream-effects_EFFECTS})
|
||||||
################################################################################
|
################################################################################
|
||||||
if(TARGET libobs)
|
if(TARGET libobs)
|
||||||
# OBS Studio Specific
|
# OBS Studio Specific
|
||||||
|
|
||||||
# Directories
|
|
||||||
INCLUDE_DIRECTORIES(
|
INCLUDE_DIRECTORIES(
|
||||||
"${CMAKE_SOURCE_DIR}"
|
"${CMAKE_SOURCE_DIR}"
|
||||||
"${PROJECT_BINARY_DIR}"
|
"${PROJECT_BINARY_DIR}"
|
||||||
|
@ -101,7 +100,6 @@ if(TARGET libobs)
|
||||||
SET(LIBOBS_LIBRARIES libobs)
|
SET(LIBOBS_LIBRARIES libobs)
|
||||||
else()
|
else()
|
||||||
# Standlone Specific
|
# Standlone Specific
|
||||||
|
|
||||||
SET(PATH_OBSStudio "" CACHE PATH "OBS Studio Source Code Directory")
|
SET(PATH_OBSStudio "" CACHE PATH "OBS Studio Source Code Directory")
|
||||||
if(PATH_OBSStudio STREQUAL "")
|
if(PATH_OBSStudio STREQUAL "")
|
||||||
message(FATAL_ERROR "PATH_OBSStudio not set!")
|
message(FATAL_ERROR "PATH_OBSStudio not set!")
|
||||||
|
@ -125,6 +123,19 @@ else()
|
||||||
"${PATH_OBSStudio}"
|
"${PATH_OBSStudio}"
|
||||||
)
|
)
|
||||||
add_definitions(-D_CRT_SECURE_NO_WARNINGS)
|
add_definitions(-D_CRT_SECURE_NO_WARNINGS)
|
||||||
|
|
||||||
|
# All Warnings, Extra Warnings, Pedantic
|
||||||
|
if(MSVC)
|
||||||
|
# Force to always compile with W4
|
||||||
|
if(CMAKE_CXX_FLAGS MATCHES "/W[0-4]")
|
||||||
|
string(REGEX REPLACE "/W[0-4]" "/W4" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
|
||||||
|
else()
|
||||||
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W4")
|
||||||
|
endif()
|
||||||
|
elseif(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX)
|
||||||
|
# Update if necessary
|
||||||
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wno-long-long -pedantic")
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
|
@ -144,33 +155,22 @@ TARGET_LINK_LIBRARIES(obs-stream-effects
|
||||||
if(TARGET libobs)
|
if(TARGET libobs)
|
||||||
install_obs_plugin_with_data(obs-stream-effects data)
|
install_obs_plugin_with_data(obs-stream-effects data)
|
||||||
else()
|
else()
|
||||||
# All Warnings, Extra Warnings, Pedantic
|
INSTALL(TARGETS obs-stream-effects DESTINATION "${INSTALL_DIR}/obs-plugins/${BITS}bit")
|
||||||
if(MSVC)
|
INSTALL(FILES $<TARGET_PDB_FILE:obs-stream-effects> DESTINATION "${INSTALL_DIR}/obs-plugins/${BITS}bit" OPTIONAL)
|
||||||
# Force to always compile with W4
|
INSTALL(DIRECTORY "${PROJECT_SOURCE_DIR}/data" DESTINATION "${INSTALL_DIR}/data/obs-plugins/obs-stream-effects" OPTIONAL)
|
||||||
if(CMAKE_CXX_FLAGS MATCHES "/W[0-4]")
|
|
||||||
string(REGEX REPLACE "/W[0-4]" "/W4" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
|
# Zip Generator
|
||||||
else()
|
ADD_CUSTOM_TARGET(PACKAGE_ZIP COMMAND
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W4")
|
${CMAKE_COMMAND} -E tar "cfv"
|
||||||
endif()
|
"${INSTALL_DIR}/obs-stream-effects.${VERSION_STR}.zip"
|
||||||
elseif(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX)
|
--format=zip
|
||||||
# Update if necessary
|
"${INSTALL_DIR}/data" "${INSTALL_DIR}/obs-plugins")
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wno-long-long -pedantic")
|
|
||||||
endif()
|
# 7-Zip Generator
|
||||||
|
ADD_CUSTOM_TARGET(PACKAGE_7ZIP COMMAND
|
||||||
math(EXPR BITS "8*${CMAKE_SIZEOF_VOID_P}")
|
${CMAKE_COMMAND} -E tar "cfv"
|
||||||
add_custom_command(TARGET obs-stream-effects POST_BUILD
|
"${INSTALL_DIR}/obs-stream-effects.${VERSION_STR}.7z"
|
||||||
COMMAND ${CMAKE_COMMAND} -E copy_directory
|
--format=7zip
|
||||||
"${PROJECT_SOURCE_DIR}/data"
|
"${INSTALL_DIR}/data" "${INSTALL_DIR}/obs-plugins")
|
||||||
"${PROJECT_SOURCE_DIR}/#Build/data/obs-plugins/obs-stream-effects"
|
|
||||||
)
|
|
||||||
add_custom_command(TARGET obs-stream-effects POST_BUILD
|
|
||||||
COMMAND ${CMAKE_COMMAND} -E copy
|
|
||||||
"$<TARGET_FILE:obs-stream-effects>"
|
|
||||||
"${PROJECT_SOURCE_DIR}/#Build/obs-plugins/${BITS}bit/$<TARGET_FILE_NAME:obs-stream-effects>"
|
|
||||||
)
|
|
||||||
add_custom_command(TARGET obs-stream-effects POST_BUILD
|
|
||||||
COMMAND ${CMAKE_COMMAND} -E copy
|
|
||||||
"$<TARGET_FILE_DIR:obs-stream-effects>/obs-stream-effects.pdb"
|
|
||||||
"${PROJECT_SOURCE_DIR}/#Build/obs-plugins/${BITS}bit/obs-stream-effects.pdb"
|
|
||||||
)
|
|
||||||
endif()
|
endif()
|
||||||
|
|
Loading…
Reference in a new issue