As suggested in discussion #138 this change uses the CMake variable "ENABLE_UI" which is already defined by the obs-studio top-level project to allow for compilation without the obs frontend libraries and dependencies.
This Pull Request has three separate changes each contained in a separate commit:
adaced3: This commit replaces all occurrences of "CMAKE_PROJECT_NAME" with "PROJECT_NAME" in the Build Files. This is necessary because as of CMake 3.12, the variable CMAKE_PROJECT_NAME refers to the top-level project name which is "obs-studio" because the plugin is a sub-project of obs. PROJECT_NAME refers to the current project which is obs-rtspserver as intended.
2710c7b: This commit contains the necessary changes to enable compilation without the frontend. Besides the changes in the CMakeLists, I use a preprocessor definition (OBS_RTSPSERVER_ENABLE_UI) to decide whether to compile / run certain frontend sources files or not.
6ce0d09: Last but not least while testing with the MSVC compiler I encountered a compilation error with the rtsp-server/xop/CngMd5.cpp file due to the fact that a "goto" statement cannot jump over local variable declaration statements. This is also fixed this commit.
One can use the non-frontend version of the plugin by creating an obs-output with output type "rtsp_output", setting the desired properties and attaching a custom video and audio encoder.
As suggested in discussion #138 this change uses the CMake variable "ENABLE_UI" which is already defined by the obs-studio top-level project to allow for compilation without the obs frontend libraries and dependencies.
This Pull Request has three separate changes each contained in a separate commit:
One can use the non-frontend version of the plugin by creating an obs-output with output type "rtsp_output", setting the desired properties and attaching a custom video and audio encoder.