Commit 4f8a599d authored by paroga@webkit.org's avatar paroga@webkit.org

2010-12-07 Patrick Gansterer <paroga@webkit.org>

        Reviewed by Andreas Kling.

        [CMake] Remove WebKitGenerators
        https://bugs.webkit.org/show_bug.cgi?id=50445

        * CMakeLists.txt:
        * cmake/WebKitGenerators.cmake: Removed.
2010-12-07  Patrick Gansterer  <paroga@webkit.org>

        Reviewed by Andreas Kling.

        [CMake] Remove WebKitGenerators
        https://bugs.webkit.org/show_bug.cgi?id=50445

        Move remaining logic into main CMakeLists.txt.

        * CMakeLists.txt:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@73434 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 6261f1f0
CMAKE_MINIMUM_REQUIRED(VERSION 2.8) CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
PROJECT(WebKit) PROJECT(WebKit)
# Set a default build type if and only if user did not define one as command # Set a default build type if and only if user did not define one as command
# line options and he did not give custom CFLAGS or CXXFLAGS. Otherwise, flags # line options and he did not give custom CFLAGS or CXXFLAGS. Otherwise, flags
# from default build type would overwrite user-defined ones. # from default build type would overwrite user-defined ones.
IF (NOT CMAKE_BUILD_TYPE AND NOT CMAKE_C_FLAGS AND NOT CMAKE_CXX_FLAGS) IF (NOT CMAKE_BUILD_TYPE AND NOT CMAKE_C_FLAGS AND NOT CMAKE_CXX_FLAGS)
SET(CMAKE_BUILD_TYPE Release) SET(CMAKE_BUILD_TYPE Release)
ENDIF () ENDIF ()
SET(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake") SET(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake")
SET(JAVASCRIPTCORE_DIR "${CMAKE_SOURCE_DIR}/JavaScriptCore") SET(JAVASCRIPTCORE_DIR "${CMAKE_SOURCE_DIR}/JavaScriptCore")
SET(WEBCORE_DIR "${CMAKE_SOURCE_DIR}/WebCore") SET(WEBCORE_DIR "${CMAKE_SOURCE_DIR}/WebCore")
SET(WEBKIT_DIR "${CMAKE_SOURCE_DIR}/WebKit") SET(WEBKIT_DIR "${CMAKE_SOURCE_DIR}/WebKit")
SET(WEBKITTOOLS_DIR "${CMAKE_SOURCE_DIR}/WebKitTools") SET(WEBKITTOOLS_DIR "${CMAKE_SOURCE_DIR}/WebKitTools")
SET(DERIVED_SOURCES_DIR "${CMAKE_BINARY_DIR}/DerivedSources") SET(DERIVED_SOURCES_DIR "${CMAKE_BINARY_DIR}/DerivedSources")
INCLUDE(WebKitMacros) INCLUDE(WebKitMacros)
INCLUDE(WebKitGenerators) INCLUDE(WebKitFS)
INCLUDE(WebKitHelpers) INCLUDE(WebKitHelpers)
INCLUDE(WebKitFeatures) INCLUDE(WebKitFeatures)
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
# Determine which port will be built # Determine which port will be built
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
SET(ALL_PORTS Efl) SET(ALL_PORTS Efl)
OPTION(PORT "choose which WebKit port to build (one of ${ALL_PORTS})" "NOPORT") OPTION(PORT "choose which WebKit port to build (one of ${ALL_PORTS})" "NOPORT")
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
# Find common packages (used by all ports) # Find common packages (used by all ports)
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
FIND_PACKAGE(BISON REQUIRED) FIND_PACKAGE(BISON REQUIRED)
FIND_PACKAGE(FLEX REQUIRED) FIND_PACKAGE(FLEX REQUIRED)
FIND_PACKAGE(Gperf REQUIRED) FIND_PACKAGE(Gperf REQUIRED)
FIND_PACKAGE(Perl REQUIRED) FIND_PACKAGE(Perl REQUIRED)
FIND_PACKAGE(PythonInterp REQUIRED) FIND_PACKAGE(PythonInterp REQUIRED)
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
# Determine the target processor # Determine the target processor
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
STRING(TOLOWER ${CMAKE_SYSTEM_PROCESSOR} LOWERCASE_CMAKE_SYSTEM_PROCESSOR) STRING(TOLOWER ${CMAKE_SYSTEM_PROCESSOR} LOWERCASE_CMAKE_SYSTEM_PROCESSOR)
IF (LOWERCASE_CMAKE_SYSTEM_PROCESSOR MATCHES "^arm") IF (LOWERCASE_CMAKE_SYSTEM_PROCESSOR MATCHES "^arm")
SET(WTF_CPU_ARM 1) SET(WTF_CPU_ARM 1)
ELSEIF (LOWERCASE_CMAKE_SYSTEM_PROCESSOR MATCHES "(x86_64)") ELSEIF (LOWERCASE_CMAKE_SYSTEM_PROCESSOR MATCHES "(x86_64)")
SET(WTF_CPU_X86_64 1) SET(WTF_CPU_X86_64 1)
ELSEIF (LOWERCASE_CMAKE_SYSTEM_PROCESSOR MATCHES "(i[3-6]86|x86)") ELSEIF (LOWERCASE_CMAKE_SYSTEM_PROCESSOR MATCHES "(i[3-6]86|x86)")
SET(WTF_CPU_X86 1) SET(WTF_CPU_X86 1)
ELSE () ELSE ()
MESSAGE(FATAL_ERROR "Unknown CPU '${CMAKE_SYSTEM_PROCESSOR}'") MESSAGE(FATAL_ERROR "Unknown CPU '${CMAKE_SYSTEM_PROCESSOR}'")
ENDIF () ENDIF ()
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
# Determine the operating system # Determine the operating system
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
IF (CMAKE_SYSTEM_NAME MATCHES "Linux") IF (CMAKE_SYSTEM_NAME MATCHES "Linux")
SET(WTF_OS_UNIX 1) SET(WTF_OS_UNIX 1)
IF (APPLE) IF (APPLE)
SET(WTF_OS_MAC_OS_X 1) SET(WTF_OS_MAC_OS_X 1)
ENDIF () ENDIF ()
ELSEIF (CMAKE_SYSTEM_NAME MATCHES "Windows") ELSEIF (CMAKE_SYSTEM_NAME MATCHES "Windows")
SET(WTF_OS_WINDOWS 1) SET(WTF_OS_WINDOWS 1)
ELSE () ELSE ()
MESSAGE(FATAL_ERROR "Unknown OS '${CMAKE_SYSTEM_NAME}'") MESSAGE(FATAL_ERROR "Unknown OS '${CMAKE_SYSTEM_NAME}'")
ENDIF () ENDIF ()
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
# Default target names (can be overrriden in Options${PORT}.cmake file) # Default target names (can be overrriden in Options${PORT}.cmake file)
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
SET(JSC_EXECUTABLE_NAME JSC) SET(JSC_EXECUTABLE_NAME JSC)
SET(WTF_LIBRARY_NAME WTF) SET(WTF_LIBRARY_NAME WTF)
SET(JavaScriptCore_LIBRARY_NAME JavaScriptCore) SET(JavaScriptCore_LIBRARY_NAME JavaScriptCore)
SET(WebCore_LIBRARY_NAME WebCore) SET(WebCore_LIBRARY_NAME WebCore)
SET(WebKit_LIBRARY_NAME WebKit) SET(WebKit_LIBRARY_NAME WebKit)
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
# Default library types # Default library types
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
OPTION(SHARED_CORE "build WTF, JavaScriptCore and WebCore as shared libraries") OPTION(SHARED_CORE "build WTF, JavaScriptCore and WebCore as shared libraries")
IF (SHARED_CORE) IF (SHARED_CORE)
SET(WTF_LIBRARY_TYPE SHARED) SET(WTF_LIBRARY_TYPE SHARED)
SET(JavaScriptCore_LIBRARY_TYPE SHARED) SET(JavaScriptCore_LIBRARY_TYPE SHARED)
SET(WebCore_LIBRARY_TYPE SHARED) SET(WebCore_LIBRARY_TYPE SHARED)
ELSE () ELSE ()
SET(WTF_LIBRARY_TYPE STATIC) SET(WTF_LIBRARY_TYPE STATIC)
SET(JavaScriptCore_LIBRARY_TYPE STATIC) SET(JavaScriptCore_LIBRARY_TYPE STATIC)
SET(WebCore_LIBRARY_TYPE STATIC) SET(WebCore_LIBRARY_TYPE STATIC)
ENDIF () ENDIF ()
SET(WebKit_LIBRARY_TYPE SHARED) SET(WebKit_LIBRARY_TYPE SHARED)
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
# Port-specific options # Port-specific options
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
INCLUDE(OptionsCommon) INCLUDE(OptionsCommon)
INCLUDE(Options${PORT}) INCLUDE(Options${PORT})
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
# Define packaging # Define packaging
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
INCLUDE(WebKitPackaging) INCLUDE(WebKitPackaging)
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
# Add module directories # Add module directories
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
ADD_SUBDIRECTORY(JavaScriptCore) ADD_SUBDIRECTORY(JavaScriptCore)
ADD_SUBDIRECTORY(WebCore) ADD_SUBDIRECTORY(WebCore)
ADD_SUBDIRECTORY(WebKit) ADD_SUBDIRECTORY(WebKit)
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
# Add test browser if exists # Add test browser if exists
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
INCLUDE_IF_EXISTS(${WEBKITTOOLS_DIR}/CMakeLists${PORT}.txt) INCLUDE_IF_EXISTS(${WEBKITTOOLS_DIR}/CMakeLists${PORT}.txt)
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
# Set compiler flags for all targets # Set compiler flags for all targets
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
WEBKIT_SET_EXTRA_COMPILER_FLAGS(${WTF_LIBRARY_NAME}) WEBKIT_SET_EXTRA_COMPILER_FLAGS(${WTF_LIBRARY_NAME})
WEBKIT_SET_EXTRA_COMPILER_FLAGS(${JavaScriptCore_LIBRARY_NAME}) WEBKIT_SET_EXTRA_COMPILER_FLAGS(${JavaScriptCore_LIBRARY_NAME})
WEBKIT_SET_EXTRA_COMPILER_FLAGS(${WebCore_LIBRARY_NAME}) WEBKIT_SET_EXTRA_COMPILER_FLAGS(${WebCore_LIBRARY_NAME})
WEBKIT_SET_EXTRA_COMPILER_FLAGS(${WebKit_LIBRARY_NAME}) WEBKIT_SET_EXTRA_COMPILER_FLAGS(${WebKit_LIBRARY_NAME})
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
# Create the configuration file # Create the configuration file
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
CONFIGURE_FILE(cmakeconfig.h.cmake ${CMAKE_BINARY_DIR}/cmakeconfig.h @ONLY) CONFIGURE_FILE(cmakeconfig.h.cmake ${CMAKE_BINARY_DIR}/cmakeconfig.h @ONLY)
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
# Prints a summary of all enabled/disabled features # Prints a summary of all enabled/disabled features
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
WEBKIT_PRINT_FEATURES() WEBKIT_PRINT_FEATURES()
2010-12-07 Patrick Gansterer <paroga@webkit.org>
Reviewed by Andreas Kling.
[CMake] Remove WebKitGenerators
https://bugs.webkit.org/show_bug.cgi?id=50445
* CMakeLists.txt:
* cmake/WebKitGenerators.cmake: Removed.
2010-12-06 Patrick Gansterer <paroga@webkit.org> 2010-12-06 Patrick Gansterer <paroga@webkit.org>
Reviewed by Andreas Kling. Reviewed by Andreas Kling.
......
...@@ -2048,12 +2048,19 @@ FOREACH (_feature ${FEATURE_DEFINES}) ...@@ -2048,12 +2048,19 @@ FOREACH (_feature ${FEATURE_DEFINES})
SET(FEATURE_DEFINES_JAVASCRIPT "${FEATURE_DEFINES_JAVASCRIPT} ${_feature}") SET(FEATURE_DEFINES_JAVASCRIPT "${FEATURE_DEFINES_JAVASCRIPT} ${_feature}")
ENDFOREACH () ENDFOREACH ()
# Create JavaScript C++ code given an IDL input
FOREACH (_file ${WebCore_IDL_FILES}) FOREACH (_file ${WebCore_IDL_FILES})
GENERATE_JS_FROM_IDL(${_file}) GET_FILENAME_COMPONENT (_name ${_file} NAME_WE)
ADD_CUSTOM_COMMAND(
OUTPUT ${DERIVED_SOURCES_DIR}/JS${_name}.cpp ${DERIVED_SOURCES_DIR}/JS${_name}.h
MAIN_DEPENDENCY ${_file}
DEPENDS ${WEBCORE_DIR}/bindings/scripts/generate-bindings.pl ${SCRIPTS_BINDINGS} ${_file}
COMMAND ${PERL_EXECUTABLE} -I${WEBCORE_DIR}/bindings/scripts ${WEBCORE_DIR}/bindings/scripts/generate-bindings.pl --defines "${FEATURE_DEFINES_JAVASCRIPT}" --generator JS ${IDL_INCLUDES} --outputDir "${DERIVED_SOURCES_DIR}" ${WEBCORE_DIR}/${_file}
VERBATIM)
LIST(APPEND WebCore_SOURCES ${DERIVED_SOURCES_DIR}/JS${_name}.cpp)
ENDFOREACH () ENDFOREACH ()
LIST(APPEND WebCore_SOURCES ${JS_IDL_FILES})
# All Web Inspector generated files are created with this one call to CodeGeneratorInspector.pm # All Web Inspector generated files are created with this one call to CodeGeneratorInspector.pm
ADD_CUSTOM_COMMAND( ADD_CUSTOM_COMMAND(
......
2010-12-07 Patrick Gansterer <paroga@webkit.org>
Reviewed by Andreas Kling.
[CMake] Remove WebKitGenerators
https://bugs.webkit.org/show_bug.cgi?id=50445
Move remaining logic into main CMakeLists.txt.
* CMakeLists.txt:
2010-12-07 Justin Schuh <jschuh@chromium.org> 2010-12-07 Justin Schuh <jschuh@chromium.org>
Reviewed by Nikolas Zimmermann. Reviewed by Nikolas Zimmermann.
......
# This file provides various generators used by webkit.
# It will check for the programs and define the given executables:
# PERL_EXECUTABLE
# BISON_EXECUTABLE
# GPERF_EXECUTABLE
# FLEX_EXECUTABLE
INCLUDE (WebKitFS)
# Modules that the bindings generator scripts may use
SET(SCRIPTS_BINDINGS
${WEBCORE_DIR}/bindings/scripts/CodeGenerator.pm
${WEBCORE_DIR}/bindings/scripts/IDLParser.pm
${WEBCORE_DIR}/bindings/scripts/IDLStructure.pm
${WEBCORE_DIR}/bindings/scripts/InFilesParser.pm)
SET(BINDING_CODE_GENERATOR ${WEBCORE_DIR}/bindings/scripts/generate-bindings.pl)
SET(JS_IDL_FILES "")
SET(Inspector_IDL_FILES "")
# - Create JS C++ code given an IDL input
# GENERATE_FROM_IDL(generator idl_source)
#
# The generated files (.cpp, .h) lives in ${DERIVED_SOURCES_DIR}.
#
# This function also appends the generated cpp file to JS_IDL_FILES list.
MACRO(GENERATE_JS_FROM_IDL _source)
SET(FEATURE_DEFINES_STR "")
FOREACH (f ${FEATURE_DEFINES})
SET(FEATURE_DEFINES_STR "${FEATURE_DEFINES_STR} ${f}")
ENDFOREACH ()
GET_FILENAME_COMPONENT(_name ${_source} NAME_WE)
ADD_CUSTOM_COMMAND(
OUTPUT ${DERIVED_SOURCES_DIR}/JS${_name}.cpp ${DERIVED_SOURCES_DIR}/JS${_name}.h
DEPENDS ${BINDING_CODE_GENERATOR} ${SCRIPTS_BINDINGS} ${WEBCORE_DIR}/${_source}
COMMAND ${PERL_EXECUTABLE} -I${WEBCORE_DIR}/bindings/scripts ${BINDING_CODE_GENERATOR} ${IDL_INCLUDES} --outputDir "${DERIVED_SOURCES_DIR}" --defines "LANGUAGE_JAVASCRIPT=1 ${FEATURE_DEFINES_STR}" --generator JS ${WEBCORE_DIR}/${_source}
VERBATIM)
LIST(APPEND JS_IDL_FILES ${DERIVED_SOURCES_DIR}/JS${_name}.cpp)
UNSET(_name)
UNSET(_defines)
ENDMACRO()
# - Create Inspector C++ code given an IDL input
# GENERATE_FROM_IDL(generator idl_source)
#
# The generated files (.cpp, .h) lives in ${DERIVED_SOURCES_DIR}.
#
# This function also appends the generated cpp file to Inspector_IDL_FILES list.
MACRO(GENERATE_INSPECTOR_FROM_IDL _source)
SET(FEATURE_DEFINES_STR "")
FOREACH (f ${FEATURE_DEFINES})
SET(FEATURE_DEFINES_STR "${FEATURE_DEFINES_STR} ${f}")
ENDFOREACH ()
GET_FILENAME_COMPONENT(_name ${_source} NAME_WE)
ADD_CUSTOM_COMMAND(
OUTPUT ${DERIVED_SOURCES_DIR}/${_name}Frontend.cpp ${DERIVED_SOURCES_DIR}/${_name}Frontend.h ${DERIVED_SOURCES_DIR}/${_name}BackendDispatcher.cpp ${DERIVED_SOURCES_DIR}/${_name}BackendDispatcher.h
DEPENDS ${BINDING_CODE_GENERATOR} ${SCRIPTS_BINDINGS} ${WEBCORE_DIR}/${_source}
COMMAND ${PERL_EXECUTABLE} -I${WEBCORE_DIR}/bindings/scripts -I${WEBCORE_DIR}/inspector ${BINDING_CODE_GENERATOR} ${IDL_INCLUDES} --outputDir "${DERIVED_SOURCES_DIR}" --defines "LANGUAGE_JAVASCRIPT=1 ${FEATURE_DEFINES_STR}" --generator Inspector ${WEBCORE_DIR}/${_source}
VERBATIM)
LIST(APPEND Inspector_IDL_FILES ${DERIVED_SOURCES_DIR}/${_name}Frontend.cpp)
UNSET(_name)
UNSET(_defines)
ENDMACRO()
# - Create pure JavaScript functions (does nothing so far)
MACRO(GENERATE_JS_FROM_IDL_PURE _source)
GET_FILENAME_COMPONENT(_name ${_source} NAME_WE)
ADD_CUSTOM_COMMAND(
OUTPUT ${DERIVED_SOURCES_DIR}/JS${_name}.cpp ${DERIVED_SOURCES_DIR}/JS${_name}.h
DEPENDS ${BINDING_CODE_GENERATOR} ${SCRIPTS_BINDINGS} ${WEBCORE_DIR}/${_source}
COMMAND ${PERL_EXECUTABLE} -I${WEBCORE_DIR}/bindings/scripts ${BINDING_CODE_GENERATOR} ${IDL_INCLUDES} --outputDir "${DERIVED_SOURCES_DIR}" --defines "LANGUAGE_JAVASCRIPT=1 ${FEATURE_DEFINES_STR}" --generator JS ${WEBCORE_DIR}/${_source}
VERBATIM)
UNSET(_name)
ENDMACRO()
SET(NAMES_GENERATOR ${WEBCORE_DIR}/dom/make_names.pl)
# - Create DOM names and factory given tags and attributes as source.
# GENERATE_DOM_NAMES_FACTORY(namespace tags_source attributes_source [defines])
#
# The generated files lives in ${DERIVED_SOURCES_DIR}. The files will
# be named using the given namespace, such as:
# - ${namespace}Names.cpp, ${namespace}Names.h;
# - ${namespace}ElementFactory.cpp, ${namespace}ElementFactory.h;
# - ${namespace}ElementWrapperFactory.cpp; ${namespace}ElementWrapperFactory.h
#
# If optional defines are given, then they will be speficied using
# --extraDefines directive to the generator script.
MACRO(GENERATE_DOM_NAMES_FACTORY _namespace _tags _attrs)
UNSET(_extradef)
FOREACH (f ${ARGN})
SET(_extradef "${_extradef} ${f}")
ENDFOREACH ()
IF (_extradef)
SET(_extradef --extraDefines=${_extradef})
ENDIF ()
ADD_CUSTOM_COMMAND(
OUTPUT ${DERIVED_SOURCES_DIR}/${_namespace}Names.cpp ${DERIVED_SOURCES_DIR}/${_namespace}Names.h ${DERIVED_SOURCES_DIR}/${_namespace}ElementFactory.cpp ${DERIVED_SOURCES_DIR}/${_namespace}ElementFactory.h ${DERIVED_SOURCES_DIR}/JS${_namespace}ElementWrapperFactory.cpp ${DERIVED_SOURCES_DIR}/JS${_namespace}ElementWrapperFactory.h
DEPENDS ${NAMES_GENERATOR} ${SCRIPTS_BINDINGS} ${_tags} ${_attrs}
COMMAND ${PERL_EXECUTABLE} -I${WEBCORE_DIR}/bindings/scripts ${NAMES_GENERATOR} --tags ${_tags} --attrs ${_attrs} ${_extradef} --factory --wrapperFactory --outputDir ${DERIVED_SOURCES_DIR}
VERBATIM)
UNSET(_extradef)
ENDMACRO ()
# - Create DOM names only (no factories)
# GENERATE_DOM_NAMES_ONLY(namespace attributes_source)
#
# The generated files lives in ${DERIVED_SOURCES_DIR}. The files will
# be named using the given namespace, such as:
# - ${namespace}Names.cpp, ${namespace}Names.h;
MACRO(GENERATE_DOM_NAMES_ONLY _namespace _attrs)
ADD_CUSTOM_COMMAND(
OUTPUT ${DERIVED_SOURCES_DIR}/${_namespace}Names.cpp ${DERIVED_SOURCES_DIR}/${_namespace}Names.h
DEPENDS ${NAMES_GENERATOR} ${SCRIPTS_BINDINGS} ${_attrs}
COMMAND ${PERL_EXECUTABLE} -I${WEBCORE_DIR}/bindings/scripts ${NAMES_GENERATOR} --attrs ${_attrs} --outputDir ${DERIVED_SOURCES_DIR}
VERBATIM)
ENDMACRO()
# - Create ${CMAKE_BINARY_DIR}/JavaScriptCore/pcre/chartables.c
# GENERATE_DFTABLES()
MACRO(GENERATE_DFTABLES)
ADD_CUSTOM_COMMAND(
OUTPUT ${CMAKE_BINARY_DIR}/JavaScriptCore/pcre/chartables.c
DEPENDS ${JAVASCRIPTCORE_DIR}/pcre/dftables
COMMAND ${PERL_EXECUTABLE} ${JAVASCRIPTCORE_DIR}/pcre/dftables ${CMAKE_BINARY_DIR}/JavaScriptCore/pcre/chartables.c
VERBATIM)
ENDMACRO()
SET(MAKE_TOKENIZER ${WEBCORE_DIR}/css/maketokenizer)
# - Create ${DERIVED_SOURCES_DIR}/tokenizer.cpp
# GENERATE_TOKENIZER()
MACRO(GENERATE_TOKENIZER)
ADD_CUSTOM_COMMAND(
OUTPUT ${DERIVED_SOURCES_DIR}/tokenizer.cpp
DEPENDS ${WEBCORE_DIR}/css/tokenizer.flex ${MAKE_TOKENIZER}
COMMAND ${FLEX_EXECUTABLE} -t ${WEBCORE_DIR}/css/tokenizer.flex | ${PERL_EXECUTABLE} ${MAKE_TOKENIZER} > ${DERIVED_SOURCES_DIR}/tokenizer.cpp
VERBATIM)
ENDMACRO()
SET(USER_AGENT_STYLE_SHEETS
${WEBCORE_DIR}/css/html.css
${WEBCORE_DIR}/css/mathml.css
${WEBCORE_DIR}/css/quirks.css
${WEBCORE_DIR}/css/view-source.css
${WEBCORE_DIR}/css/svg.css
${WEBCORE_DIR}/css/wml.css
${WEBCORE_DIR}/css/mediaControls.css)
SET(USER_AGENT_STYLE_SHEETS_GENERATOR ${WEBCORE_DIR}/css/make-css-file-arrays.pl)
# - Create ${DERIVED_SOURCES_DIR}/UserAgentStyleSheetsData.cpp and
# ${DERIVED_SOURCES_DIR}/UserAgentStyleSheets.h
# GENERATE_USER_AGENT_STYLES()
MACRO(GENERATE_USER_AGENT_STYLES)
ADD_CUSTOM_COMMAND(
OUTPUT ${DERIVED_SOURCES_DIR}/UserAgentStyleSheetsData.cpp ${DERIVED_SOURCES_DIR}/UserAgentStyleSheets.h
DEPENDS ${USER_AGENT_STYLE_SHEETS_GENERATOR} ${USER_AGENT_STYLE_SHEETS}
COMMAND ${PERL_EXECUTABLE} ${USER_AGENT_STYLE_SHEETS_GENERATOR} ${DERIVED_SOURCES_DIR}/UserAgentStyleSheets.h ${DERIVED_SOURCES_DIR}/UserAgentStyleSheetsData.cpp ${USER_AGENT_STYLE_SHEETS}
VERBATIM)
ENDMACRO ()
SET(CSS_VALUE_KEYWORDS
${WEBCORE_DIR}/css/CSSValueKeywords.in
${WEBCORE_DIR}/css/SVGCSSValueKeywords.in)
SET(CSS_VALUE_GENERATOR ${WEBCORE_DIR}/css/makevalues.pl)
# - Create ${DERIVED_SOURCES_DIR}/CSSValueKeywords.*
# GENERATE_CSS_VALUE_KEYWORDS()
MACRO(GENERATE_CSS_VALUE_KEYWORDS)
ADD_CUSTOM_COMMAND(
OUTPUT ${DERIVED_SOURCES_DIR}/CSSValueKeywords.h ${DERIVED_SOURCES_DIR}/CSSValueKeywords.cpp ${DERIVED_SOURCES_DIR}/CSSValueKeywords.in ${DERIVED_SOURCES_DIR}/CSSValueKeywords.gperf
DEPENDS ${CSS_VALUE_KEYWORDS} ${CSS_VALUE_GENERATOR}
WORKING_DIRECTORY ${DERIVED_SOURCES_DIR}
COMMAND ${PERL_EXECUTABLE} -ne "print lc" ${CSS_VALUE_KEYWORDS} > ${DERIVED_SOURCES_DIR}/CSSValueKeywords.in
COMMAND ${PERL_EXECUTABLE} ${CSS_VALUE_GENERATOR}
VERBATIM)
ENDMACRO ()
SET(CSS_PROPERTY_NAMES
${WEBCORE_DIR}/css/CSSPropertyNames.in
${WEBCORE_DIR}/css/SVGCSSPropertyNames.in)
SET(MAKE_CSS_PROP ${WEBCORE_DIR}/css/makeprop.pl)
# - Create ${DERIVED_SOURCES_DIR}/CSSPropertyNames.*
# GENERATE_CSS_PROPERTY_NAMES()
MACRO(GENERATE_CSS_PROPERTY_NAMES)
ADD_CUSTOM_COMMAND(
OUTPUT ${DERIVED_SOURCES_DIR}/CSSPropertyNames.h ${DERIVED_SOURCES_DIR}/CSSPropertyNames.cpp ${DERIVED_SOURCES_DIR}/CSSPropertyNames.in ${DERIVED_SOURCES_DIR}/CSSPropertyNames.gperf
DEPENDS ${MAKE_CSS_PROP} ${CSS_PROPERTY_NAMES}
WORKING_DIRECTORY ${DERIVED_SOURCES_DIR}
COMMAND cat ${CSS_PROPERTY_NAMES} > ${DERIVED_SOURCES_DIR}/CSSPropertyNames.in
COMMAND ${PERL_EXECUTABLE} ${MAKE_CSS_PROP}
VERBATIM)
ENDMACRO ()
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment