Simple line path does not respect visibility:hidden
[WebKit-https.git] / CMakeLists.txt
index a16aaa1..10f8505 100644 (file)
@@ -1,13 +1,6 @@
 cmake_minimum_required(VERSION 2.8.3)
 project(WebKit)
 
-# 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
-# from default build type would overwrite user-defined ones.
-if (NOT CMAKE_BUILD_TYPE AND NOT CMAKE_C_FLAGS AND NOT CMAKE_CXX_FLAGS)
-    set(CMAKE_BUILD_TYPE Release)
-endif ()
-
 # -----------------------------------------------------------------------------
 # Default library type
 # -----------------------------------------------------------------------------
@@ -46,7 +39,7 @@ include(WebKitFeatures)
 # -----------------------------------------------------------------------------
 # Determine which port will be built
 # -----------------------------------------------------------------------------
-set(ALL_PORTS Efl WinCE BlackBerry)
+set(ALL_PORTS Efl WinCE BlackBerry GTK)
 set(PORT "NOPORT" CACHE STRING "choose which WebKit port to build (one of ${ALL_PORTS})")
 
 list(FIND ALL_PORTS ${PORT} RET)
@@ -59,27 +52,40 @@ string(TOLOWER ${PORT} WEBKIT_PORT_DIR)
 # -----------------------------------------------------------------------------
 # Find common packages (used by all ports)
 # -----------------------------------------------------------------------------
-find_package(BISON REQUIRED)
-find_package(FLEX REQUIRED)
-find_package(Gperf REQUIRED)
-find_package(Perl REQUIRED)
-find_package(PythonInterp REQUIRED)
-find_package(Ruby)
+find_package(BISON 2.4.1 REQUIRED)
+find_package(FLEX 2.5.34 REQUIRED)
+
+# TODO Enforce version requirement for gperf
+find_package(Gperf 3.0.1 REQUIRED)
+
+# TODO Enforce version requirement for perl
+find_package(Perl 5.10.0 REQUIRED)
+
+find_package(PythonInterp 2.6.0 REQUIRED)
+find_package(Ruby 1.8.7)
 
 # -----------------------------------------------------------------------------
 # Determine the target processor
 # -----------------------------------------------------------------------------
-string(TOLOWER ${CMAKE_SYSTEM_PROCESSOR} LOWERCASE_CMAKE_SYSTEM_PROCESSOR)
+# Use MSVC_CXX_ARCHITECTURE_ID instead of CMAKE_SYSTEM_PROCESSOR when defined,
+# since the later one just resolves to the host processor on Windows.
+if (MSVC_CXX_ARCHITECTURE_ID)
+    string(TOLOWER ${MSVC_CXX_ARCHITECTURE_ID} LOWERCASE_CMAKE_SYSTEM_PROCESSOR)
+else ()
+    string(TOLOWER ${CMAKE_SYSTEM_PROCESSOR} LOWERCASE_CMAKE_SYSTEM_PROCESSOR)
+endif ()
 if (LOWERCASE_CMAKE_SYSTEM_PROCESSOR MATCHES "^arm")
     set(WTF_CPU_ARM 1)
 elseif (LOWERCASE_CMAKE_SYSTEM_PROCESSOR MATCHES "^mips")
     set(WTF_CPU_MIPS 1)
-elseif (LOWERCASE_CMAKE_SYSTEM_PROCESSOR MATCHES "(x86_64|amd64)")
+elseif (LOWERCASE_CMAKE_SYSTEM_PROCESSOR MATCHES "sh4")
+    set(WTF_CPU_SH4 1)
+elseif (LOWERCASE_CMAKE_SYSTEM_PROCESSOR MATCHES "(x64|x86_64|amd64)")
     set(WTF_CPU_X86_64 1)
 elseif (LOWERCASE_CMAKE_SYSTEM_PROCESSOR MATCHES "(i[3-6]86|x86)")
     set(WTF_CPU_X86 1)
 else ()
-    message(FATAL_ERROR "Unknown CPU '${CMAKE_SYSTEM_PROCESSOR}'")
+    message(FATAL_ERROR "Unknown CPU '${LOWERCASE_CMAKE_SYSTEM_PROCESSOR}'")
 endif ()
 
 # -----------------------------------------------------------------------------
@@ -101,17 +107,6 @@ else ()
 endif ()
 
 # -----------------------------------------------------------------------------
-# Default target names (can be overrriden in Options${PORT}.cmake file)
-# -----------------------------------------------------------------------------
-set(JSC_EXECUTABLE_NAME JSC)
-set(WTF_LIBRARY_NAME WTF)
-set(JavaScriptCore_LIBRARY_NAME JavaScriptCore)
-set(WebCore_LIBRARY_NAME WebCore)
-set(WebKit_LIBRARY_NAME WebKit)
-set(WebKit2_LIBRARY_NAME WebKit2)
-set(WebCoreTestSupport_LIBRARY_NAME WebCoreTestSupport)
-
-# -----------------------------------------------------------------------------
 # Default library types
 # -----------------------------------------------------------------------------
 option(SHARED_CORE "build JavaScriptCore and WebCore as shared libraries")