File: CMakeLists.txt

package info (click to toggle)
deviceinfo 0.2.4-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 408 kB
  • sloc: cpp: 1,488; ansic: 33; makefile: 10
file content (23 lines) | stat: -rw-r--r-- 805 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
add_executable(update-machine-info-from-deviceinfo
    update-machine-info-from-deviceinfo.cpp
)
target_link_libraries(update-machine-info-from-deviceinfo
    deviceinfo
    PkgConfig::GLib
)
install(TARGETS update-machine-info-from-deviceinfo DESTINATION ${CMAKE_INSTALL_LIBEXECDIR})

configure_file(
    update-machine-info-from-deviceinfo.service.in
    "${CMAKE_CURRENT_BINARY_DIR}/update-machine-info-from-deviceinfo.service"
    @ONLY
)
pkg_get_variable(SYSTEMD_SYSTEM_UNIT_DIR systemd systemdsystemunitdir)
if(SYSTEMD_SYSTEM_UNIT_DIR)
    install(
        FILES "${CMAKE_CURRENT_BINARY_DIR}/update-machine-info-from-deviceinfo.service"
        DESTINATION ${SYSTEMD_SYSTEM_UNIT_DIR}
    )
else()
    message(WARNING "Could not find systemd target folder, not install systemd service file")
endif()