forked from Kistler-Group/sdbus-cpp
Go a step further towards modern CMake and cleaner project structure
This commit is contained in:
@ -49,6 +49,6 @@ set(SYSTEMD_INCLUDE_DIRS ${SOURCE_DIR}/src)
|
||||
ExternalProject_Get_property(LibsystemdBuildProject BINARY_DIR)
|
||||
set(SYSTEMD_LIBRARY_DIRS ${BINARY_DIR})
|
||||
|
||||
add_library(libsystemd-static STATIC IMPORTED)
|
||||
set_target_properties(libsystemd-static PROPERTIES IMPORTED_LOCATION ${SYSTEMD_LIBRARY_DIRS}/libsystemd.a)
|
||||
set(SYSTEMD_LIBRARIES libsystemd-static ${CAP_LIBRARIES} ${GLIBC_RT_LIBRARY} ${MOUNT_LIBRARIES})
|
||||
add_library(Systemd::Libsystemd STATIC IMPORTED)
|
||||
set_target_properties(Systemd::Libsystemd PROPERTIES IMPORTED_LOCATION ${SYSTEMD_LIBRARY_DIRS}/libsystemd.a)
|
||||
set(SYSTEMD_LIBRARIES Systemd::Libsystemd ${CAP_LIBRARIES} ${GLIBC_RT_LIBRARY} ${MOUNT_LIBRARIES})
|
||||
|
11
cmake/sdbus-c++-config.cmake.in
Normal file
11
cmake/sdbus-c++-config.cmake.in
Normal file
@ -0,0 +1,11 @@
|
||||
@PACKAGE_INIT@
|
||||
|
||||
include("${CMAKE_CURRENT_LIST_DIR}/@PROJECT_NAME@-targets.cmake")
|
||||
check_required_components("@PROJECT_NAME@")
|
||||
|
||||
# This is here for backwards-compatibility. Please use more modern target-based approach.
|
||||
set(SDBUSCPP_VERSION "@SDBUSCPP_VERSION@")
|
||||
set(SDBUSCPP_FOUND "TRUE")
|
||||
set_and_check(SDBUSCPP_INCLUDE_DIRS "@CMAKE_INSTALL_FULL_INCLUDEDIR@")
|
||||
set_and_check(SDBUSCPP_LIBRARY_DIR "@CMAKE_INSTALL_FULL_LIBDIR@")
|
||||
set(SDBUSCPP_LIBRARIES sdbus-c++)
|
Reference in New Issue
Block a user