Forgot this too (doh!)
[WebKit-https.git] / CMakeLists.txt
1
2 project( WebKit )
3
4 # search packages used by KDE
5 find_package(KDE4 REQUIRED)
6 include (KDE4Defaults)
7 include (MacroLibrary)
8
9 find_package(LibXml2 REQUIRED)
10 find_package(LibXslt REQUIRED)
11 find_package(JPEG REQUIRED)
12 find_package(PNG  REQUIRED)
13
14 find_program(BISON_EXECUTABLE bison)
15 find_program(GPERF_EXECUTABLE gperf)
16
17 # quick check the libicu is available
18 find_path(LIBICU_INCLUDE_DIR unicode/umachine.h )
19
20 find_path(LIBCURL_INCLUDE_DIR curl/curl.h )
21
22 if (NOT BISON_EXECUTABLE)
23    message(FATAL_ERROR "Could not find bison")
24 endif (NOT BISON_EXECUTABLE)
25
26 if (NOT GPERF_EXECUTABLE)
27    message(FATAL_ERROR "Could not find gperf")
28 endif (NOT GPERF_EXECUTABLE)
29
30 if (NOT LIBICU_INCLUDE_DIR)
31    message(FATAL_ERROR "libicu not found, cannot create unity without it")
32 endif (NOT LIBICU_INCLUDE_DIR)
33
34 if (NOT LIBCURL_INCLUDE_DIR)
35    message(FATAL_ERROR "libcurl not found, cannot create unity without it")
36 endif (NOT LIBCURL_INCLUDE_DIR)
37
38 add_definitions (${QT_DEFINITIONS} ${KDE4_DEFINITIONS} -DQT3_SUPPORT -DHAVE_CONFIG_H=1)
39 link_directories (${KDE4_LIB_DIR})
40 include_directories (${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR} ${KDE4_INCLUDES} ${LIBICU_INCLUDE_DIR})
41
42 add_definitions( -fpermissive )
43 add_definitions( -DUSE_SYSTEM_MALLOC=1 )
44
45 # Once we use KDE stuff, adjust wtf/Platform.h for BUILDING_KDE__ ...
46 add_definitions( -DBUILDING_QT__=1 )
47
48 add_subdirectory( JavaScriptCore ) 
49 add_subdirectory( WebCore ) 
50 add_subdirectory( WebKitTools/QtLauncher )
51 add_subdirectory( WebKitTools/DumpRenderTree/DumpRenderTree.qtproj )
52
53 include_directories ( BEFORE ${CMAKE_CURRENT_BINARY_DIR} )
54