1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2025-01-03 13:35:36 +00:00

build: renamed ENABLE_WEB build option for clarity (#4760)

This commit is contained in:
Charles Kerr 2023-02-08 17:47:07 -06:00 committed by GitHub
parent 6576a2a1db
commit 7a686a53f3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 9 deletions

View file

@ -46,7 +46,7 @@ option(ENABLE_DAEMON "Build daemon" ON)
tr_auto_option(ENABLE_GTK "Build GTK client" AUTO) tr_auto_option(ENABLE_GTK "Build GTK client" AUTO)
tr_auto_option(ENABLE_QT "Build Qt client" AUTO) tr_auto_option(ENABLE_QT "Build Qt client" AUTO)
tr_auto_option(ENABLE_MAC "Build Mac client" AUTO) tr_auto_option(ENABLE_MAC "Build Mac client" AUTO)
tr_auto_option(ENABLE_WEB "Build Web client" AUTO) tr_auto_option(REBUILD_WEB "Rebuild the web client's generated assets. Requires Node.js and network access." OFF)
option(ENABLE_UTILS "Build utils (create, edit, show)" ON) option(ENABLE_UTILS "Build utils (create, edit, show)" ON)
option(ENABLE_CLI "Build command-line client" OFF) option(ENABLE_CLI "Build command-line client" OFF)
option(ENABLE_TESTS "Build unit tests" ON) option(ENABLE_TESTS "Build unit tests" ON)
@ -503,13 +503,13 @@ endif()
tr_add_external_auto_library(B64 libb64 b64 tr_add_external_auto_library(B64 libb64 b64
TARGET libb64::libb64) TARGET libb64::libb64)
if(NOT ${ENABLE_WEB} STREQUAL "OFF") if(NOT ${REBUILD_WEB} STREQUAL "OFF")
find_program(NPM npm) find_program(NPM npm)
if ("${NPM}" STREQUAL "NPM-NOTFOUND") if ("${NPM}" STREQUAL "NPM-NOTFOUND")
if ("${ENABLE_WEB}" STREQUAL "ON") if ("${REBUILD_WEB}" STREQUAL "ON")
message(FATAL_ERROR "Could NOT find NPM, minimum required is \"${NPM_MINIMUM}\"") message(FATAL_ERROR "Could NOT find NPM, minimum required is \"${NPM_MINIMUM}\"")
else() # AUTO else() # AUTO
set(ENABLE_WEB OFF) set(REBUILD_WEB OFF)
endif() endif()
else() else()
execute_process(COMMAND "${NPM}" --version execute_process(COMMAND "${NPM}" --version
@ -517,14 +517,17 @@ if(NOT ${ENABLE_WEB} STREQUAL "OFF")
OUTPUT_VARIABLE NPM_VERSION_STRING) OUTPUT_VARIABLE NPM_VERSION_STRING)
if ("${NPM_VERSION_STRING}" VERSION_GREATER_EQUAL "${NPM_MINIMUM}") if ("${NPM_VERSION_STRING}" VERSION_GREATER_EQUAL "${NPM_MINIMUM}")
message(STATUS "Found NPM: ${NPM} (found suitable version \"${NPM_VERSION_STRING}\", minimum required is \"${NPM_MINIMUM}\")") message(STATUS "Found NPM: ${NPM} (found suitable version \"${NPM_VERSION_STRING}\", minimum required is \"${NPM_MINIMUM}\")")
set(ENABLE_WEB ON) set(REBUILD_WEB ON)
elseif ("${ENABLE_WEB}" STREQUAL "ON") elseif ("${REBUILD_WEB}" STREQUAL "ON")
message(FATAL_ERROR "Found NPM: ${NPM} Found unsuitable version \"${NPM_VERSION_STRING}\", but required is at least \"${NPM_MINIMUM}\"") message(FATAL_ERROR "Found NPM: ${NPM} Found unsuitable version \"${NPM_VERSION_STRING}\", but required is at least \"${NPM_MINIMUM}\"")
else() # AUTO else() # AUTO
message(STATUS "Found NPM: ${NPM} Found unsuitable version \"${NPM_VERSION_STRING}\", but required is at least \"${NPM_MINIMUM}\"") message(STATUS "Found NPM: ${NPM} Found unsuitable version \"${NPM_VERSION_STRING}\", but required is at least \"${NPM_MINIMUM}\"")
set(ENABLE_WEB OFF) set(REBUILD_WEB OFF)
endif() endif()
endif() endif()
if(REBUILD_WEB)
add_subdirectory(web)
endif()
endif() endif()
if(WITH_INOTIFY) if(WITH_INOTIFY)
@ -749,7 +752,7 @@ if(ENABLE_GTK AND ENABLE_NLS)
add_subdirectory(po) add_subdirectory(po)
endif() endif()
foreach(P cli daemon gtk mac qt utils web) foreach(P cli daemon gtk mac qt utils)
string(TOUPPER "${P}" P_ID) string(TOUPPER "${P}" P_ID)
if(ENABLE_${P_ID}) if(ENABLE_${P_ID})
if(DEFINED ${P_ID}_PROJECT_DIR) if(DEFINED ${P_ID}_PROJECT_DIR)

View file

@ -160,7 +160,6 @@ To configure which components are built use the flags below.
Each option can be set to `ON` or `OFF`, values shown below are the defaults. Each option can be set to `ON` or `OFF`, values shown below are the defaults.
* `-DENABLE_DAEMON=ON` - build transmission daemon * `-DENABLE_DAEMON=ON` - build transmission daemon
* `-DENABLE_QT=AUTO` - build the Qt client * `-DENABLE_QT=AUTO` - build the Qt client
* `-DENABLE_WEB=OFF` - build the Web client
* `-DENABLE_UTILS=ON` - build transmission-remote, transmission-create, transmission-edit and transmission-show cli tools * `-DENABLE_UTILS=ON` - build transmission-remote, transmission-create, transmission-edit and transmission-show cli tools
* `-DENABLE_CLI=OFF` - build the cli client * `-DENABLE_CLI=OFF` - build the cli client