[CMake] Add WebKit::JavaScriptCore target
[WebKit-https.git] / Tools / MiniBrowser / win / CMakeLists.txt
1 set(MiniBrowser_INCLUDE_DIRECTORIES
2     ${PAL_FRAMEWORK_HEADERS_DIR}
3     ${WebCore_PRIVATE_FRAMEWORK_HEADERS_DIR}
4     ${WebKitLegacy_FRAMEWORK_HEADERS_DIR}
5     ${WebKit_FRAMEWORK_HEADERS_DIR}
6     ${WebKit_PRIVATE_FRAMEWORK_HEADERS_DIR}
7 )
8
9 set(MiniBrowser_SOURCES
10     AccessibilityDelegate.cpp
11     BrowserWindow.cpp
12     Common.cpp
13     DOMDefaultImpl.cpp
14     MainWindow.cpp
15     PageLoadTestClient.cpp
16     PrintWebUIDelegate.cpp
17     ResourceLoadDelegate.cpp
18     WebDownloadDelegate.cpp
19     MiniBrowserLib.rc
20     MiniBrowserWebHost.cpp
21     WebKitLegacyBrowserWindow.cpp
22     WinMain.cpp
23     stdafx.cpp
24 )
25
26 set(MiniBrowser_LIBRARIES
27     DbgHelp
28     WebKit::WTF
29     WebKitLegacy
30     WebKitLegacyGUID
31     comctl32
32     comsupp
33     comsuppw
34     shlwapi
35 )
36
37 if (USE_CF)
38     list(APPEND MiniBrowser_LIBRARIES
39         ${COREFOUNDATION_LIBRARY}
40     )
41 endif ()
42
43 if (ENABLE_WEBKIT)
44     add_definitions(-DENABLE_WEBKIT)
45     list(APPEND MiniBrowser_SOURCES
46         WebKitBrowserWindow.cpp
47     )
48     list(APPEND MiniBrowser_LIBRARIES WebKit)
49 endif ()
50
51 set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${MSVC_RUNTIME_LINKER_FLAGS}")
52 set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /ENTRY:wWinMainCRTStartup")
53
54 if (${WTF_PLATFORM_WIN_CAIRO})
55     add_definitions(-DWIN_CAIRO)
56 endif ()
57 add_definitions(-D_UNICODE)
58 include_directories(${MiniBrowser_INCLUDE_DIRECTORIES})
59 add_library(MiniBrowserLib SHARED ${MiniBrowser_SOURCES})
60 target_link_libraries(MiniBrowserLib ${MiniBrowser_LIBRARIES})
61
62 add_executable(MiniBrowser WIN32 ${TOOLS_DIR}/win/DLLLauncher/DLLLauncherMain.cpp MiniBrowser.rc)
63 target_link_libraries(MiniBrowser shlwapi)
64 set_target_properties(MiniBrowser PROPERTIES OUTPUT_NAME "MiniBrowser")
65
66 add_dependencies(MiniBrowser MiniBrowserLib)