Commit d411da64 authored by Volker Krause's avatar Volker Krause
Browse files

Allow to force installation of the Plymouth theme into CMAKE_PREFIX_PATH

This will likely not result in a working installation, but the correct
paths are typically not user-writable. Useful for example on the CI.
parent 8371577a
......@@ -33,6 +33,18 @@ set(DISTRO_VERSION "" CACHE STRING "Version to use on splash screen") # prefer t
add_feature_info(DISTRO_NAME On "name to use on splash screen is '${DISTRO_NAME}'")
add_feature_info(DISTRO_VERSION On "extra version to use on splash screen is '${DISTRO_VERSION}'")
# Allow to force installation into CMAKE_INSTALL_PREFIX, even if that would
# result in a non-functional installation. This is needed e.g. for the CI
option(INSTALL_BROKEN_PLYMOUTH_DATA "Force installation into CMAKE_INSTALL_PREFIX, will possibly result in a non-functional installation and is only intended for CI/development use!" OFF)
if (INSTALL_BROKEN_PLYMOUTH_DATA)
message(WARNING "Installing Plymouth theme to the wrong location!")
set(PLYMOUTH_THEME_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/${Plymouth_THEMESDIR}")
set(PLYMOUTH_PLUGIN_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/${Plymouth_PLUGINSDIR}")
else()
set(PLYMOUTH_THEME_INSTALL_DIR ${Plymouth_THEMESDIR})
set(PLYMOUTH_PLUGIN_INSTALL_DIR ${Plymouth_PLUGINSDIR})
endif()
add_subdirectory(breeze-text)
add_subdirectory(breeze)
......
add_library(breeze-text MODULE plugin.c ply-text-progress-bar.c)
target_link_libraries(breeze-text ${Plymouth_LIBRARIES} ${MATH_LIBRARY})
target_include_directories(breeze-text PRIVATE ${Plymouth_INCLUDE_DIRS})
install(TARGETS breeze-text DESTINATION ${Plymouth_PLUGINSDIR})
install(TARGETS breeze-text DESTINATION ${PLYMOUTH_PLUGIN_INSTALL_DIR})
configure_file(breeze-text.plymouth.cmake ${CMAKE_CURRENT_BINARY_DIR}/breeze-text.plymouth)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/breeze-text.plymouth preview.png
DESTINATION ${Plymouth_THEMESDIR}/breeze-text)
DESTINATION ${PLYMOUTH_THEME_INSTALL_DIR}/breeze-text)
......@@ -13,6 +13,6 @@ install(FILES breeze.grub
preview.png
${CMAKE_CURRENT_BINARY_DIR}/breeze.script
${CMAKE_CURRENT_BINARY_DIR}/breeze.plymouth
DESTINATION ${Plymouth_THEMESDIR}/breeze)
DESTINATION ${PLYMOUTH_THEME_INSTALL_DIR}/breeze)
install(DIRECTORY images
DESTINATION ${Plymouth_THEMESDIR}/breeze)
DESTINATION ${PLYMOUTH_THEME_INSTALL_DIR}/breeze)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment