Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
savoirfairelinux
jami-client-gnome
Commits
c1dac252
Commit
c1dac252
authored
Mar 25, 2015
by
Stepan Salenikovich
Browse files
gnome: add version to cmake
Refs #69346 Change-Id: I320654316e296bc4be640a8266d22b5ba8c57f7f
parent
3bc50a80
Changes
3
Hide whitespace changes
Inline
Side-by-side
CMakeLists.txt
View file @
c1dac252
...
...
@@ -13,7 +13,21 @@ ENDIF()
ADD_DEFINITIONS
(
"-std=c++1y"
)
# set project name and version
PROJECT
(
ring-client-gnome
)
SET
(
PROJECT_VERSION_MAJOR 0
)
SET
(
PROJECT_VERSION_MINOR 1
)
SET
(
PROJECT_VERSION_PATCH 0
)
# create config header file to pass cmake settings to source code
CONFIGURE_FILE
(
"
${
PROJECT_SOURCE_DIR
}
/src/config.h.in"
"
${
PROJECT_BINARY_DIR
}
/config.h"
)
# add the binary tree to the search path for include files
# so that we will find config.h
INCLUDE_DIRECTORIES
(
"
${
PROJECT_BINARY_DIR
}
"
)
LIST
(
APPEND CMAKE_MODULE_PATH
"
${
CMAKE_SOURCE_DIR
}
/cmake"
)
...
...
src/config.h.in
0 → 100644
View file @
c1dac252
/* cmake will generate config.h with defines containing the values defined in cmake */
#define VERSION_MAJOR @PROJECT_VERSION_MAJOR@
#define VERSION_MINOR @PROJECT_VERSION_MINOR@
#define VERSION_PATCH @PROJECT_VERSION_PATCH@
\ No newline at end of file
src/ring_client_options.c
View file @
c1dac252
...
...
@@ -30,10 +30,7 @@
#include
"ring_client_options.h"
/* TODO: add header for auto generated config
* #include "config.h"
*/
#include
"config.h"
#include
<glib/gi18n.h>
#include
<gtk/gtk.h>
#include
<stdlib.h>
...
...
@@ -45,7 +42,7 @@ option_version_cb(G_GNUC_UNUSED const gchar *option_name,
G_GNUC_UNUSED
GError
**
error
)
{
/* TODO: replace with auto generated version */
g_print
(
"%
s
\n
"
,
"0.1"
);
g_print
(
"%
d.%d.%d
\n
"
,
VERSION_MAJOR
,
VERSION_MINOR
,
VERSION_PATCH
);
exit
(
EXIT_SUCCESS
);
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment