[WPE] Use proper shared object versioning for libWPEWebKit.so
authoraperez@igalia.com <aperez@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 26 Oct 2017 20:57:08 +0000 (20:57 +0000)
committeraperez@igalia.com <aperez@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 26 Oct 2017 20:57:08 +0000 (20:57 +0000)
https://bugs.webkit.org/show_bug.cgi?id=178878

Reviewed by Michael Catanzaro.

Move the CALCULATE_LIBRARY_VERSIONS_FROM_LIBTOOL_TRIPLE() to a new CMake include file,
and use it both for the GTK+ and WPE ports. Also add a SET_PROJECT_VERSION() macro to
unify setting the PROJECT_VERSION* family of variables.

* Source/cmake/OptionsGTK.cmake: Use the common macros imported from VersioningUtils.cmake.
* Source/cmake/OptionsWPE.cmake: Properly assign a shared object version to libWPEWebKit.so,
using the common macros from VersioningUtils.cmake.
* Source/cmake/VersioningUtils.cmake: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@224047 268f45cc-cd09-0410-ab3c-d52691b4dbfc

ChangeLog
Source/cmake/OptionsGTK.cmake
Source/cmake/OptionsWPE.cmake
Source/cmake/VersioningUtils.cmake [new file with mode: 0644]

index cdb24af..892e407 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,21 @@
 2017-10-26  Adrian Perez de Castro  <aperez@igalia.com>
 
+        [WPE] Use proper shared object versioning for libWPEWebKit.so
+        https://bugs.webkit.org/show_bug.cgi?id=178878
+
+        Reviewed by Michael Catanzaro.
+
+        Move the CALCULATE_LIBRARY_VERSIONS_FROM_LIBTOOL_TRIPLE() to a new CMake include file,
+        and use it both for the GTK+ and WPE ports. Also add a SET_PROJECT_VERSION() macro to
+        unify setting the PROJECT_VERSION* family of variables.
+
+        * Source/cmake/OptionsGTK.cmake: Use the common macros imported from VersioningUtils.cmake.
+        * Source/cmake/OptionsWPE.cmake: Properly assign a shared object version to libWPEWebKit.so,
+        using the common macros from VersioningUtils.cmake.
+        * Source/cmake/VersioningUtils.cmake: Added.
+
+2017-10-26  Adrian Perez de Castro  <aperez@igalia.com>
+
         [GTK] WebKit library .so version is not being set correctly
         https://bugs.webkit.org/show_bug.cgi?id=178873
 
index 798e988..fac235e 100644 (file)
@@ -1,19 +1,9 @@
 include(GNUInstallDirs)
+include(VersioningUtils)
 
-set(PROJECT_VERSION_MAJOR 2)
-set(PROJECT_VERSION_MINOR 19)
-set(PROJECT_VERSION_MICRO 0)
-set(PROJECT_VERSION ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_MICRO})
+SET_PROJECT_VERSION(2 19 0)
 set(WEBKITGTK_API_VERSION 4.0)
 
-# Libtool library version, not to be confused with API version.
-# See http://www.gnu.org/software/libtool/manual/html_node/Libtool-versioning.html
-macro(CALCULATE_LIBRARY_VERSIONS_FROM_LIBTOOL_TRIPLE library_name current revision age)
-    math(EXPR ${library_name}_VERSION_MAJOR "${current} - ${age}")
-    set(${library_name}_VERSION_MINOR ${age})
-    set(${library_name}_VERSION_MICRO ${revision})
-    set(${library_name}_VERSION ${${library_name}_VERSION_MAJOR}.${age}.${revision})
-endmacro()
 CALCULATE_LIBRARY_VERSIONS_FROM_LIBTOOL_TRIPLE(WEBKIT 62 0 25)
 CALCULATE_LIBRARY_VERSIONS_FROM_LIBTOOL_TRIPLE(JAVASCRIPTCORE 25 0 7)
 
index 4070f6c..1df9487 100644 (file)
@@ -1,11 +1,11 @@
 include(GNUInstallDirs)
+include(VersioningUtils)
 
-set(PROJECT_VERSION_MAJOR 0)
-set(PROJECT_VERSION_MINOR 0)
-set(PROJECT_VERSION_PATCH 20170728)
-set(PROJECT_VERSION ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH})
+SET_PROJECT_VERSION(0 19 0)
 set(WPE_API_VERSION 0.1)
 
+CALCULATE_LIBRARY_VERSIONS_FROM_LIBTOOL_TRIPLE(WEBKIT 1 0 0)
+
 WEBKIT_OPTION_BEGIN()
 
 include(GStreamerDefinitions)
diff --git a/Source/cmake/VersioningUtils.cmake b/Source/cmake/VersioningUtils.cmake
new file mode 100644 (file)
index 0000000..5beff5a
--- /dev/null
@@ -0,0 +1,15 @@
+macro(SET_PROJECT_VERSION major minor micro)
+    set(PROJECT_VERSION_MAJOR "${major}")
+    set(PROJECT_VERSION_MINOR "${minor}")
+    set(PROJECT_VERSION_MICRO "${micro}")
+    set(PROJECT_VERSION "${major}.${minor}.${micro}")
+endmacro()
+
+# Libtool library version, not to be confused with API version.
+# See http://www.gnu.org/software/libtool/manual/html_node/Libtool-versioning.html
+macro(CALCULATE_LIBRARY_VERSIONS_FROM_LIBTOOL_TRIPLE library_name current revision age)
+    math(EXPR ${library_name}_VERSION_MAJOR "${current} - ${age}")
+    set(${library_name}_VERSION_MINOR ${age})
+    set(${library_name}_VERSION_MICRO ${revision})
+    set(${library_name}_VERSION ${${library_name}_VERSION_MAJOR}.${age}.${revision})
+endmacro()