Merge lp:~tintou/switchboard/library-cleanup into lp:~elementary-pantheon/switchboard/switchboard

Proposed by Corentin Noël
Status: Merged
Approved by: Cody Garver
Approved revision: 558
Merged at revision: 558
Proposed branch: lp:~tintou/switchboard/library-cleanup
Merge into: lp:~elementary-pantheon/switchboard/switchboard
Diff against target: 75 lines (+26/-12)
3 files modified
lib/CMakeLists.txt (+4/-3)
lib/config.h.cmake (+12/-9)
lib/config.vapi (+10/-0)
To merge this branch: bzr merge lp:~tintou/switchboard/library-cleanup
Reviewer Review Type Date Requested Status
Rico Tzschichholz Approve
Review via email: mp+258313@code.launchpad.net

Commit message

Removed the configuration file from the library.

To post a comment you must log in.
Revision history for this message
Cody Garver (codygarver) wrote :

Why is more lines better?

Revision history for this message
Corentin Noël (tintou) wrote :

Because currently config.vala is a part of the API where it shoudn't.

558. By Corentin Noël

Removed the configuration file from the library.

Revision history for this message
Rico Tzschichholz (ricotz) wrote :

> Why is more lines better?

Fewer lines are not always better.

Revision history for this message
Rico Tzschichholz (ricotz) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'lib/CMakeLists.txt'
--- lib/CMakeLists.txt 2013-12-14 17:34:09 +0000
+++ lib/CMakeLists.txt 2015-05-06 19:53:14 +0000
@@ -2,7 +2,7 @@
2# Set Variables2# Set Variables
3######################3######################
44
5set (CONFIG_FILE ${CMAKE_CURRENT_BINARY_DIR}/config.vala)5set (CONFIG_FILE ${CMAKE_CURRENT_BINARY_DIR}/config.h)
6set (PREFIX ${CMAKE_INSTALL_PREFIX})6set (PREFIX ${CMAKE_INSTALL_PREFIX})
7set (DOLLAR "$") # You hear that? It's kittens being killed by the gods of cmake7set (DOLLAR "$") # You hear that? It's kittens being killed by the gods of cmake
8set (LIB_VERSION 2.0)8set (LIB_VERSION 2.0)
@@ -12,11 +12,10 @@
12set (LIB_NAME ${CMAKE_PROJECT_NAME}-${LIB_VERSION})12set (LIB_NAME ${CMAKE_PROJECT_NAME}-${LIB_VERSION})
13set (LIB_NAME ${LIB_NAME} PARENT_SCOPE)13set (LIB_NAME ${LIB_NAME} PARENT_SCOPE)
1414
15configure_file (${CMAKE_CURRENT_SOURCE_DIR}/config.vala.cmake ${CONFIG_FILE})15configure_file (${CMAKE_CURRENT_SOURCE_DIR}/config.h.cmake ${CONFIG_FILE})
16configure_file (${CMAKE_CURRENT_SOURCE_DIR}/${CMAKE_PROJECT_NAME}.pc.cmake ${CMAKE_CURRENT_BINARY_DIR}/${LIB_NAME}.pc)16configure_file (${CMAKE_CURRENT_SOURCE_DIR}/${CMAKE_PROJECT_NAME}.pc.cmake ${CMAKE_CURRENT_BINARY_DIR}/${LIB_NAME}.pc)
1717
18set (LIB_SOURCE18set (LIB_SOURCE
19 ${CONFIG_FILE}
20 Plug.vala19 Plug.vala
21 PlugsManager.vala20 PlugsManager.vala
22)21)
@@ -37,6 +36,8 @@
37 ${LIB_PACKAGES}36 ${LIB_PACKAGES}
38 OPTIONS37 OPTIONS
39 ${GLOBAL_VALAC_OPTIONS}38 ${GLOBAL_VALAC_OPTIONS}
39 CUSTOM_VAPIS
40 config.vapi
40 GENERATE_VAPI41 GENERATE_VAPI
41 ${LIB_NAME}42 ${LIB_NAME}
42 GENERATE_HEADER43 GENERATE_HEADER
4344
=== renamed file 'lib/config.vala.cmake' => 'lib/config.h.cmake'
--- lib/config.vala.cmake 2013-11-08 18:02:11 +0000
+++ lib/config.h.cmake 2015-05-06 19:53:14 +0000
@@ -1,9 +1,12 @@
1namespace Switchboard.Build {1#ifndef CONFIG_H
2 public const string DATADIR = "@DATADIR@";2#define CONFIG_H
3 public const string PKGDATADIR = "@PKGDATADIR@";3
4 public const string PLUGS_DIR = "@PLUGS_DIR@";4#cmakedefine DATADIR "@DATADIR@"
5 public const string GETTEXT_PACKAGE = "@GETTEXT_PACKAGE@";5#cmakedefine PKGDATADIR "@PKGDATADIR@"
6 public const string RELEASE_NAME = "@RELEASE_NAME@";6#cmakedefine PLUGS_DIR "@PLUGS_DIR@"
7 public const string VERSION = "@VERSION@";7#cmakedefine GETTEXT_PACKAGE "@GETTEXT_PACKAGE@"
8 public const string VERSION_INFO = "@VERSION_INFO@";8#cmakedefine RELEASE_NAME "@RELEASE_NAME@"
9}9#cmakedefine VERSION "@VERSION@"
10#cmakedefine VERSION_INFO "@VERSION_INFO@"
11
12#endif // CONFIG_H
1013
=== added file 'lib/config.vapi'
--- lib/config.vapi 1970-01-01 00:00:00 +0000
+++ lib/config.vapi 2015-05-06 19:53:14 +0000
@@ -0,0 +1,10 @@
1[CCode (cprefix = "", lower_case_cprefix = "", cheader_filename = "config.h")]
2namespace Build {
3 public const string DATADIR;
4 public const string PKGDATADIR;
5 public const string PLUGS_DIR;
6 public const string GETTEXT_PACKAGE;
7 public const string RELEASE_NAME;
8 public const string VERSION;
9 public const string VERSION_INFO;
10}

Subscribers

People subscribed via source and target branches

to all changes: