MXS-2057 Do not require systemd libraries
Exclude systemd usage if the library is not installed. Only excluding what is necessary. This keeps the object size the same and still compiles most of the code.
This commit is contained in:
@ -15,9 +15,9 @@ add_library(maxbase STATIC
|
||||
average.cc
|
||||
)
|
||||
|
||||
target_link_libraries(maxbase
|
||||
systemd
|
||||
)
|
||||
if(HAVE_SYSTEMD)
|
||||
target_link_libraries(maxbase systemd)
|
||||
endif()
|
||||
|
||||
set_target_properties(maxbase PROPERTIES VERSION "1.0.0" LINK_FLAGS -Wl,-z,defs)
|
||||
add_subdirectory(test)
|
||||
|
Reference in New Issue
Block a user