Progress towards using CMake on Mac.
[WebKit-https.git] / CMakeLists.txt
index ae313e9..b8d45f7 100644 (file)
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 2.8.3)
+cmake_minimum_required(VERSION 2.8.8)
 project(WebKit)
 
 # -----------------------------------------------------------------------------
@@ -41,7 +41,7 @@ include(WebKitFeatures)
 # -----------------------------------------------------------------------------
 # Determine which port will be built
 # -----------------------------------------------------------------------------
-set(ALL_PORTS Efl WinCE GTK)
+set(ALL_PORTS Efl WinCE GTK AppleWin WinCairo Mac)
 set(PORT "NOPORT" CACHE STRING "choose which WebKit port to build (one of ${ALL_PORTS})")
 
 list(FIND ALL_PORTS ${PORT} RET)
@@ -54,8 +54,10 @@ string(TOLOWER ${PORT} WEBKIT_PORT_DIR)
 # -----------------------------------------------------------------------------
 # Find common packages (used by all ports)
 # -----------------------------------------------------------------------------
-find_package(BISON 2.4.1 REQUIRED)
-find_package(FLEX 2.5.34 REQUIRED)
+find_package(BISON 2.3 REQUIRED)
+if (!APPLE)
+    find_package(FLEX 2.5.34 REQUIRED)
+endif ()
 
 # TODO Enforce version requirement for gperf
 find_package(Gperf 3.0.1 REQUIRED)
@@ -129,12 +131,17 @@ set(WebKit2_LIBRARY_TYPE SHARED)
 set(WebCoreTestSupport_LIBRARY_TYPE STATIC)
 
 # -----------------------------------------------------------------------------
+# Install JavaScript shell
+# -----------------------------------------------------------------------------
+option(SHOULD_INSTALL_JS_SHELL "generate an installation rule to install the built JavaScript shell")
+
+# -----------------------------------------------------------------------------
 # 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
@@ -149,11 +156,6 @@ if (ENABLE_API_TESTS)
 endif ()
 
 # -----------------------------------------------------------------------------
-# Install JavaScript shell
-# -----------------------------------------------------------------------------
-option(SHOULD_INSTALL_JS_SHELL "generate an installation rule to install the built JavaScript shell")
-
-# -----------------------------------------------------------------------------
 # Define packaging
 # -----------------------------------------------------------------------------
 include(WebKitPackaging)