Skip to content

Commit

Permalink
Use gdbus integration from cmake-extras.
Browse files Browse the repository at this point in the history
  • Loading branch information
dobey committed Mar 6, 2017
1 parent 869ff24 commit 93d3879
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 82 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ set(PACKAGE ${CMAKE_PROJECT_NAME})
set(GETTEXT_PACKAGE ${CMAKE_PROJECT_NAME})

find_package(PkgConfig REQUIRED)
find_package(GDbus)
include(GNUInstallDirs)
include(CheckIncludeFile)
include(CheckFunctionExists)
include(UseGlibGeneration)
include(UseGdbusCodegen)
include(UseConstantBuilder)

# Workaround for libexecdir on debian
Expand Down
35 changes: 0 additions & 35 deletions cmake/UseGdbusCodegen.cmake

This file was deleted.

30 changes: 1 addition & 29 deletions liburl-dispatcher/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,34 +6,6 @@
set(API_VERSION 1)
set(ABI_VERSION 1)

###########################
# Generated Lib
###########################

set(GENERATED_HEADERS
service-iface.h
)

set(GENERATED_SOURCES
service-iface.c
)

add_gdbus_codegen(
OUTFILES GENERATED_SOURCES
NAME service-iface
PREFIX com.canonical.URLDispatcher.
NAMESPACE ServiceIface
SERVICE_XML ${CMAKE_CURRENT_SOURCE_DIR}/../data/com.canonical.URLDispatcher.xml
)

add_library(generated STATIC ${GENERATED_SOURCES})

target_link_libraries(generated
${GLIB2_LIBRARIES}
${GOBJECT2_LIBRARIES}
${GIO2_LIBRARIES}
)

###########################
# Lib
###########################
Expand All @@ -58,7 +30,7 @@ set_target_properties(dispatcher PROPERTIES
)

target_link_libraries(dispatcher
generated
service-generated
${GLIB2_LIBRARIES}
${GOBJECT2_LIBRARIES}
-Wl,--no-undefined
Expand Down
25 changes: 8 additions & 17 deletions service/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,29 +8,20 @@ add_definitions( -DOVERLAY_SYSTEM_DIRECTORY="${CMAKE_INSTALL_FULL_DATADIR}/url-d
# Generated Lib
###########################


set(SERVICE_GENERATED_HEADERS
service-iface.h
)

set(SERVICE_GENERATED_SOURCES
service-iface.c
)

add_gdbus_codegen(
OUTFILES SERVICE_GENERATED_SOURCES
NAME service-iface
PREFIX com.canonical.URLDispatcher.
NAMESPACE ServiceIface
SERVICE_XML ${CMAKE_CURRENT_SOURCE_DIR}/../data/com.canonical.URLDispatcher.xml
SERVICE_GENERATED
service-iface
com.canonical.URLDispatcher.
${CMAKE_SOURCE_DIR}/data/com.canonical.URLDispatcher.xml
NAMESPACE ServiceIface
)

add_library(service-generated STATIC ${SERVICE_GENERATED_SOURCES})

target_link_libraries(service-generated
${GLIB2_LIBRARIES}
${GOBJECT2_LIBRARIES}
${GIO2_LIBRARIES}
${GLIB2_LIBRARIES}
${GOBJECT2_LIBRARIES}
${GIO2_LIBRARIES}
)

###########################
Expand Down

0 comments on commit 93d3879

Please sign in to comment.