mirror of
https://github.com/Palakis/obs-websocket.git
synced 2024-08-30 18:12:16 +00:00
CMakeLists: Add runtime tests flag
This commit is contained in:
parent
8fbcbad9ec
commit
b490e4409b
@ -36,6 +36,10 @@ if(NOT CMAKE_BUILD_TYPE)
|
||||
endif()
|
||||
|
||||
|
||||
# Plugin tests flag
|
||||
option(PLUGIN_TESTS "Enable plugin runtime tests" OFF)
|
||||
|
||||
|
||||
# Qt build stuff
|
||||
set(CMAKE_PREFIX_PATH "${QTDIR}")
|
||||
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
||||
@ -177,6 +181,10 @@ target_link_libraries(obs-websocket
|
||||
Qt5::Network
|
||||
nlohmann_json::nlohmann_json)
|
||||
|
||||
if(PLUGIN_TESTS)
|
||||
target_compile_definitions(obs-websocket PRIVATE PLUGIN_TESTS)
|
||||
endif()
|
||||
|
||||
|
||||
# Windows-specific build settings and tasks
|
||||
if(WIN32)
|
||||
|
@ -170,9 +170,7 @@ void WebSocketApiEventCallback(std::string vendorName, std::string eventType, ob
|
||||
_webSocketServer->BroadcastEvent(EventSubscription::Vendors, "VendorEvent", broadcastEventData);
|
||||
}
|
||||
|
||||
|
||||
#define PLUGIN_API_TEST
|
||||
#ifdef PLUGIN_API_TEST
|
||||
#ifdef PLUGIN_TESTS
|
||||
|
||||
static void test_vendor_request_cb(obs_data_t *requestData, obs_data_t *responseData, void *priv_data)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user