mirror of
https://github.com/aseprite/aseprite.git
synced 2025-03-01 10:13:22 +00:00
Add CMake option to disable websockets
This commit is contained in:
parent
711741a358
commit
4354be1d7a
@ -70,6 +70,7 @@ option(ENABLE_MEMLEAK "Enable memory-leaks detector (only for developers)"
|
|||||||
option(ENABLE_NEWS "Enable the news in Home tab" on)
|
option(ENABLE_NEWS "Enable the news in Home tab" on)
|
||||||
option(ENABLE_UPDATER "Enable automatic check for updates" on)
|
option(ENABLE_UPDATER "Enable automatic check for updates" on)
|
||||||
option(ENABLE_SCRIPTING "Compile with scripting support" on)
|
option(ENABLE_SCRIPTING "Compile with scripting support" on)
|
||||||
|
option(ENABLE_WEBSOCKET "Compile with websocket support" on)
|
||||||
option(ENABLE_TESTS "Compile unit tests" off)
|
option(ENABLE_TESTS "Compile unit tests" off)
|
||||||
option(ENABLE_BENCHMARKS "Compile benchmarks" off)
|
option(ENABLE_BENCHMARKS "Compile benchmarks" off)
|
||||||
option(ENABLE_TRIAL_MODE "Compile the trial version" off)
|
option(ENABLE_TRIAL_MODE "Compile the trial version" off)
|
||||||
|
@ -74,6 +74,11 @@ if(ENABLE_SCRIPTING)
|
|||||||
add_definitions(-DENABLE_SCRIPTING)
|
add_definitions(-DENABLE_SCRIPTING)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if(ENABLE_WEBSOCKET)
|
||||||
|
# Needed for "app" and "main"
|
||||||
|
add_definitions(-DENABLE_WEBSOCKET)
|
||||||
|
endif()
|
||||||
|
|
||||||
######################################################################
|
######################################################################
|
||||||
# Aseprite Libraries (in preferred order to be built)
|
# Aseprite Libraries (in preferred order to be built)
|
||||||
|
|
||||||
|
@ -147,6 +147,10 @@ if(ENABLE_SCRIPTING)
|
|||||||
commands/cmd_open_script_folder.cpp
|
commands/cmd_open_script_folder.cpp
|
||||||
ui/devconsole_view.cpp)
|
ui/devconsole_view.cpp)
|
||||||
endif()
|
endif()
|
||||||
|
if(ENABLE_WEBSOCKET)
|
||||||
|
set(scripting_files_ws
|
||||||
|
script/websocket_class.cpp)
|
||||||
|
endif()
|
||||||
set(scripting_files
|
set(scripting_files
|
||||||
commands/cmd_run_script.cpp
|
commands/cmd_run_script.cpp
|
||||||
script/app_command_object.cpp
|
script/app_command_object.cpp
|
||||||
@ -189,8 +193,8 @@ if(ENABLE_SCRIPTING)
|
|||||||
script/tool_class.cpp
|
script/tool_class.cpp
|
||||||
script/values.cpp
|
script/values.cpp
|
||||||
script/version_class.cpp
|
script/version_class.cpp
|
||||||
script/websocket_class.cpp
|
|
||||||
shell.cpp
|
shell.cpp
|
||||||
|
${scripting_files_ws}
|
||||||
${scripting_files_ui})
|
${scripting_files_ui})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
@ -674,7 +678,11 @@ if(REQUIRE_CURL)
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(ENABLE_SCRIPTING)
|
if(ENABLE_SCRIPTING)
|
||||||
target_link_libraries(app-lib lua lauxlib lualib ixwebsocket)
|
target_link_libraries(app-lib lua lauxlib lualib)
|
||||||
|
|
||||||
|
if(ENABLE_WEBSOCKET)
|
||||||
|
target_link_libraries(app-lib ixwebsocket)
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(ENABLE_UPDATER)
|
if(ENABLE_UPDATER)
|
||||||
|
@ -412,7 +412,9 @@ Engine::Engine()
|
|||||||
register_tags_class(L);
|
register_tags_class(L);
|
||||||
register_tool_class(L);
|
register_tool_class(L);
|
||||||
register_version_class(L);
|
register_version_class(L);
|
||||||
|
#if ENABLE_WEBSOCKET
|
||||||
register_websocket_class(L);
|
register_websocket_class(L);
|
||||||
|
#endif
|
||||||
|
|
||||||
// Check that we have a clean start (without dirty in the stack)
|
// Check that we have a clean start (without dirty in the stack)
|
||||||
ASSERT(lua_gettop(L) == top);
|
ASSERT(lua_gettop(L) == top);
|
||||||
|
9
third_party/CMakeLists.txt
vendored
9
third_party/CMakeLists.txt
vendored
@ -160,7 +160,10 @@ if(ENABLE_SCRIPTING)
|
|||||||
target_include_directories(lualib PUBLIC lua)
|
target_include_directories(lualib PUBLIC lua)
|
||||||
target_link_libraries(lauxlib lua)
|
target_link_libraries(lauxlib lua)
|
||||||
|
|
||||||
# ixwebsocket
|
# ixwebsocket
|
||||||
add_subdirectory(ixwebsocket)
|
if(ENABLE_WEBSOCKET)
|
||||||
target_include_directories(ixwebsocket PUBLIC)
|
add_subdirectory(IXWebSocket)
|
||||||
|
target_include_directories(ixwebsocket PUBLIC)
|
||||||
|
endif()
|
||||||
|
|
||||||
endif()
|
endif()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user