- Revision
- 219676
- Author
- [email protected]
- Date
- 2017-07-19 22:57:35 -0700 (Wed, 19 Jul 2017)
Log Message
[CMake] Clean up Web Crypto build targets
https://bugs.webkit.org/show_bug.cgi?id=174253
Reviewed by Alex Christensen.
Gather the common WebCrypto source files in CMakeLists.txt, including them
in the build unconditionally and instead relying on ENABLE_SUBTLE_CRYPTO
build guards to exclude the code from compilation if the feature is disabled.
PlatformGTK.cmake, PlatformMac.cmake and PlatformWPE.cmake can then remove
duplicated build targets. PlatformMac.cmake still lists all the Mac-specific
Web Crypto build targets.
PlatformGTK.cmake and PlatformWPE.cmake now include GCrypt.cmake if the
USE_GCRYPT variable is enabled. Both ports at the moment enable that variable
though as they by default leverage a libgcrypt-based CrpytoDigest implementation
in the PAL library.
The new GCrypt.cmake file adds the libgcrypt-specific Web Crypto build targets to
the build and also sets up libgcrypt include directiories and libraries.
No new tests -- no change in behavior.
* CMakeLists.txt:
* PlatformGTK.cmake:
* PlatformMac.cmake:
* PlatformWPE.cmake:
* platform/GCrypt.cmake: Added.
Modified Paths
Added Paths
Diff
Modified: trunk/Source/WebCore/CMakeLists.txt (219675 => 219676)
--- trunk/Source/WebCore/CMakeLists.txt 2017-07-20 05:46:30 UTC (rev 219675)
+++ trunk/Source/WebCore/CMakeLists.txt 2017-07-20 05:57:35 UTC (rev 219676)
@@ -1293,6 +1293,41 @@
contentextensions/NFAToDFA.cpp
contentextensions/URLFilterParser.cpp
+ crypto/CryptoAlgorithm.cpp
+ crypto/CryptoAlgorithmRegistry.cpp
+ crypto/CryptoKey.cpp
+ crypto/SubtleCrypto.cpp
+ crypto/WebKitSubtleCrypto.cpp
+
+ crypto/algorithms/CryptoAlgorithmAES_CBC.cpp
+ crypto/algorithms/CryptoAlgorithmAES_CFB.cpp
+ crypto/algorithms/CryptoAlgorithmAES_CTR.cpp
+ crypto/algorithms/CryptoAlgorithmAES_GCM.cpp
+ crypto/algorithms/CryptoAlgorithmAES_KW.cpp
+ crypto/algorithms/CryptoAlgorithmECDH.cpp
+ crypto/algorithms/CryptoAlgorithmECDSA.cpp
+ crypto/algorithms/CryptoAlgorithmHKDF.cpp
+ crypto/algorithms/CryptoAlgorithmHMAC.cpp
+ crypto/algorithms/CryptoAlgorithmPBKDF2.cpp
+ crypto/algorithms/CryptoAlgorithmRSAES_PKCS1_v1_5.cpp
+ crypto/algorithms/CryptoAlgorithmRSASSA_PKCS1_v1_5.cpp
+ crypto/algorithms/CryptoAlgorithmRSA_OAEP.cpp
+ crypto/algorithms/CryptoAlgorithmRSA_PSS.cpp
+ crypto/algorithms/CryptoAlgorithmSHA1.cpp
+ crypto/algorithms/CryptoAlgorithmSHA224.cpp
+ crypto/algorithms/CryptoAlgorithmSHA256.cpp
+ crypto/algorithms/CryptoAlgorithmSHA384.cpp
+ crypto/algorithms/CryptoAlgorithmSHA512.cpp
+
+ crypto/keys/CryptoKeyAES.cpp
+ crypto/keys/CryptoKeyDataOctetSequence.cpp
+ crypto/keys/CryptoKeyDataRSAComponents.cpp
+ crypto/keys/CryptoKeyEC.cpp
+ crypto/keys/CryptoKeyHMAC.cpp
+ crypto/keys/CryptoKeyRSA.cpp
+ crypto/keys/CryptoKeyRaw.cpp
+ crypto/keys/CryptoKeySerializationRaw.cpp
+
css/BasicShapeFunctions.cpp
css/CSSAspectRatioValue.cpp
css/CSSBasicShapes.cpp
Modified: trunk/Source/WebCore/ChangeLog (219675 => 219676)
--- trunk/Source/WebCore/ChangeLog 2017-07-20 05:46:30 UTC (rev 219675)
+++ trunk/Source/WebCore/ChangeLog 2017-07-20 05:57:35 UTC (rev 219676)
@@ -1,3 +1,34 @@
+2017-07-19 Zan Dobersek <[email protected]>
+
+ [CMake] Clean up Web Crypto build targets
+ https://bugs.webkit.org/show_bug.cgi?id=174253
+
+ Reviewed by Alex Christensen.
+
+ Gather the common WebCrypto source files in CMakeLists.txt, including them
+ in the build unconditionally and instead relying on ENABLE_SUBTLE_CRYPTO
+ build guards to exclude the code from compilation if the feature is disabled.
+
+ PlatformGTK.cmake, PlatformMac.cmake and PlatformWPE.cmake can then remove
+ duplicated build targets. PlatformMac.cmake still lists all the Mac-specific
+ Web Crypto build targets.
+
+ PlatformGTK.cmake and PlatformWPE.cmake now include GCrypt.cmake if the
+ USE_GCRYPT variable is enabled. Both ports at the moment enable that variable
+ though as they by default leverage a libgcrypt-based CrpytoDigest implementation
+ in the PAL library.
+
+ The new GCrypt.cmake file adds the libgcrypt-specific Web Crypto build targets to
+ the build and also sets up libgcrypt include directiories and libraries.
+
+ No new tests -- no change in behavior.
+
+ * CMakeLists.txt:
+ * PlatformGTK.cmake:
+ * PlatformMac.cmake:
+ * PlatformWPE.cmake:
+ * platform/GCrypt.cmake: Added.
+
2017-07-19 Sam Weinig <[email protected]>
[WebIDL] Remove custom bindings for CommandLineAPIHost
Modified: trunk/Source/WebCore/PlatformGTK.cmake (219675 => 219676)
--- trunk/Source/WebCore/PlatformGTK.cmake 2017-07-20 05:46:30 UTC (rev 219675)
+++ trunk/Source/WebCore/PlatformGTK.cmake 2017-07-20 05:57:35 UTC (rev 219676)
@@ -1,5 +1,6 @@
include(platform/Cairo.cmake)
include(platform/FreeType.cmake)
+include(platform/GCrypt.cmake)
include(platform/GStreamer.cmake)
include(platform/ImageDecoders.cmake)
include(platform/Linux.cmake)
@@ -214,7 +215,6 @@
${GLIB_GOBJECT_LIBRARIES}
${GLIB_LIBRARIES}
${GUDEV_LIBRARIES}
- ${LIBGCRYPT_LIBRARIES}
${LIBSECRET_LIBRARIES}
${LIBSOUP_LIBRARIES}
${LIBTASN1_LIBRARIES}
@@ -241,7 +241,6 @@
${GIO_UNIX_INCLUDE_DIRS}
${GLIB_INCLUDE_DIRS}
${GUDEV_INCLUDE_DIRS}
- ${LIBGCRYPT_INCLUDE_DIRS}
${LIBSECRET_INCLUDE_DIRS}
${LIBSOUP_INCLUDE_DIRS}
${LIBTASN1_INCLUDE_DIRS}
@@ -335,61 +334,3 @@
platform/ScrollAnimationSmooth.cpp
)
endif ()
-
-if (ENABLE_SUBTLE_CRYPTO)
- list(APPEND WebCore_SOURCES
- crypto/CryptoAlgorithm.cpp
- crypto/CryptoAlgorithmRegistry.cpp
- crypto/CryptoKey.cpp
- crypto/SubtleCrypto.cpp
- crypto/WebKitSubtleCrypto.cpp
-
- crypto/algorithms/CryptoAlgorithmAES_CBC.cpp
- crypto/algorithms/CryptoAlgorithmAES_CFB.cpp
- crypto/algorithms/CryptoAlgorithmAES_CTR.cpp
- crypto/algorithms/CryptoAlgorithmAES_GCM.cpp
- crypto/algorithms/CryptoAlgorithmAES_KW.cpp
- crypto/algorithms/CryptoAlgorithmECDH.cpp
- crypto/algorithms/CryptoAlgorithmECDSA.cpp
- crypto/algorithms/CryptoAlgorithmHKDF.cpp
- crypto/algorithms/CryptoAlgorithmHMAC.cpp
- crypto/algorithms/CryptoAlgorithmPBKDF2.cpp
- crypto/algorithms/CryptoAlgorithmRSAES_PKCS1_v1_5.cpp
- crypto/algorithms/CryptoAlgorithmRSASSA_PKCS1_v1_5.cpp
- crypto/algorithms/CryptoAlgorithmRSA_OAEP.cpp
- crypto/algorithms/CryptoAlgorithmRSA_PSS.cpp
- crypto/algorithms/CryptoAlgorithmSHA1.cpp
- crypto/algorithms/CryptoAlgorithmSHA224.cpp
- crypto/algorithms/CryptoAlgorithmSHA256.cpp
- crypto/algorithms/CryptoAlgorithmSHA384.cpp
- crypto/algorithms/CryptoAlgorithmSHA512.cpp
-
- crypto/gcrypt/CryptoAlgorithmAES_CBCGCrypt.cpp
- crypto/gcrypt/CryptoAlgorithmAES_CFBGCrypt.cpp
- crypto/gcrypt/CryptoAlgorithmAES_CTRGCrypt.cpp
- crypto/gcrypt/CryptoAlgorithmAES_GCMGCrypt.cpp
- crypto/gcrypt/CryptoAlgorithmAES_KWGCrypt.cpp
- crypto/gcrypt/CryptoAlgorithmECDHGCrypt.cpp
- crypto/gcrypt/CryptoAlgorithmECDSAGCrypt.cpp
- crypto/gcrypt/CryptoAlgorithmHKDFGCrypt.cpp
- crypto/gcrypt/CryptoAlgorithmHMACGCrypt.cpp
- crypto/gcrypt/CryptoAlgorithmPBKDF2GCrypt.cpp
- crypto/gcrypt/CryptoAlgorithmRSAES_PKCS1_v1_5GCrypt.cpp
- crypto/gcrypt/CryptoAlgorithmRSASSA_PKCS1_v1_5GCrypt.cpp
- crypto/gcrypt/CryptoAlgorithmRSA_OAEPGCrypt.cpp
- crypto/gcrypt/CryptoAlgorithmRSA_PSSGCrypt.cpp
- crypto/gcrypt/CryptoAlgorithmRegistryGCrypt.cpp
- crypto/gcrypt/CryptoKeyECGCrypt.cpp
- crypto/gcrypt/CryptoKeyRSAGCrypt.cpp
- crypto/gcrypt/SerializedCryptoKeyWrapGCrypt.cpp
-
- crypto/keys/CryptoKeyAES.cpp
- crypto/keys/CryptoKeyDataOctetSequence.cpp
- crypto/keys/CryptoKeyDataRSAComponents.cpp
- crypto/keys/CryptoKeyEC.cpp
- crypto/keys/CryptoKeyHMAC.cpp
- crypto/keys/CryptoKeyRSA.cpp
- crypto/keys/CryptoKeyRaw.cpp
- crypto/keys/CryptoKeySerializationRaw.cpp
- )
-endif ()
Modified: trunk/Source/WebCore/PlatformMac.cmake (219675 => 219676)
--- trunk/Source/WebCore/PlatformMac.cmake 2017-07-20 05:46:30 UTC (rev 219675)
+++ trunk/Source/WebCore/PlatformMac.cmake 2017-07-20 05:57:35 UTC (rev 219676)
@@ -174,41 +174,7 @@
bridge/objc/objc_utility.mm
crypto/CommonCryptoUtilities.cpp
- crypto/CryptoAlgorithm.cpp
- crypto/CryptoAlgorithmRegistry.cpp
- crypto/CryptoKey.cpp
- crypto/SubtleCrypto.cpp
- crypto/WebKitSubtleCrypto.cpp
- crypto/algorithms/CryptoAlgorithmAES_CBC.cpp
- crypto/algorithms/CryptoAlgorithmAES_CFB.cpp
- crypto/algorithms/CryptoAlgorithmAES_CTR.cpp
- crypto/algorithms/CryptoAlgorithmAES_GCM.cpp
- crypto/algorithms/CryptoAlgorithmAES_KW.cpp
- crypto/algorithms/CryptoAlgorithmECDH.cpp
- crypto/algorithms/CryptoAlgorithmECDSA.cpp
- crypto/algorithms/CryptoAlgorithmHKDF.cpp
- crypto/algorithms/CryptoAlgorithmHMAC.cpp
- crypto/algorithms/CryptoAlgorithmPBKDF2.cpp
- crypto/algorithms/CryptoAlgorithmRSAES_PKCS1_v1_5.cpp
- crypto/algorithms/CryptoAlgorithmRSASSA_PKCS1_v1_5.cpp
- crypto/algorithms/CryptoAlgorithmRSA_OAEP.cpp
- crypto/algorithms/CryptoAlgorithmRSA_PSS.cpp
- crypto/algorithms/CryptoAlgorithmSHA1.cpp
- crypto/algorithms/CryptoAlgorithmSHA224.cpp
- crypto/algorithms/CryptoAlgorithmSHA256.cpp
- crypto/algorithms/CryptoAlgorithmSHA384.cpp
- crypto/algorithms/CryptoAlgorithmSHA512.cpp
-
- crypto/keys/CryptoKeyAES.cpp
- crypto/keys/CryptoKeyDataOctetSequence.cpp
- crypto/keys/CryptoKeyDataRSAComponents.cpp
- crypto/keys/CryptoKeyEC.cpp
- crypto/keys/CryptoKeyHMAC.cpp
- crypto/keys/CryptoKeyRSA.cpp
- crypto/keys/CryptoKeyRaw.cpp
- crypto/keys/CryptoKeySerializationRaw.cpp
-
crypto/mac/CommonCryptoDERUtilities.cpp
crypto/mac/CryptoAlgorithmAES_CBCMac.cpp
crypto/mac/CryptoAlgorithmAES_CFBMac.cpp
Modified: trunk/Source/WebCore/PlatformWPE.cmake (219675 => 219676)
--- trunk/Source/WebCore/PlatformWPE.cmake 2017-07-20 05:46:30 UTC (rev 219675)
+++ trunk/Source/WebCore/PlatformWPE.cmake 2017-07-20 05:57:35 UTC (rev 219676)
@@ -1,5 +1,6 @@
include(platform/Cairo.cmake)
include(platform/FreeType.cmake)
+include(platform/GCrypt.cmake)
include(platform/GStreamer.cmake)
include(platform/ImageDecoders.cmake)
include(platform/Linux.cmake)
@@ -167,7 +168,6 @@
${GLIB_LIBRARIES}
${GNUTLS_LIBRARIES}
${ICU_LIBRARIES}
- ${LIBGCRYPT_LIBRARIES}
${LIBSOUP_LIBRARIES}
${LIBTASN1_LIBRARIES}
${LIBXML2_LIBRARIES}
@@ -182,7 +182,6 @@
${GLIB_INCLUDE_DIRS}
${GNUTLS_INCLUDE_DIRS}
${ICU_INCLUDE_DIRS}
- ${LIBGCRYPT_INCLUDE_DIRS}
${LIBSOUP_INCLUDE_DIRS}
${LIBTASN1_INCLUDE_DIRS}
${LIBXML2_INCLUDE_DIR}
@@ -203,62 +202,3 @@
target_link_libraries(WebCorePlatformWPE
${WebCore_LIBRARIES}
)
-
-if (ENABLE_SUBTLE_CRYPTO)
- list(APPEND WebCore_SOURCES
- crypto/CryptoAlgorithm.cpp
- crypto/CryptoAlgorithmRegistry.cpp
- crypto/CryptoKey.cpp
- crypto/SubtleCrypto.cpp
- crypto/WebKitSubtleCrypto.cpp
-
- crypto/algorithms/CryptoAlgorithmAES_CBC.cpp
- crypto/algorithms/CryptoAlgorithmAES_CFB.cpp
- crypto/algorithms/CryptoAlgorithmAES_CTR.cpp
- crypto/algorithms/CryptoAlgorithmAES_GCM.cpp
- crypto/algorithms/CryptoAlgorithmAES_KW.cpp
- crypto/algorithms/CryptoAlgorithmECDH.cpp
- crypto/algorithms/CryptoAlgorithmECDSA.cpp
- crypto/algorithms/CryptoAlgorithmHKDF.cpp
- crypto/algorithms/CryptoAlgorithmHMAC.cpp
- crypto/algorithms/CryptoAlgorithmPBKDF2.cpp
- crypto/algorithms/CryptoAlgorithmRSAES_PKCS1_v1_5.cpp
- crypto/algorithms/CryptoAlgorithmRSASSA_PKCS1_v1_5.cpp
- crypto/algorithms/CryptoAlgorithmRSA_OAEP.cpp
- crypto/algorithms/CryptoAlgorithmRSA_PSS.cpp
- crypto/algorithms/CryptoAlgorithmSHA1.cpp
- crypto/algorithms/CryptoAlgorithmSHA224.cpp
- crypto/algorithms/CryptoAlgorithmSHA256.cpp
- crypto/algorithms/CryptoAlgorithmSHA384.cpp
- crypto/algorithms/CryptoAlgorithmSHA512.cpp
-
- crypto/gcrypt/CryptoAlgorithmAES_CBCGCrypt.cpp
- crypto/gcrypt/CryptoAlgorithmAES_CFBGCrypt.cpp
- crypto/gcrypt/CryptoAlgorithmAES_CTRGCrypt.cpp
- crypto/gcrypt/CryptoAlgorithmAES_GCMGCrypt.cpp
- crypto/gcrypt/CryptoAlgorithmAES_KWGCrypt.cpp
- crypto/gcrypt/CryptoAlgorithmECDHGCrypt.cpp
- crypto/gcrypt/CryptoAlgorithmECDSAGCrypt.cpp
- crypto/gcrypt/CryptoAlgorithmHKDFGCrypt.cpp
- crypto/gcrypt/CryptoAlgorithmHMACGCrypt.cpp
- crypto/gcrypt/CryptoAlgorithmPBKDF2GCrypt.cpp
- crypto/gcrypt/CryptoAlgorithmRSAES_PKCS1_v1_5GCrypt.cpp
- crypto/gcrypt/CryptoAlgorithmRSASSA_PKCS1_v1_5GCrypt.cpp
- crypto/gcrypt/CryptoAlgorithmRSA_OAEPGCrypt.cpp
- crypto/gcrypt/CryptoAlgorithmRSA_PSSGCrypt.cpp
- crypto/gcrypt/CryptoAlgorithmRegistryGCrypt.cpp
- crypto/gcrypt/CryptoKeyECGCrypt.cpp
- crypto/gcrypt/CryptoKeyRSAGCrypt.cpp
- crypto/gcrypt/SerializedCryptoKeyWrapGCrypt.cpp
-
- crypto/keys/CryptoKeyAES.cpp
- crypto/keys/CryptoKeyDataOctetSequence.cpp
- crypto/keys/CryptoKeyDataRSAComponents.cpp
- crypto/keys/CryptoKeyEC.cpp
- crypto/keys/CryptoKeyHMAC.cpp
- crypto/keys/CryptoKeyRSA.cpp
- crypto/keys/CryptoKeyRaw.cpp
- crypto/keys/CryptoKeySerializationRaw.cpp
- )
-endif ()
-
Added: trunk/Source/WebCore/platform/GCrypt.cmake (0 => 219676)
--- trunk/Source/WebCore/platform/GCrypt.cmake (rev 0)
+++ trunk/Source/WebCore/platform/GCrypt.cmake 2017-07-20 05:57:35 UTC (rev 219676)
@@ -0,0 +1,29 @@
+if (ENABLE_SUBTLE_CRYPTO)
+ list(APPEND WebCore_SOURCES
+ crypto/gcrypt/CryptoAlgorithmAES_CBCGCrypt.cpp
+ crypto/gcrypt/CryptoAlgorithmAES_CFBGCrypt.cpp
+ crypto/gcrypt/CryptoAlgorithmAES_CTRGCrypt.cpp
+ crypto/gcrypt/CryptoAlgorithmAES_GCMGCrypt.cpp
+ crypto/gcrypt/CryptoAlgorithmAES_KWGCrypt.cpp
+ crypto/gcrypt/CryptoAlgorithmECDHGCrypt.cpp
+ crypto/gcrypt/CryptoAlgorithmECDSAGCrypt.cpp
+ crypto/gcrypt/CryptoAlgorithmHKDFGCrypt.cpp
+ crypto/gcrypt/CryptoAlgorithmHMACGCrypt.cpp
+ crypto/gcrypt/CryptoAlgorithmPBKDF2GCrypt.cpp
+ crypto/gcrypt/CryptoAlgorithmRSAES_PKCS1_v1_5GCrypt.cpp
+ crypto/gcrypt/CryptoAlgorithmRSASSA_PKCS1_v1_5GCrypt.cpp
+ crypto/gcrypt/CryptoAlgorithmRSA_OAEPGCrypt.cpp
+ crypto/gcrypt/CryptoAlgorithmRSA_PSSGCrypt.cpp
+ crypto/gcrypt/CryptoAlgorithmRegistryGCrypt.cpp
+ crypto/gcrypt/CryptoKeyECGCrypt.cpp
+ crypto/gcrypt/CryptoKeyRSAGCrypt.cpp
+ crypto/gcrypt/SerializedCryptoKeyWrapGCrypt.cpp
+ )
+endif ()
+
+list(APPEND WebCore_LIBRARIES
+ ${LIBGCRYPT_LIBRARIES}
+)
+list(APPEND WebCore_INCLUDE_DIRECTORIES
+ ${LIBGCRYPT_INCLUDE_DIRS}
+)
Modified: trunk/Source/cmake/OptionsGTK.cmake (219675 => 219676)
--- trunk/Source/cmake/OptionsGTK.cmake 2017-07-20 05:46:30 UTC (rev 219675)
+++ trunk/Source/cmake/OptionsGTK.cmake 2017-07-20 05:57:35 UTC (rev 219676)
@@ -57,6 +57,7 @@
set(USE_CAIRO ON)
set(USE_WOFF2 ON)
set(USE_XDGMIME ON)
+SET_AND_EXPOSE_TO_BUILD(USE_GCRYPT TRUE)
# For old versions of HarfBuzz that do not expose an API for the OpenType MATH
# table, we enable our own code to parse that table.
@@ -274,7 +275,6 @@
if (LIBGCRYPT_VERSION VERSION_LESS 1.7.0)
message(FATAL_ERROR "libgcrypt 1.7.0 is required to enable Web Crypto API support.")
endif ()
- SET_AND_EXPOSE_TO_BUILD(USE_GCRYPT TRUE)
endif ()
if (ENABLE_WEBDRIVER)
Modified: trunk/Source/cmake/OptionsWPE.cmake (219675 => 219676)
--- trunk/Source/cmake/OptionsWPE.cmake 2017-07-20 05:46:30 UTC (rev 219675)
+++ trunk/Source/cmake/OptionsWPE.cmake 2017-07-20 05:57:35 UTC (rev 219676)
@@ -83,6 +83,7 @@
set(USE_CAIRO ON)
set(USE_XDGMIME ON)
+SET_AND_EXPOSE_TO_BUILD(USE_GCRYPT TRUE)
if (ENABLE_VIDEO OR ENABLE_WEB_AUDIO)
set(GSTREAMER_COMPONENTS app audio pbutils)
@@ -121,7 +122,6 @@
if (LIBGCRYPT_VERSION VERSION_LESS 1.7.0)
message(FATAL_ERROR "libgcrypt 1.7.0 is required to enable Web Crypto API support.")
endif ()
- SET_AND_EXPOSE_TO_BUILD(USE_GCRYPT TRUE)
endif ()
add_definitions(-DBUILDING_WPE__=1)