1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2024-12-25 01:03:01 +00:00
transmission/web/CMakeLists.txt
Mike Gelfand bc380511db
Modernize CMake code (ongoing refactoring) (#4507)
* Reformat CMake code

* Bump minimum CMake version to 3.12

* Add target sources separately via `target_source()`

* Make `tr_win32_app_info()` add target sources on its own

* Don't use `include_directories()`

* Don't use `add_definitions()`

* Limit use of `add_compile_options()`

* Move VDKQueue target declaration to a subdirectory

* Add `tr_disable_source_files_compile()` helper

* Add `tr_target_glib_resources()` helper

* Add `tr_gettext_msgfmt()` helper

* Enable AUTOUIC for Qt client

* Enable AUTORCC for Qt client

* Remove AUTO{MOC,RCC,UIC} source group overrides

* Add `tr_target_idl_files()` helper

* Move source group setup to `tr_qt_add_translation()`

* Add `tr_target_xib_files()` helper

* Prefer `target_sources()` to intermediate variables

* Use explicit visibility versions of `target_*()` commands

* Prefer genexes to conditions in `target_*()` commands

* Add `tr_allow_compile_if()` helper

* Leave only top-level `project()`, remove the rest

* Minor fixups

* Fixup Mac QL plugin install

* Fixup IDE target folders and source groups
2023-01-01 19:49:48 +00:00

59 lines
1.8 KiB
CMake

set(TRWEB_SRCS
src/about-dialog.js
src/action-manager.js
src/alert-dialog.js
src/context-menu.js
src/file-row.js
src/formatter.js
src/inspector.js
src/main.js
src/move-dialog.js
src/notifications.js
src/open-dialog.js
src/overflow-menu.js
src/prefs-dialog.js
src/prefs.js
src/remote.js
src/remove-dialog.js
src/rename-dialog.js
src/shortcuts-dialog.js
src/statistics-dialog.js
src/torrent.js
src/torrent-row.js
src/transmission.js
src/utils.js
assets/css/transmission-app.scss)
set(TRWEB_IMGS
assets/img/box.svg
assets/img/film.svg
assets/img/modern-tortoise-blue.png
assets/img/modern-tortoise.png
assets/img/chevron-down.svg
assets/img/chevron-up.svg
assets/img/horizontal-rule.svg
assets/img/lock-fill.svg
assets/img/logo.png
assets/img/image.svg
assets/img/magnet.svg
assets/img/music.svg
assets/img/file-text.svg
assets/img/package.svg
assets/img/folder.svg
assets/img/pause-circle-active.svg
assets/img/pause-circle-idle.svg
assets/img/play-circle-active.svg
assets/img/play-circle-idle.svg
assets/img/router.svg
assets/img/type.svg)
add_custom_target(trweb ALL
COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_CURRENT_SOURCE_DIR}/package.json" "${CMAKE_CURRENT_BINARY_DIR}/package.json"
COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_CURRENT_SOURCE_DIR}/yarn.lock" "${CMAKE_CURRENT_BINARY_DIR}/yarn.lock"
COMMAND yarn install
COMMAND yarn webpack --config "${CMAKE_CURRENT_SOURCE_DIR}/webpack.config.js" --context "${CMAKE_CURRENT_SOURCE_DIR}"
BYPRODUCTS
public_html/transmission-app.js
public_html/transmission-app.js.LICENSE.txt
DEPENDS ${TRWEB_IMGS}
SOURCES ${TRWEB_SRCS})