Skip to content

Commit

Permalink
Merge pull request #15 from anaselli/master
Browse files Browse the repository at this point in the history
Git version management for CPACK
  • Loading branch information
tgoettlicher committed Jul 23, 2012
2 parents e2f70c4 + 8b38ab5 commit 5db22f7
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 3 deletions.
22 changes: 22 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,28 @@ ENDIF( PLUGINNAME )
SET( CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/Modules" "${BUILDTOOLS_DIR}" "${CMAKE_MODULE_PATH}" )

INCLUDE( LibyuiCommon )

#if you need to get a git versioned package you can use cmake -DGIT_VERSION=on
if (GIT_VERSION)
FIND_PACKAGE(Git)
if(GIT_FOUND)
exec_program(
"${GIT_EXECUTABLE}"
${CMAKE_CURRENT_SOURCE_DIR}
ARGS "describe"
OUTPUT_VARIABLE GIT_VERSION )

string( REGEX MATCH "-g[0-9|a-f]+$" VERSION_SHA1 ${GIT_VERSION} )
string( REGEX REPLACE "[g]" "" VERSION_SHA1 ${VERSION_SHA1} )
set (GIT_SHA1_VERSION "${VERSION_SHA1}")
else()
message (STATUS "GIT_VERSION option needs git installed")
set (GIT_SHA1_VERSION "")
endif()
else()
set (GIT_SHA1_VERSION "")
endif()

INCLUDE( "${CMAKE_CURRENT_SOURCE_DIR}/VERSION.cmake" )

INITIALIZE()
Expand Down
2 changes: 1 addition & 1 deletion VERSION.cmake
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
SET( VERSION_MAJOR "2" )
SET( VERSION_MINOR "42" )
SET( VERSION_PATCH "1" )
SET( VERSION "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}" )
SET( VERSION "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}${VERSION_SHA1}" )
4 changes: 2 additions & 2 deletions src/ygtklinklabel.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ static void ygtk_link_label_realize (GtkWidget *widget)
YGtkLinkLabel *label = YGTK_LINK_LABEL (widget);
label->link_window = gdk_window_new (gtk_widget_get_window(widget), &attributes, attributes_mask);
gdk_window_set_user_data (label->link_window, widget);
GdkColor white = { 0, 0xffff, 0xffff, 0xffff };
gdk_window_set_background (label->link_window, &white);
GdkRGBA white = { 1, 1, 1, 1 };
gdk_window_set_background_rgba(label->link_window, &white);
g_object_unref (G_OBJECT(attributes.cursor));
}

Expand Down

0 comments on commit 5db22f7

Please sign in to comment.