Skip to content

Commit

Permalink
base: Fix generated header inclusion
Browse files Browse the repository at this point in the history
  • Loading branch information
tytan652 authored and RytoEX committed Mar 27, 2023
1 parent c85d914 commit 21886ad
Show file tree
Hide file tree
Showing 18 changed files with 21 additions and 20 deletions.
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,8 @@ target_sources(

target_sources(obs-websocket PRIVATE deps/qr/cpp/QrCode.cpp deps/qr/cpp/QrCode.hpp)

configure_file(src/plugin-macros.h.in src/plugin-macros.generated.h)
target_sources(obs-websocket PRIVATE src/plugin-macros.generated.h)
configure_file(src/plugin-macros.h.in plugin-macros.generated.h)
target_sources(obs-websocket PRIVATE plugin-macros.generated.h)

target_compile_definitions(
obs-websocket PRIVATE ASIO_STANDALONE $<$<BOOL:PLUGIN_TESTS>:PLUGIN_TESTS>
Expand Down
5 changes: 3 additions & 2 deletions cmake/legacy.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,7 @@ find_package(Asio 1.12.1 REQUIRED)
add_definitions(-DASIO_STANDALONE)

# Configure files
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/src/plugin-macros.h.in
${CMAKE_CURRENT_SOURCE_DIR}/src/plugin-macros.generated.h)
configure_file(src/plugin-macros.h.in plugin-macros.generated.h)

# Setup target
add_library(obs-websocket MODULE)
Expand All @@ -49,6 +48,8 @@ if(_QT_VERSION EQUAL 6 AND OS_WINDOWS)
set_target_properties(obs-websocket PROPERTIES AUTORCC_OPTIONS "--format-version;1")
endif()

target_include_directories(obs-websocket PRIVATE ${CMAKE_CURRENT_BINARY_DIR})

target_sources(
obs-websocket
PRIVATE src/obs-websocket.cpp
Expand Down
2 changes: 1 addition & 1 deletion src/eventhandler/EventHandler.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ with this program. If not, see <https://www.gnu.org/licenses/>
#include "../obs-websocket.h"
#include "../utils/Obs.h"
#include "../utils/Obs_VolumeMeter.h"
#include "../plugin-macros.generated.h"
#include "plugin-macros.generated.h"

class EventHandler {
public:
Expand Down
2 changes: 1 addition & 1 deletion src/forms/ConnectInfo.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ with this program. If not, see <https://www.gnu.org/licenses/>

#include <QtWidgets/QDialog>

#include "../plugin-macros.generated.h"
#include "plugin-macros.generated.h"

#include "ui_ConnectInfo.h"

Expand Down
2 changes: 1 addition & 1 deletion src/forms/SettingsDialog.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ with this program. If not, see <https://www.gnu.org/licenses/>
#include <QTimer>

#include "ConnectInfo.h"
#include "../plugin-macros.generated.h"
#include "plugin-macros.generated.h"

#include "ui_SettingsDialog.h"

Expand Down
2 changes: 1 addition & 1 deletion src/requesthandler/RequestHandler.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ with this program. If not, see <https://www.gnu.org/licenses/>
#include "../websocketserver/rpc/WebSocketSession.h"
#include "../obs-websocket.h"
#include "../utils/Obs.h"
#include "../plugin-macros.generated.h"
#include "plugin-macros.generated.h"

class RequestHandler;
typedef RequestResult (RequestHandler::*RequestMethodHandler)(const Request &);
Expand Down
2 changes: 1 addition & 1 deletion src/utils/Crypto.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ with this program. If not, see <https://www.gnu.org/licenses/>
#include <QRandomGenerator>

#include "Crypto.h"
#include "../plugin-macros.generated.h"
#include "plugin-macros.generated.h"

static const char allowedChars[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
static const int allowedCharsCount = static_cast<int>(sizeof(allowedChars) - 1);
Expand Down
2 changes: 1 addition & 1 deletion src/utils/Json.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ with this program. If not, see <https://www.gnu.org/licenses/>

#include "Json.h"
#include "Platform.h"
#include "../plugin-macros.generated.h"
#include "plugin-macros.generated.h"

bool Utils::Json::JsonArrayIsValidObsArray(const json &j)
{
Expand Down
2 changes: 1 addition & 1 deletion src/utils/Obs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ with this program. If not, see <https://www.gnu.org/licenses/>
*/

#include "Obs.h"
#include "../plugin-macros.generated.h"
#include "plugin-macros.generated.h"
2 changes: 1 addition & 1 deletion src/utils/Obs_ActionHelper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ with this program. If not, see <https://www.gnu.org/licenses/>
*/

#include "Obs.h"
#include "../plugin-macros.generated.h"
#include "plugin-macros.generated.h"

struct CreateSceneItemData {
obs_source_t *source; // In
Expand Down
2 changes: 1 addition & 1 deletion src/utils/Obs_ArrayHelper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ with this program. If not, see <https://www.gnu.org/licenses/>
#include <algorithm>

#include "Obs.h"
#include "../plugin-macros.generated.h"
#include "plugin-macros.generated.h"

static std::vector<std::string> ConvertStringArray(char **array)
{
Expand Down
2 changes: 1 addition & 1 deletion src/utils/Obs_NumberHelper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ with this program. If not, see <https://www.gnu.org/licenses/>
#include <util/util_uint64.h>

#include "Obs.h"
#include "../plugin-macros.generated.h"
#include "plugin-macros.generated.h"

uint64_t Utils::Obs::NumberHelper::GetOutputDuration(obs_output_t *output)
{
Expand Down
2 changes: 1 addition & 1 deletion src/utils/Obs_ObjectHelper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ with this program. If not, see <https://www.gnu.org/licenses/>

#include "Obs.h"
#include "../obs-websocket.h"
#include "../plugin-macros.generated.h"
#include "plugin-macros.generated.h"

json Utils::Obs::ObjectHelper::GetStats()
{
Expand Down
2 changes: 1 addition & 1 deletion src/utils/Obs_SearchHelper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ with this program. If not, see <https://www.gnu.org/licenses/>
*/

#include "Obs.h"
#include "../plugin-macros.generated.h"
#include "plugin-macros.generated.h"

obs_hotkey_t *Utils::Obs::SearchHelper::GetHotkeyByName(std::string name)
{
Expand Down
2 changes: 1 addition & 1 deletion src/utils/Obs_StringHelper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ with this program. If not, see <https://www.gnu.org/licenses/>
#include <QString>

#include "Obs.h"
#include "../plugin-macros.generated.h"
#include "plugin-macros.generated.h"

#define CASE(x) \
case x: \
Expand Down
2 changes: 1 addition & 1 deletion src/utils/Platform.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ with this program. If not, see <https://www.gnu.org/licenses/>
#include <obs-frontend-api.h>

#include "Platform.h"
#include "../plugin-macros.generated.h"
#include "plugin-macros.generated.h"

std::string Utils::Platform::GetLocalAddress()
{
Expand Down
2 changes: 1 addition & 1 deletion src/websocketserver/WebSocketServer.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ with this program. If not, see <https://www.gnu.org/licenses/>
#include "types/WebSocketOpCode.h"
#include "../utils/Json.h"
#include "../requesthandler/rpc/Request.h"
#include "../plugin-macros.generated.h"
#include "plugin-macros.generated.h"

class WebSocketServer : QObject {
Q_OBJECT
Expand Down
2 changes: 1 addition & 1 deletion src/websocketserver/rpc/WebSocketSession.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ with this program. If not, see <https://www.gnu.org/licenses/>
#include <atomic>
#include <memory>

#include "../../plugin-macros.generated.h"
#include "plugin-macros.generated.h"

class WebSocketSession;
typedef std::shared_ptr<WebSocketSession> SessionPtr;
Expand Down

0 comments on commit 21886ad

Please sign in to comment.