[geary/bug/776421-make-client-unit-testable: 5/8] Rename "geary-static" to "geary-engine" to better reflect what it is.



commit ef4610237495d94f88c075d52263518860ac4f0e
Author: Michael James Gratton <mike vee net>
Date:   Mon Dec 26 11:10:35 2016 +1030

    Rename "geary-static" to "geary-engine" to better reflect what it is.
    
    * src/CMakeLists.txt, test/CMakeLists.txt: Rename engine lib to
      geary-engine, add it to valac compilation steps via their list of
      dependent packages, rather than as custom VAPIs.

 src/CMakeLists.txt  |   49 ++++++++++++++++++++++++++++++-------------------
 test/CMakeLists.txt |    4 ++--
 2 files changed, 32 insertions(+), 21 deletions(-)
---
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 42910f2..020caf2 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -512,15 +512,32 @@ add_custom_target(git-version
 )
 
 set(ENGINE_PACKAGES
-    glib-2.0 gee-0.8 gio-2.0 gmime-2.6 posix sqlite3 libxml-2.0
+  gee-0.8
+  gio-2.0
+  glib-2.0
+  gmime-2.6
+  libxml-2.0
+  posix
+  sqlite3
 )
 
 set(CLIENT_PACKAGES
-    gtk+-3.0 webkitgtk-3.0 libsecret-1 libsoup-2.4 libnotify libcanberra gcr-3 enchant 
${EXTRA_CLIENT_PACKAGES}
+  enchant
+  gcr-3
+  geary-engine
+  gio-2.0
+  gtk+-3.0
+  libcanberra
+  libnotify
+  libsecret-1
+  libsoup-2.4
+  webkitgtk-3.0
+  ${EXTRA_CLIENT_PACKAGES}
 )
 
 set(CONSOLE_PACKAGES
-    gtk+-3.0
+  geary-engine
+  gtk+-3.0
 )
 
 set(GSETTINGS_DIR ${CMAKE_SOURCE_DIR}/desktop)
@@ -586,22 +603,21 @@ set(VALAC_OPTIONS
     ${EXTRA_VALA_OPTIONS}
 )
 
-# Engine (static library used for building)
+# Engine (static library used for building apps and unit test)
 #################################################
-vala_precompile(ENGINE_VALA_C geary-static
+vala_precompile(ENGINE_VALA_C geary-engine
     ${ENGINE_SRC}
 PACKAGES
-    ${CONSOLE_PACKAGES}
     ${ENGINE_PACKAGES}
 GENERATE_VAPI
-    geary-static
+    geary-engine
 OPTIONS
     ${VALAC_OPTIONS}
 )
 
-add_library(geary-static STATIC ${ENGINE_VALA_C})
-add_dependencies(geary-static git-version)
-target_link_libraries(geary-static ${DEPS_LIBRARIES} sqlite3-unicodesn)
+add_library(geary-engine STATIC ${ENGINE_VALA_C})
+add_dependencies(geary-engine git-version)
+target_link_libraries(geary-engine m ${DEPS_LIBRARIES} sqlite3-unicodesn)
 
 # WebKitGTK VAPI generation
 #################################################
@@ -627,16 +643,14 @@ vala_precompile(GEARY_VALA_C geary
 PACKAGES
     ${CLIENT_PACKAGES}
     ${ENGINE_PACKAGES}
-CUSTOM_VAPIS
-    "${CMAKE_BINARY_DIR}/src/geary-static.vapi"
 OPTIONS
     ${VALAC_OPTIONS}
     --gresources=${RESOURCES_XML}
 )
 
 add_executable(geary ${GEARY_VALA_C} ${RESOURCES_C})
-target_link_libraries(geary m ${DEPS_LIBRARIES} geary-static)
 add_dependencies(geary webkitgtk-vapi)
+target_link_libraries(geary m ${DEPS_LIBRARIES} geary-engine)
 install(TARGETS geary RUNTIME DESTINATION bin)
 add_custom_command(
     TARGET
@@ -659,14 +673,12 @@ vala_precompile(CONSOLE_VALA_C geary-console
 PACKAGES
     ${CONSOLE_PACKAGES}
     ${ENGINE_PACKAGES}
-CUSTOM_VAPIS
-    "${CMAKE_BINARY_DIR}/src/geary-static.vapi"
 OPTIONS
     ${VALAC_OPTIONS}
 )
 
 add_executable(geary-console ${CONSOLE_VALA_C})
-target_link_libraries(geary-console ${DEPS_LIBRARIES} geary-static)
+target_link_libraries(geary-console ${DEPS_LIBRARIES} geary-engine)
 add_custom_command(
     TARGET
         geary-console
@@ -680,15 +692,14 @@ add_custom_command(
 vala_precompile(MAILER_VALA_C geary-mailer
     ${MAILER_SRC}
 PACKAGES
+    geary-engine
     ${ENGINE_PACKAGES}
-CUSTOM_VAPIS
-    "${CMAKE_BINARY_DIR}/src/geary-static.vapi"
 OPTIONS
     ${VALAC_OPTIONS}
 )
 
 add_executable(geary-mailer ${MAILER_VALA_C})
-target_link_libraries(geary-mailer ${DEPS_LIBRARIES} geary-static)
+target_link_libraries(geary-mailer ${DEPS_LIBRARIES} geary-engine)
 add_custom_command(
     TARGET
         geary-mailer
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index 859e5e7..8e90dc0 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -27,7 +27,7 @@ pkg_check_modules(DEPS REQUIRED
 )
 
 set(TEST_PACKAGES
-  glib-2.0 gio-2.0 gee-0.8 gmime-2.6 geary-static
+  glib-2.0 gio-2.0 gee-0.8 gmime-2.6 geary-engine
 )
 
 set(CFLAGS
@@ -65,4 +65,4 @@ OPTIONS
 )
 
 add_executable(geary-test ${TEST_VALA_C})
-target_link_libraries(geary-test ${DEPS_LIBRARIES} geary-static)
+target_link_libraries(geary-test ${DEPS_LIBRARIES} geary-engine)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]