Changeset 160994 in webkit


Ignore:
Timestamp:
Dec 23, 2013 6:45:44 AM (10 years ago)
Author:
Martin Robinson
Message:

.: https://bugs.webkit.org/show_bug.cgi?id=125511

[GTK][CMake] libtool-compatible soversion calculation
Reviewed by Gustavo Noronha Silva.

  • Source/cmake/OptionsGTK.cmake: Specify the appropriate libtool triples and use

the CALCULATE_LIBRARY_VERSIONS_FROM_LIBTOOL_TRIPLE macro to specify the library-specific
version information.

  • Source/cmake/WebKitHelpers.cmake: Add some helpful macros.

Source/JavaScriptCore: [GTK][CMake] libtool-compatible soversion calculation
https://bugs.webkit.org/show_bug.cgi?id=125511

Reviewed by Gustavo Noronha Silva.

  • CMakeLists.txt: Use the POPULATE_LIBRARY_VERSION macro and the

library-specific version information.

Source/WebKit: [GTK][CMake] libtool-compatible soversion calculation
https://bugs.webkit.org/show_bug.cgi?id=125511

Reviewed by Gustavo Noronha Silva.

  • CMakeLists.txt: Use the POPULATE_LIBRARY_VERSION macro and the

library-specific version information.

Source/WebKit2: [GTK][CMake] libtool-compatible soversion calculation
https://bugs.webkit.org/show_bug.cgi?id=125511

Reviewed by Gustavo Noronha Silva.

  • CMakeLists.txt: Use the POPULATE_LIBRARY_VERSION macro and the

library-specific version information.

Location:
trunk
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • trunk/ChangeLog

    r160993 r160994  
     12013-12-22  Martin Robinson  <mrobinson@igalia.com>
     2
     3        https://bugs.webkit.org/show_bug.cgi?id=125511
     4
     5        [GTK][CMake] libtool-compatible soversion calculation
     6        Reviewed by Gustavo Noronha Silva.
     7
     8        * Source/cmake/OptionsGTK.cmake: Specify the appropriate libtool triples and use
     9        the CALCULATE_LIBRARY_VERSIONS_FROM_LIBTOOL_TRIPLE macro to specify the library-specific
     10        version information.
     11        * Source/cmake/WebKitHelpers.cmake: Add some helpful macros.
     12
    1132013-12-23  Gustavo Noronha Silva  <gns@gnome.org>
    214
  • trunk/Source/JavaScriptCore/CMakeLists.txt

    r160812 r160994  
    763763
    764764if (${JavaScriptCore_LIBRARY_TYPE} STREQUAL "SHARED_LIBRARY")
    765     set_target_properties(JavaScriptCore PROPERTIES VERSION ${PROJECT_VERSION} SOVERSION ${PROJECT_VERSION_MAJOR})
     765    POPULATE_LIBRARY_VERSION(JAVASCRIPTCORE)
     766    set_target_properties(JavaScriptCore PROPERTIES VERSION ${JAVASCRIPTCORE_VERSION} SOVERSION ${JAVASCRIPTCORE_VERSION_MAJOR})
    766767    install(TARGETS JavaScriptCore DESTINATION "${LIB_INSTALL_DIR}")
    767768endif ()
  • trunk/Source/JavaScriptCore/ChangeLog

    r160993 r160994  
     12013-12-22  Martin Robinson  <mrobinson@igalia.com>
     2
     3        [GTK][CMake] libtool-compatible soversion calculation
     4        https://bugs.webkit.org/show_bug.cgi?id=125511
     5
     6        Reviewed by Gustavo Noronha Silva.
     7
     8        * CMakeLists.txt: Use the POPULATE_LIBRARY_VERSION macro and the
     9        library-specific version information.
     10
    1112013-12-23  Gustavo Noronha Silva  <gns@gnome.org>
    212
  • trunk/Source/WebKit/CMakeLists.txt

    r160984 r160994  
    118118endif ()
    119119
    120 set_target_properties(WebKit PROPERTIES VERSION ${PROJECT_VERSION} SOVERSION ${PROJECT_VERSION_MAJOR})
     120POPULATE_LIBRARY_VERSION(WEBKIT)
     121set_target_properties(WebKit PROPERTIES VERSION ${WEBKIT_VERSION} SOVERSION ${WEBKIT_VERSION_MAJOR})
    121122install(TARGETS WebKit DESTINATION "${LIB_INSTALL_DIR}")
  • trunk/Source/WebKit/ChangeLog

    r160993 r160994  
     12013-12-22  Martin Robinson  <mrobinson@igalia.com>
     2
     3        [GTK][CMake] libtool-compatible soversion calculation
     4        https://bugs.webkit.org/show_bug.cgi?id=125511
     5
     6        Reviewed by Gustavo Noronha Silva.
     7
     8        * CMakeLists.txt: Use the POPULATE_LIBRARY_VERSION macro and the
     9        library-specific version information.
     10
    1112013-12-23  Gustavo Noronha Silva  <gns@gnome.org>
    212
  • trunk/Source/WebKit2/CMakeLists.txt

    r160972 r160994  
    708708endif ()
    709709
    710 set_target_properties(WebKit2 PROPERTIES VERSION ${PROJECT_VERSION} SOVERSION ${PROJECT_VERSION_MAJOR})
     710POPULATE_LIBRARY_VERSION(WEBKIT2)
     711set_target_properties(WebKit2 PROPERTIES VERSION ${WEBKIT2_VERSION} SOVERSION ${WEBKIT2_VERSION_MAJOR})
    711712
    712713install(TARGETS WebKit2 DESTINATION "${LIB_INSTALL_DIR}")
  • trunk/Source/WebKit2/ChangeLog

    r160993 r160994  
     12013-12-22  Martin Robinson  <mrobinson@igalia.com>
     2
     3        [GTK][CMake] libtool-compatible soversion calculation
     4        https://bugs.webkit.org/show_bug.cgi?id=125511
     5
     6        Reviewed by Gustavo Noronha Silva.
     7
     8        * CMakeLists.txt: Use the POPULATE_LIBRARY_VERSION macro and the
     9        library-specific version information.
     10
    1112013-12-23  Gustavo Noronha Silva  <gns@gnome.org>
    212
  • trunk/Source/cmake/OptionsGTK.cmake

    r160993 r160994  
    11include(GNUInstallDirs)
     2
     3set(PROJECT_VERSION_MAJOR 2)
     4set(PROJECT_VERSION_MINOR 3)
     5set(PROJECT_VERSION_PATCH 3)
     6set(PROJECT_VERSION ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH})
     7
     8# Libtool library version, not to be confused with API version.
     9# See http://www.gnu.org/software/libtool/manual/html_node/Libtool-versioning.html
     10CALCULATE_LIBRARY_VERSIONS_FROM_LIBTOOL_TRIPLE(WEBKIT 22 0 22)
     11CALCULATE_LIBRARY_VERSIONS_FROM_LIBTOOL_TRIPLE(WEBKIT2 32 0 7)
     12CALCULATE_LIBRARY_VERSIONS_FROM_LIBTOOL_TRIPLE(JAVASCRIPTCORE 16 2 16)
     13
     14# This is a little confusing: WEBKIT_MICRO_VERSION and friends are used as
     15# macros in files like WebKitVersion.h.in to expose the project version to
     16# the API. Meanwhile WEBKIT_VERSION_MICRO (note the transposed words) is used
     17# by the CMake files to hold the *library* version number, which we calculated
     18# from the libtool triple above. We should consider ditching these below
     19# and using PROJECT_VERSION_* directly.
     20set(WEBKIT_MICRO_VERSION ${PROJECT_VERSION_PATCH})
     21set(WEBKIT_MINOR_VERSION ${PROJECT_VERSION_MINOR})
     22set(WEBKIT_MAJOR_VERSION ${PROJECT_VERSION_MAJOR})
    223
    324# FIXME: We want to expose fewer options to downstream, but for now everything is public.
     
    5980endif ()
    6081WEBKIT_OPTION_END()
    61 
    62 set(PROJECT_VERSION_MAJOR 2)
    63 set(PROJECT_VERSION_MINOR 3)
    64 set(PROJECT_VERSION_PATCH 3)
    65 set(PROJECT_VERSION ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH})
    66 
    67 set(WEBKIT_MICRO_VERSION ${PROJECT_VERSION_PATCH})
    68 set(WEBKIT_MINOR_VERSION ${PROJECT_VERSION_MINOR})
    69 set(WEBKIT_MAJOR_VERSION ${PROJECT_VERSION_MAJOR})
    7082
    7183# These are used to generate the pkg-config files, note we only support GTK 3.0
  • trunk/Source/cmake/WebKitHelpers.cmake

    r160812 r160994  
    101101    unset(_tmp)
    102102endmacro()
     103
     104macro(CALCULATE_LIBRARY_VERSIONS_FROM_LIBTOOL_TRIPLE library_name current revision age)
     105    math(EXPR ${library_name}_VERSION_MAJOR "${current} - ${age}")
     106    set(${library_name}_VERSION_MINOR ${age})
     107    set(${library_name}_VERSION_PATCH ${revision})
     108    set(${library_name}_VERSION ${${library_name}_VERSION_MAJOR}.${age}.${revision})
     109endmacro()
     110
     111macro(POPULATE_LIBRARY_VERSION library_name)
     112if (NOT DEFINED ${library_name}_VERSION_MAJOR)
     113    set(${library_name}_VERSION_MAJOR ${PROJECT_VERSION_MAJOR})
     114endif ()
     115if (NOT DEFINED ${library_name}_VERSION_MINOR)
     116    set(${library_name}_VERSION_MINOR ${PROJECT_VERSION_MINOR})
     117endif ()
     118if (NOT DEFINED ${library_name}_VERSION_PATCH)
     119    set(${library_name}_VERSION_PATCH ${PROJECT_VERSION_PATCH})
     120endif ()
     121if (NOT DEFINED ${library_name}_VERSION)
     122    set(${library_name}_VERSION ${PROJECT_VERSION})
     123endif ()
     124endmacro()
Note: See TracChangeset for help on using the changeset viewer.