← Back to team overview

deja-dup-team team mailing list archive

[Merge] lp:~seb128/deja-dup/build-with-unity into lp:deja-dup

 

Sebastien Bacher has proposed merging lp:~seb128/deja-dup/build-with-unity into lp:deja-dup.

Commit message:
correctly enable the unity build option


Requested reviews:
  Déjà Dup Developers (deja-dup-hackers)

For more details, see:
https://code.launchpad.net/~seb128/deja-dup/build-with-unity/+merge/202948

correctly enable the unity build option

The issue seems to be due to the cmake transition. The code is under HAVE_UNITY ifdef sections but nothing is set that variable. I'm not really used to cmake yet but the changes there seem to do the work (I tried building with/without libunity, the build with unity has launchpad integration working again while it's not in trusty)
-- 
https://code.launchpad.net/~seb128/deja-dup/build-with-unity/+merge/202948
Your team Déjà Dup Developers is requested to review the proposed merge of lp:~seb128/deja-dup/build-with-unity into lp:deja-dup.
=== modified file 'CMakeLists.txt'
--- CMakeLists.txt	2014-01-10 23:19:41 +0000
+++ CMakeLists.txt	2014-01-23 20:39:05 +0000
@@ -54,8 +54,6 @@
                   ERROR_QUIET)
 endif()
 
-deja_enable_option(UNITY unity>=3.4.2)
-
 deja_enable_option(UNITY_CCPANEL libunity-control-center)
 if(ENABLE_UNITY_CCPANEL)
   execute_process(COMMAND ${PKG_CONFIG_EXECUTABLE} --variable=extensiondir libunity-control-center
@@ -87,6 +85,13 @@
   set(COMMON_VFLAGS ${COMMON_VFLAGS} -D HAVE_GTK_3_10)
 endif()
 
+deja_enable_option(UNITY unity>=3.4.2)
+if(ENABLE_UNITY)
+  set(COMMON_VFLAGS ${COMMON_VFLAGS} -D HAVE_UNITY)
+  set(UNITY_PACKAGE "unity")
+  deja_check_modules(UNITY REQUIRED unity)
+endif()
+
 include(CTest)
 enable_testing()
 add_custom_target(autopilot)

=== modified file 'deja-dup/CMakeLists.txt'
--- deja-dup/CMakeLists.txt	2013-10-14 22:22:07 +0000
+++ deja-dup/CMakeLists.txt	2014-01-23 20:39:05 +0000
@@ -25,15 +25,15 @@
                        MountOperationAssistant.vala
                        Prompt.vala
                        StatusIcon.vala
-                PACKAGES gio-unix-2.0 gtk+-3.0 libnotify libpeas-1.0 libsecret-1
+                PACKAGES gio-unix-2.0 gtk+-3.0 libnotify libpeas-1.0 libsecret-1 ${UNITY_PACKAGE}
                 CUSTOM_VAPIS ${CMAKE_BINARY_DIR}/libdeja/deja.vapi
                              ${CMAKE_CURRENT_BINARY_DIR}/widgets/widgets.vapi
                              ${CMAKE_SOURCE_DIR}/vapi/config.vapi
                 OPTIONS ${COMMON_VFLAGS})
 add_executable(deja-dup ${VALA_C})
-target_link_libraries(deja-dup deja widgets ${GTK_LDFLAGS} ${NOTIFY_LDFLAGS} ${PEAS_LDFLAGS} ${SECRET_LDFLAGS})
+target_link_libraries(deja-dup deja widgets ${GTK_LDFLAGS} ${NOTIFY_LDFLAGS} ${PEAS_LDFLAGS} ${SECRET_LDFLAGS} ${UNITY_LDFLAGS})
 set_target_properties(deja-dup PROPERTIES
-                      COMPILE_FLAGS "${GTK_CFLAGS} ${NOTIFY_CFLAGS} ${PEAS_CFLAGS} ${SECRET_CFLAGS} ${COMMON_CFLAGS}"
+                      COMPILE_FLAGS "${GTK_CFLAGS} ${NOTIFY_CFLAGS} ${PEAS_CFLAGS} ${SECRET_CFLAGS} ${UNITY_CFLAGS} ${COMMON_CFLAGS}"
                       INCLUDE_DIRECTORIES "${CMAKE_BINARY_DIR}/libdeja;${CMAKE_CURRENT_BINARY_DIR}/widgets")
 install(TARGETS deja-dup DESTINATION bin)
 

=== modified file 'deja-dup/widgets/CMakeLists.txt'
--- deja-dup/widgets/CMakeLists.txt	2013-10-27 16:41:23 +0000
+++ deja-dup/widgets/CMakeLists.txt	2014-01-23 20:39:05 +0000
@@ -44,7 +44,7 @@
                        ConfigURLPartBool.vala
                        ConfigWidget.vala
                        WidgetUtils.vala
-                PACKAGES gtk+-3.0 libnotify libpeas-1.0 libsecret-1
+                PACKAGES gtk+-3.0 libnotify libpeas-1.0 libsecret-1 ${UNITY_PACKAGE}
                 CUSTOM_VAPIS ${CMAKE_BINARY_DIR}/libdeja/deja.vapi
                              ${CMAKE_SOURCE_DIR}/vapi/config.vapi
                              ${CMAKE_SOURCE_DIR}/vapi/uriutils.vapi
@@ -52,8 +52,8 @@
                 GENERATE_VAPI widgets
                 GENERATE_HEADER widgets)
 add_library(widgets SHARED ${VALA_C})
-target_link_libraries(widgets deja "${GTK_LDFLAGS} ${NOTIFY_LDFLAGS} ${PEAS_LDFLAGS} ${SECRET_LDFLAGS}")
+target_link_libraries(widgets deja "${GTK_LDFLAGS} ${NOTIFY_LDFLAGS} ${PEAS_LDFLAGS} ${SECRET_LDFLAGS} ${UNITY_LDFLAGS}")
 set_target_properties(widgets PROPERTIES
                       INCLUDE_DIRECTORIES "${CMAKE_BINARY_DIR}/libdeja;${CMAKE_SOURCE_DIR}/libdeja"
-                      COMPILE_FLAGS "${GTK_CFLAGS} ${NOTIFY_CFLAGS} ${PEAS_CFLAGS} ${SECRET_CFLAGS} ${COMMON_CFLAGS}")
+                      COMPILE_FLAGS "${GTK_CFLAGS} ${NOTIFY_CFLAGS} ${PEAS_CFLAGS} ${SECRET_CFLAGS} ${UNITY_CFLAGS} ${COMMON_CFLAGS}")
 install(TARGETS widgets DESTINATION "${PKG_LIBDIR}")


Follow ups