blob: 4227ccbe282d18461eec4f667db48548a3947bf1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
|
include_directories(${CMAKE_CURRENT_SOURCE_DIR} ${CMPI_INCLUDE_DIR} ${GLIB_INCLUDE_DIRS})
add_library(openlmicommon SHARED
openlmi.c
)
target_link_libraries(openlmicommon ${GLIB_LIBRARIES} dl)
set(OPENLMICOMMON_VERSION_MAJOR 0)
set(OPENLMICOMMON_VERSION_MINOR 0)
set(OPENLMICOMMON_VERSION_PATCH 1)
set(OPENLMICOMMON_VERSION "${OPENLMICOMMON_VERSION_MAJOR}.${OPENLMICOMMON_VERSION_MINOR}.${OPENLMICOMMON_VERSION_PATCH}")
set_target_properties(openlmicommon PROPERTIES VERSION ${OPENLMICOMMON_VERSION})
set_target_properties(openlmicommon PROPERTIES SOVERSION ${OPENLMICOMMON_VERSION_MAJOR})
install(TARGETS openlmicommon DESTINATION lib${LIB_SUFFIX})
install(FILES openlmi.h DESTINATION include/openlmi)
configure_file(openlmi.pc.in openlmi.pc @ONLY)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/openlmi.pc DESTINATION lib${LIB_SUFFIX}/pkgconfig)
install(FILES openlmi.conf DESTINATION ${SYSCONF_INSTALL_DIR}/openlmi)
if (WITH-FAN)
add_subdirectory(fan)
endif (WITH-FAN)
if (WITH-POWER)
add_subdirectory(power)
endif (WITH-POWER)
if (WITH-SERVICE)
add_subdirectory(service-dbus)
endif (WITH-SERVICE)
if (WITH-ACCOUNT)
add_subdirectory(account)
endif (WITH-ACCOUNT)
if (WITH-HARDWARE)
add_subdirectory(hardware)
endif (WITH-HARDWARE)
if (WITH-LOGICALFILE)
add_subdirectory(logicalfile)
endif (WITH-LOGICALFILE)
if (WITH-REALMD)
add_subdirectory(realmd)
endif (WITH-REALMD)
if (WITH-INDMANAGER)
add_subdirectory(indmanager)
endif (WITH-INDMANAGER)
if (WITH-SOFTWARE)
add_subdirectory(software)
endif (WITH-SOFTWARE)
if (WITH-JOURNALD)
add_subdirectory(journald)
endif (WITH-JOURNALD)
if (WITH-PCP)
add_subdirectory(pcp)
endif (WITH-PCP)
file(GLOB INIT_SKELS "*/lmi/*/__init__.skel")
foreach(SKEL ${INIT_SKELS})
#TODO: find a way how to do it in cmake
execute_process(COMMAND dirname ${SKEL} OUTPUT_VARIABLE SKEL_DIR OUTPUT_STRIP_TRAILING_WHITESPACE)
configure_file(${SKEL} "${SKEL_DIR}/__init__.py" @ONLY)
message(STATUS "Written ${SKEL_DIR}/__init__.py module.")
endforeach(SKEL)
|