Merge pull request #11 from cireu/fix-build-system

Allow user to specify custom prefix for resource files.
pull/15/head
Reion Wong 4 years ago committed by GitHub
commit 7cc450fce9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -18,6 +18,8 @@ find_package(ECM REQUIRED NO_MODULE)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${ECM_MODULE_PATH})
include(GNUInstallDirs)
add_subdirectory(polkit-agent)
add_subdirectory(screen-brightness)
add_subdirectory(session)

@ -13,5 +13,11 @@ target_link_libraries(${TARGET}
Qt5::X11Extras
)
configure_file(
org.cutefish.cpufreq.pkexec.policy.in
org.cutefish.cpufreq.pkexec.policy
@ONLY
)
install(TARGETS ${TARGET} DESTINATION ${CMAKE_INSTALL_BINDIR})
install(FILES org.cutefish.cpufreq.pkexec.policy DESTINATION /usr/share/polkit-1/actions/)
install(FILES org.cutefish.cpufreq.pkexec.policy DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/polkit-1/actions/)

@ -10,6 +10,6 @@
<allow_inactive>no</allow_inactive>
<allow_active>yes</allow_active>
</defaults>
<annotate key="org.freedesktop.policykit.exec.path">/usr/bin/cutefish-cpufreq</annotate>
<annotate key="org.freedesktop.policykit.exec.path">@CMAKE_INSTALL_FULL_BINDIR@/cutefish-cpufreq</annotate>
</action>
</policyconfig>
</policyconfig>

@ -41,8 +41,8 @@ install(TARGETS cutefish-polkit-agent
install(FILES
cutefish-polkit-agent.desktop
DESTINATION "/etc/xdg/autostart"
DESTINATION "${CMAKE_INSTALL_FULL_SYSCONFDIR}/xdg/autostart"
COMPONENT Runtime
)
install(FILES ${QM_FILES} DESTINATION /usr/share/cutefish-polkit-agent/translations)
install(FILES ${QM_FILES} DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/cutefish-polkit-agent/translations)

@ -17,5 +17,11 @@ target_link_libraries(${PROJECT_NAME}
Qt5::Widgets
)
configure_file(
org.cutefish.brightness.pkexec.policy.in
org.cutefish.brightness.pkexec.policy
@ONLY
)
install(TARGETS ${PROJECT_NAME} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
install(FILES org.cutefish.brightness.pkexec.policy DESTINATION /usr/share/polkit-1/actions/)
install(FILES org.cutefish.brightness.pkexec.policy DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/polkit-1/actions/)

@ -10,6 +10,6 @@
<allow_inactive>no</allow_inactive>
<allow_active>yes</allow_active>
</defaults>
<annotate key="org.freedesktop.policykit.exec.path">/usr/bin/cutefish-screen-brightness</annotate>
<annotate key="org.freedesktop.policykit.exec.path">@CMAKE_INSTALL_FULL_BINDIR@/cutefish-screen-brightness</annotate>
</action>
</policyconfig>
</policyconfig>

@ -31,4 +31,4 @@ target_link_libraries(${TARGET}
)
install(TARGETS ${TARGET} DESTINATION ${CMAKE_INSTALL_BINDIR})
install(FILES cutefish-xsession.desktop DESTINATION /usr/share/xsessions/)
install(FILES cutefish-xsession.desktop DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/xsessions/)

@ -73,4 +73,4 @@ add_custom_target(translations DEPENDS ${QM_FILES} SOURCES ${TS_FILES})
add_dependencies(${TARGET} translations)
install(TARGETS ${TARGET} DESTINATION ${CMAKE_INSTALL_BINDIR})
install(FILES ${QM_FILES} DESTINATION /usr/share/${TARGET}/translations)
install(FILES ${QM_FILES} DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/${TARGET}/translations)

@ -18,6 +18,6 @@ file(GLOB TS_FILES translations/*.ts)
qt5_create_translation(QM_FILES ${TS_FILES})
add_custom_target(shutdown-translations DEPENDS ${QM_FILES} SOURCES ${TS_FILES})
add_dependencies(cutefish-shutdown shutdown-translations)
install(FILES ${QM_FILES} DESTINATION /usr/share/cutefish-shutdown/translations)
install(FILES ${QM_FILES} DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/cutefish-shutdown/translations)
install(TARGETS cutefish-shutdown RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})

Loading…
Cancel
Save