Title: [169165] trunk
Revision
169165
Author
[email protected]
Date
2014-05-21 09:39:17 -0700 (Wed, 21 May 2014)

Log Message

[CMake] Improve handling of LIB_INSTALL_DIR, EXEC_INSTALL_DIR, and LIBEXEC_INSTALL_DIR
https://bugs.webkit.org/show_bug.cgi?id=132819

Reviewed by Carlos Garcia Campos.

.:
* CMakeLists.txt: Hard-code CMAKE_ARCHIVE_OUTPUT_DIRECTORY etc, so that we can accept absolute paths for LIB_INSTALL_DIR
and friends.
* Source/cmake/OptionsCommon.cmake: Get rid of LIB_SUFFIX and try to make all path variables absolute. Also set
CMAKE_ARCHIVE_OUTPUT_DIRECTORY, etc using the last path component of LIB_INSTALL_DIR, etc, so that absolute paths
are supported.
* Source/cmake/OptionsGTK.cmake: Ditto. Also get rid of all pkg-config specific variables.

Source/_javascript_Core:
* _javascript_coregtk.pc.in: Instead of using the special pkg-config variables,
use the common CMake ones directly.

Source/WebKit/efl:
* EWebKitConfig.cmake.in: LIB_INSTALL_DIR is always absolute now, so we don't need
to prefix it with the prefix.
* ewebkit.pc.in: Instead of hard-coding the path to the library installation directory use LIB_INSTALL_DIR.

Source/WebKit2:
* PlatformEfl.cmake: No need to prefix EXEC_INSTALL_DIR with the prefix any longer.
* PlatformGtk.cmake: No longer use CMAKE_INSTALL_FULL_FOO variables, instead using the WebKit-specific ones.
* efl/EWebKit2Config.cmake.in: Ditto.
* efl/ewebkit2.pc.in: Instead of hard-coding the path to the library installation directory use LIB_INSTALL_DIR.
* webkit2gtk-web-extension.pc.in: No longer use the pkg-config only variables. Instead use
the common CMake ones.
* webkit2gtk.pc.in: Ditto.

Modified Paths

Diff

Modified: trunk/CMakeLists.txt (169164 => 169165)


--- trunk/CMakeLists.txt	2014-05-21 16:33:37 UTC (rev 169164)
+++ trunk/CMakeLists.txt	2014-05-21 16:39:17 UTC (rev 169165)
@@ -137,9 +137,9 @@
 # Common options
 #------------------------------------------------------------------------------
 include(OptionsCommon)
-set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${LIB_INSTALL_DIR})
-set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${LIB_INSTALL_DIR})
-set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${EXEC_INSTALL_DIR})
+set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
+set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
+set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
 
 # -----------------------------------------------------------------------------
 # Port-specific options

Modified: trunk/ChangeLog (169164 => 169165)


--- trunk/ChangeLog	2014-05-21 16:33:37 UTC (rev 169164)
+++ trunk/ChangeLog	2014-05-21 16:39:17 UTC (rev 169165)
@@ -1,3 +1,17 @@
+2014-05-16  Martin Robinson  <[email protected]>
+
+        [CMake] Improve handling of LIB_INSTALL_DIR, EXEC_INSTALL_DIR, and LIBEXEC_INSTALL_DIR
+        https://bugs.webkit.org/show_bug.cgi?id=132819
+
+        Reviewed by Carlos Garcia Campos.
+
+        * CMakeLists.txt: Hard-code CMAKE_ARCHIVE_OUTPUT_DIRECTORY etc, so that we can accept absolute paths for LIB_INSTALL_DIR
+        and friends.
+        * Source/cmake/OptionsCommon.cmake: Get rid of LIB_SUFFIX and try to make all path variables absolute. Also set
+        CMAKE_ARCHIVE_OUTPUT_DIRECTORY, etc using the last path component of LIB_INSTALL_DIR, etc, so that absolute paths
+        are supported.
+        * Source/cmake/OptionsGTK.cmake: Ditto. Also get rid of all pkg-config specific variables.
+
 2014-05-20  Gustavo Noronha Silva  <[email protected]>
 
         [CMake] Support building with Debug Fission

Modified: trunk/Source/_javascript_Core/ChangeLog (169164 => 169165)


--- trunk/Source/_javascript_Core/ChangeLog	2014-05-21 16:33:37 UTC (rev 169164)
+++ trunk/Source/_javascript_Core/ChangeLog	2014-05-21 16:39:17 UTC (rev 169165)
@@ -1,3 +1,13 @@
+2014-05-16  Martin Robinson  <[email protected]>
+
+        [CMake] Improve handling of LIB_INSTALL_DIR, EXEC_INSTALL_DIR, and LIBEXEC_INSTALL_DIR
+        https://bugs.webkit.org/show_bug.cgi?id=132819
+
+        Reviewed by Carlos Garcia Campos.
+
+        * _javascript_coregtk.pc.in: Instead of using the special pkg-config variables,
+        use the common CMake ones directly.
+
 2014-05-21  Filip Pizlo  <[email protected]>
 
         Unreviewed, roll out http://trac.webkit.org/changeset/169159.

Modified: trunk/Source/_javascript_Core/_javascript_coregtk.pc.in (169164 => 169165)


--- trunk/Source/_javascript_Core/_javascript_coregtk.pc.in	2014-05-21 16:33:37 UTC (rev 169164)
+++ trunk/Source/_javascript_Core/_javascript_coregtk.pc.in	2014-05-21 16:39:17 UTC (rev 169165)
@@ -1,11 +1,11 @@
-prefix=@prefix@
-exec_prefix=@exec_prefix@
-libdir=@libdir@
-includedir=@includedir@
+prefix=@CMAKE_INSTALL_PREFIX@
+exec_prefix=${prefix}
+libdir=@LIB_INSTALL_DIR@
+includedir=${prefix}/include
 
 Name: _javascript_CoreGTK+
 Description: GTK+ version of the _javascript_Core engine
-Version: @VERSION@
+Version: @PROJECT_VERSION@
 Requires: glib-2.0
 Libs: -L${libdir} -ljavascriptcoregtk-@WEBKITGTK_API_VERSION@
 Cflags: -I${includedir}/webkitgtk-@WEBKITGTK_API_VERSION@

Modified: trunk/Source/WebKit/efl/ChangeLog (169164 => 169165)


--- trunk/Source/WebKit/efl/ChangeLog	2014-05-21 16:33:37 UTC (rev 169164)
+++ trunk/Source/WebKit/efl/ChangeLog	2014-05-21 16:39:17 UTC (rev 169165)
@@ -1,3 +1,14 @@
+2014-05-16  Martin Robinson  <[email protected]>
+
+        [CMake] Improve handling of LIB_INSTALL_DIR, EXEC_INSTALL_DIR, and LIBEXEC_INSTALL_DIR
+        https://bugs.webkit.org/show_bug.cgi?id=132819
+
+        Reviewed by Carlos Garcia Campos.
+
+        * EWebKitConfig.cmake.in: LIB_INSTALL_DIR is always absolute now, so we don't need
+        to prefix it with the prefix.
+        * ewebkit.pc.in: Instead of hard-coding the path to the library installation directory use LIB_INSTALL_DIR.
+
 2014-05-16  Piotr Grad  <[email protected]>
 
         [EFL] Build break after 168978.

Modified: trunk/Source/WebKit/efl/EWebKitConfig.cmake.in (169164 => 169165)


--- trunk/Source/WebKit/efl/EWebKitConfig.cmake.in	2014-05-21 16:33:37 UTC (rev 169164)
+++ trunk/Source/WebKit/efl/EWebKitConfig.cmake.in	2014-05-21 16:39:17 UTC (rev 169165)
@@ -5,7 +5,7 @@
 set(EWEBKIT_VERSION @PROJECT_VERSION@)
 
 set(_SHARED_CORE @SHARED_CORE@)
-set(_libdir "@CMAKE_INSTALL_PREFIX@/@LIB_INSTALL_DIR@")
+set(_libdir "@LIB_INSTALL_DIR@")
 
 find_path(EWEBKIT_INCLUDE_DIR EWebKit.h HINTS "@CMAKE_INSTALL_PREFIX@/include/@WebKit_OUTPUT_NAME@-@PROJECT_VERSION_MAJOR@")
 find_library(EWEBKIT_LIBRARY NAMES ewebkit HINTS ${_libdir})

Modified: trunk/Source/WebKit/efl/ewebkit.pc.in (169164 => 169165)


--- trunk/Source/WebKit/efl/ewebkit.pc.in	2014-05-21 16:33:37 UTC (rev 169164)
+++ trunk/Source/WebKit/efl/ewebkit.pc.in	2014-05-21 16:39:17 UTC (rev 169165)
@@ -1,6 +1,6 @@
 prefix=@CMAKE_INSTALL_PREFIX@
 exec_prefix=${prefix}
-libdir=${exec_prefix}/lib
+libdir=@LIB_INSTALL_DIR@
 includedir=${prefix}/include
 datadir=${prefix}/@DATA_INSTALL_DIR@
 

Modified: trunk/Source/WebKit2/ChangeLog (169164 => 169165)


--- trunk/Source/WebKit2/ChangeLog	2014-05-21 16:33:37 UTC (rev 169164)
+++ trunk/Source/WebKit2/ChangeLog	2014-05-21 16:39:17 UTC (rev 169165)
@@ -1,3 +1,18 @@
+2014-05-16  Martin Robinson  <[email protected]>
+
+        [CMake] Improve handling of LIB_INSTALL_DIR, EXEC_INSTALL_DIR, and LIBEXEC_INSTALL_DIR
+        https://bugs.webkit.org/show_bug.cgi?id=132819
+
+        Reviewed by Carlos Garcia Campos.
+
+        * PlatformEfl.cmake: No need to prefix EXEC_INSTALL_DIR with the prefix any longer.
+        * PlatformGtk.cmake: No longer use CMAKE_INSTALL_FULL_FOO variables, instead using the WebKit-specific ones.
+        * efl/EWebKit2Config.cmake.in: Ditto.
+        * efl/ewebkit2.pc.in: Instead of hard-coding the path to the library installation directory use LIB_INSTALL_DIR.
+        * webkit2gtk-web-extension.pc.in: No longer use the pkg-config only variables. Instead use
+        the common CMake ones.
+        * webkit2gtk.pc.in: Ditto.
+
 2014-05-21  Carlos Garcia Campos  <[email protected]>
 
         REGRESSION(r168625): [GTK] Assertion failure in LocalStorageDatabaseTracker

Modified: trunk/Source/WebKit2/PlatformEfl.cmake (169164 => 169165)


--- trunk/Source/WebKit2/PlatformEfl.cmake	2014-05-21 16:33:37 UTC (rev 169164)
+++ trunk/Source/WebKit2/PlatformEfl.cmake	2014-05-21 16:39:17 UTC (rev 169165)
@@ -443,7 +443,7 @@
 add_definitions(-DTEST_RESOURCES_DIR=\"${TEST_RESOURCES_DIR}\"
     -DTEST_LIB_DIR=\"${CMAKE_LIBRARY_OUTPUT_DIRECTORY}\"
     -DGTEST_LINKED_AS_SHARED_LIBRARY=1
-    -DLIBEXECDIR=\"${CMAKE_INSTALL_PREFIX}/${EXEC_INSTALL_DIR}\"
+    -DLIBEXECDIR=\"${EXEC_INSTALL_DIR}\"
     -DWEBPROCESSNAME=\"WebProcess\"
     -DPLUGINPROCESSNAME=\"PluginProcess\"
     -DNETWORKPROCESSNAME=\"NetworkProcess\"

Modified: trunk/Source/WebKit2/PlatformGTK.cmake (169164 => 169165)


--- trunk/Source/WebKit2/PlatformGTK.cmake	2014-05-21 16:33:37 UTC (rev 169164)
+++ trunk/Source/WebKit2/PlatformGTK.cmake	2014-05-21 16:39:17 UTC (rev 169165)
@@ -8,9 +8,9 @@
 configure_file(webkit2gtk-web-extension.pc.in ${WebKit2WebExtension_PKGCONFIG_FILE} @ONLY)
 
 add_definitions(-DWEBKIT2_COMPILATION)
-add_definitions(-DLIBEXECDIR="${CMAKE_INSTALL_FULL_LIBEXECDIR}")
+add_definitions(-DLIBEXECDIR="${LIBEXEC_INSTALL_DIR}")
 add_definitions(-DPACKAGE_LOCALE_DIR="${CMAKE_INSTALL_FULL_LOCALEDIR}")
-add_definitions(-DLIBDIR="${CMAKE_INSTALL_FULL_LIBDIR}")
+add_definitions(-DLIBDIR="${LIB_INSTALL_DIR}")
 
 set(WebKit2_USE_PREFIX_HEADER ON)
 

Modified: trunk/Source/WebKit2/efl/EWebKit2Config.cmake.in (169164 => 169165)


--- trunk/Source/WebKit2/efl/EWebKit2Config.cmake.in	2014-05-21 16:33:37 UTC (rev 169164)
+++ trunk/Source/WebKit2/efl/EWebKit2Config.cmake.in	2014-05-21 16:39:17 UTC (rev 169165)
@@ -5,7 +5,7 @@
 set(EWEBKIT2_VERSION @PROJECT_VERSION@)
 
 set(_SHARED_CORE @SHARED_CORE@)
-set(_libdir "@CMAKE_INSTALL_PREFIX@/@LIB_INSTALL_DIR@")
+set(_libdir "@LIB_INSTALL_DIR@")
 
 find_path(EWEBKIT2_INCLUDE_DIR EWebKit2.h HINTS "@CMAKE_INSTALL_PREFIX@/include/@WebKit2_OUTPUT_NAME@-@PROJECT_VERSION_MAJOR@")
 find_library(EWEBKIT2_LIBRARY NAMES ewebkit2 HINTS ${_libdir})

Modified: trunk/Source/WebKit2/efl/ewebkit2.pc.in (169164 => 169165)


--- trunk/Source/WebKit2/efl/ewebkit2.pc.in	2014-05-21 16:33:37 UTC (rev 169164)
+++ trunk/Source/WebKit2/efl/ewebkit2.pc.in	2014-05-21 16:39:17 UTC (rev 169165)
@@ -1,6 +1,6 @@
 prefix=@CMAKE_INSTALL_PREFIX@
 exec_prefix=${prefix}
-libdir=${exec_prefix}/lib
+libdir=@LIB_INSTALL_DIR@
 includedir=${prefix}/include
 datadir=${prefix}/@DATA_INSTALL_DIR@
 

Modified: trunk/Source/WebKit2/webkit2gtk-web-extension.pc.in (169164 => 169165)


--- trunk/Source/WebKit2/webkit2gtk-web-extension.pc.in	2014-05-21 16:33:37 UTC (rev 169164)
+++ trunk/Source/WebKit2/webkit2gtk-web-extension.pc.in	2014-05-21 16:39:17 UTC (rev 169165)
@@ -1,11 +1,11 @@
-prefix=@prefix@
-exec_prefix=@exec_prefix@
-libdir=@libdir@
-includedir=@includedir@
+prefix=@CMAKE_INSTALL_PREFIX@
+exec_prefix=${prefix}
+libdir=@LIB_INSTALL_DIR@
+includedir=${prefix}/include
 
 Name: WebKit2WebExtension
 Description: WebKit web process extensions
-Version: @VERSION@
+Version: @PROJECT_VERSION@
 Requires: glib-2.0 gtk+-@GTK_API_VERSION@ libsoup-2.4 _javascript_coregtk-@WEBKITGTK_API_VERSION@
 Libs: -L${libdir} -lwebkit2gtk-@WEBKITGTK_API_VERSION@
 Cflags: -I${includedir}/webkitgtk-@WEBKITGTK_API_VERSION@

Modified: trunk/Source/WebKit2/webkit2gtk.pc.in (169164 => 169165)


--- trunk/Source/WebKit2/webkit2gtk.pc.in	2014-05-21 16:33:37 UTC (rev 169164)
+++ trunk/Source/WebKit2/webkit2gtk.pc.in	2014-05-21 16:39:17 UTC (rev 169165)
@@ -1,11 +1,11 @@
-prefix=@prefix@
-exec_prefix=@exec_prefix@
-libdir=@libdir@
-includedir=@includedir@
+prefix=@CMAKE_INSTALL_PREFIX@
+exec_prefix=${prefix}
+libdir=@LIB_INSTALL_DIR@
+includedir=${prefix}/include
 
 Name: WebKit2
 Description: Web content engine for GTK+
-Version: @VERSION@
+Version: @PROJECT_VERSION@
 Requires: glib-2.0 gtk+-@GTK_API_VERSION@ libsoup-2.4 _javascript_coregtk-@WEBKITGTK_API_VERSION@
 Libs: -L${libdir} -lwebkit2gtk-@WEBKITGTK_API_VERSION@
 Cflags: -I${includedir}/webkitgtk-@WEBKITGTK_API_VERSION@

Modified: trunk/Source/cmake/OptionsCommon.cmake (169164 => 169165)


--- trunk/Source/cmake/OptionsCommon.cmake	2014-05-21 16:33:37 UTC (rev 169164)
+++ trunk/Source/cmake/OptionsCommon.cmake	2014-05-21 16:39:17 UTC (rev 169165)
@@ -61,12 +61,11 @@
     set(CMAKE_SHARED_LINKER_FLAGS "-Wl,--no-undefined ${CMAKE_SHARED_LINKER_FLAGS}")
 endif ()
 
-# GTK uses the GNU installation directories.
+# GTK uses the GNU installation directories as defaults.
 if (NOT PORT STREQUAL "GTK")
-    set(LIB_SUFFIX "" CACHE STRING "Define suffix of directory name (32/64)")
-    set(LIB_INSTALL_DIR "lib${LIB_SUFFIX}" CACHE PATH "Where to install libraries (lib${LIB_SUFFIX})")
-    set(EXEC_INSTALL_DIR "bin" CACHE PATH "Where to install executables")
-    set(LIBEXEC_INSTALL_DIR "bin" CACHE PATH "Where to install executables executed by the library")
+    set(LIB_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/lib" CACHE PATH "Absolute path to library installation directory")
+    set(EXEC_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/bin" CACHE PATH "Absolute path to executable installation directory")
+    set(LIBEXEC_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/bin" CACHE PATH "Absolute path to install executables executed by the library")
 endif ()
 
 # The Ninja generator does not yet know how to build archives in pieces, and so response

Modified: trunk/Source/cmake/OptionsGTK.cmake (169164 => 169165)


--- trunk/Source/cmake/OptionsGTK.cmake	2014-05-21 16:33:37 UTC (rev 169164)
+++ trunk/Source/cmake/OptionsGTK.cmake	2014-05-21 16:39:17 UTC (rev 169165)
@@ -1,7 +1,3 @@
-set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
-set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
-set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
-
 include(GNUInstallDirs)
 
 set(PROJECT_VERSION_MAJOR 2)
@@ -100,13 +96,6 @@
 set(GDK_VERSION_MIN_REQUIRED GDK_VERSION_3_6)
 set(GTK_API_VERSION 3.0)
 
-# These are used to generate the pkg-config files.
-set(prefix ${CMAKE_INSTALL_PREFIX})
-set(exec_prefix ${CMAKE_INSTALL_PREFIX})
-set(libdir "${prefix}/${CMAKE_INSTALL_LIBDIR}")
-set(includedir "${prefix}/include")
-set(VERSION ${PROJECT_VERSION})
-
 set(WTF_USE_SOUP 1)
 set(WTF_USE_UDIS86 1)
 
@@ -119,11 +108,14 @@
 set(WebKit2_NetworkProcess_OUTPUT_NAME WebKitNetworkProcess)
 set(WebKit2_PluginProcess_OUTPUT_NAME WebKitPluginProcess)
 
+# These are shared variables, but we special case their definition so that we can use the
+# CMAKE_INSTALL_* variables that are populated by the GNUInstallDirs macro.
+set(LIB_INSTALL_DIR "${CMAKE_INSTALL_FULL_LIBDIR}" CACHE PATH "Absolute path to library installation directory")
+set(EXEC_INSTALL_DIR "${CMAKE_INSTALL_FULL_BINDIR}" CACHE PATH "Absolute path to executable installation directory")
+set(LIBEXEC_INSTALL_DIR "${CMAKE_INSTALL_FULL_LIBEXECDIR}" CACHE PATH "Absolute path to install executables executed by the library")
+
 set(DATA_BUILD_DIR "${CMAKE_BINARY_DIR}/share/${WebKit_OUTPUT_NAME}")
 set(DATA_INSTALL_DIR "${CMAKE_INSTALL_DATADIR}/webkitgtk-${WEBKITGTK_API_VERSION}")
-set(LIB_INSTALL_DIR "${CMAKE_INSTALL_LIBDIR}" CACHE PATH "Where to install libraries")
-set(EXEC_INSTALL_DIR "${CMAKE_INSTALL_BINDIR}" CACHE PATH "Where to install executables")
-set(LIBEXEC_INSTALL_DIR "${CMAKE_INSTALL_LIBEXECDIR}" CACHE PATH "Where to install executables executed by the library")
 set(WEBKITGTK_HEADER_INSTALL_DIR "${CMAKE_INSTALL_INCLUDEDIR}/webkitgtk-${WEBKITGTK_API_VERSION}")
 
 add_definitions(-DBUILDING_GTK__=1)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to