|
|
- project(pEpDBusAdapter)
-
- option(BUILD_PLAIN_IMPLEMENTATION "Build basic DBus C++" ON)
-
- include_directories(${PROJECT_SOURCE_DIR}/types)
-
- ############################ Server glue ###########################
- add_custom_command(
- OUTPUT ${PROJECT_BINARY_DIR}/pep-server-glue.h
- COMMAND /usr/bin/dbusxx-xml2cpp ${CMAKE_CURRENT_SOURCE_DIR}/pep-introspect.xml --adaptor=${PROJECT_BINARY_DIR}/pep-server-glue.h
- DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/pep-introspect.xml
- PRE_BUILD
- VERBATIM
- )
- set_source_files_properties(${PROJECT_BINARY_DIR}/pep-server-glue.h PROPERTIES GENERATED TRUE)
- #######################
-
- ############################ Client glue ###########################
- add_custom_command(
- OUTPUT ${PROJECT_BINARY_DIR}/pep-client-glue.h
- COMMAND /usr/bin/dbusxx-xml2cpp ${CMAKE_CURRENT_SOURCE_DIR}/pep-introspect.xml --proxy=${PROJECT_BINARY_DIR}/pep-client-glue.h
- DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/pep-introspect.xml
- PRE_BUILD
- VERBATIM
- )
- set_source_files_properties(${PROJECT_BINARY_DIR}/pep-client-glue.h PROPERTIES GENERATED TRUE)
- #######################
-
- if(BUILD_PLAIN_IMPLEMENTATION)
- add_library(pEpDBusAdapterClient SHARED pep-client.cpp ${PROJECT_BINARY_DIR}/pep-client-glue.h)
- target_link_libraries(pEpDBusAdapterClient
- pEpEngine
- pEpAdapter
- dbus-c++-1
- sequoia_ffi
- sequoia_openpgp_ffi
- )
-
- set_target_properties(pEpDBusAdapterClient PROPERTIES
- CXX_VISIBILITY_PRESET default
- VISIBILITY_INLINES_HIDDEN 0
- )
-
- add_library(pEpDBusAdapter SHARED pep-dbus-adapter.cpp ${PROJECT_BINARY_DIR}/pep-server-glue.h)
- target_link_libraries(pEpDBusAdapter
- pEpEngine
- pEpAdapter
- pEpMIME
- dbus-c++-1
- sequoia_ffi
- sequoia_openpgp_ffi
- )
- set_target_properties(pEpDBusAdapter PROPERTIES
- CXX_VISIBILITY_PRESET default
- VISIBILITY_INLINES_HIDDEN 0
- )
-
- add_library(pEpDBusAdapterServer SHARED pep-server.cpp)
- target_link_libraries(pEpDBusAdapterServer
- pEpDBusAdapter
- pEpAdapter
- pEpEngine
- dbus-c++-1
- sequoia_ffi
- sequoia_openpgp_ffi
- )
-
- set_target_properties(pEpDBusAdapterServer PROPERTIES
- CXX_VISIBILITY_PRESET default
- VISIBILITY_INLINES_HIDDEN 0
- )
-
- add_executable(pep-dbus-server server.cpp)
- target_link_libraries(pep-dbus-server
- pEpDBusAdapter
- pEpDBusAdapterServer
- pEpEngine
- dbus-c++-1
- sequoia_ffi
- sequoia_openpgp_ffi
- )
-
- add_executable(tests tests.cpp)
- target_link_libraries(tests
- pEpEngine
- pEpDBusAdapterClient
- dbus-c++-1
- sequoia_ffi
- sequoia_openpgp_ffi
- )
-
- configure_file(security.pep.service.in ${CMAKE_CURRENT_BINARY_DIR}/security.pep.service)
-
- install(FILES ${CMAKE_CURRENT_BINARY_DIR}/security.pep.service
- DESTINATION ${KDE_INSTALL_DBUSSERVICEDIR})
- install(TARGETS pep-dbus-server pEpDBusAdapterClient pEpDBusAdapterServer)
-
- endif(BUILD_PLAIN_IMPLEMENTATION)
|