build: only install necessary qml module files
This commit is contained in:
parent
2e18340995
commit
1168879d6d
22 changed files with 130 additions and 19 deletions
|
@ -64,8 +64,7 @@ boption(SERVICE_GREETD "Greetd" ON)
|
|||
boption(SERVICE_UPOWER "UPower" ON)
|
||||
boption(SERVICE_NOTIFICATIONS "Notifications" ON)
|
||||
|
||||
set(INSTALL_QMLDIR "" CACHE STRING "QML install dir")
|
||||
set(INSTALL_QML_PREFIX "" CACHE STRING "QML install prefix")
|
||||
include(cmake/install-qml-module.cmake)
|
||||
|
||||
add_compile_options(-Wall -Wextra)
|
||||
|
||||
|
@ -157,23 +156,6 @@ if (USE_JEMALLOC)
|
|||
target_link_libraries(quickshell PRIVATE ${JEMALLOC_LIBRARIES})
|
||||
endif()
|
||||
|
||||
if ("${INSTALL_QMLDIR}" STREQUAL "" AND "${INSTALL_QML_PREFIX}" STREQUAL "")
|
||||
message(WARNING "Neither INSTALL_QMLDIR nor INSTALL_QML_PREFIX is set. QML modules will not be installed.")
|
||||
else()
|
||||
if ("${INSTALL_QMLDIR}" STREQUAL "")
|
||||
set(INSTALLDIR "${CMAKE_INSTALL_PREFIX}/${INSTALL_QML_PREFIX}")
|
||||
else()
|
||||
set(INSTALLDIR "${INSTALL_QMLDIR}")
|
||||
endif()
|
||||
|
||||
message(STATUS "QML install dir: ${INSTALLDIR}")
|
||||
install(
|
||||
DIRECTORY ${CMAKE_BINARY_DIR}/qml_modules/
|
||||
DESTINATION ${INSTALLDIR}
|
||||
FILES_MATCHING PATTERN "*"
|
||||
)
|
||||
endif()
|
||||
|
||||
install(CODE "
|
||||
execute_process(
|
||||
COMMAND ${CMAKE_COMMAND} -E create_symlink \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue