Fix internal Windows build of projects built after WebKit
[WebKit-https.git] / Tools / MiniBrowser / win / CMakeLists.txt
1 set(MiniBrowser_INCLUDE_DIRECTORIES
2     ../MiniBrowser.vcxproj
3     "${DERIVED_SOURCES_DIR}/ForwardingHeaders"
4     "${DERIVED_SOURCES_DIR}/ForwardingHeaders/WebKit"
5     "${WTF_DIR}"
6     "${CMAKE_SOURCE_DIR}"
7     "${CMAKE_SOURCE_DIR}/Source"
8 )
9
10 set(MiniBrowser_SOURCES
11     AccessibilityDelegate.cpp
12     DOMDefaultImpl.cpp
13     PageLoadTestClient.cpp
14     PrintWebUIDelegate.cpp
15     ResourceLoadDelegate.cpp
16     WebDownloadDelegate.cpp
17     MiniBrowser.cpp
18     MiniBrowserWebHost.cpp
19     WinMain.cpp
20     stdafx.cpp
21
22     ../MiniBrowser.vcxproj/MiniBrowserLib.rc
23 )
24
25 set(MiniBrowser_LIBRARIES
26     DbgHelp
27     WTF
28     WebKit
29     WebKitGUID
30     comctl32
31     comsupp
32     comsuppw
33     shlwapi
34 )
35
36 if (WTF_PLATFORM_WIN_CAIRO)
37     list(APPEND MiniBrowser_LIBRARIES
38         CFLite
39     )
40 else ()
41     list(APPEND MiniBrowser_LIBRARIES
42         CoreFoundation
43     )
44 endif ()
45
46 set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /NODEFAULTLIB:MSVCRT /NODEFAULTLIB:MSVCRTD")
47 set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /ENTRY:wWinMainCRTStartup")
48
49 if (${WTF_PLATFORM_WIN_CAIRO})
50     add_definitions(-DWIN_CAIRO)
51 endif ()
52 add_definitions(-D_UNICODE)
53 include_directories(${MiniBrowser_INCLUDE_DIRECTORIES})
54 add_library(MiniBrowserLib SHARED ${MiniBrowser_SOURCES})
55 target_link_libraries(MiniBrowserLib ${MiniBrowser_LIBRARIES})
56 set_target_properties(MiniBrowserLib PROPERTIES FOLDER "Tools")
57
58 add_executable(MiniBrowser WIN32 ${TOOLS_DIR}/win/DLLLauncher/DLLLauncherMain.cpp ../MiniBrowser.vcxproj/MiniBrowser.rc)
59 target_link_libraries(MiniBrowser shlwapi)
60 set_target_properties(MiniBrowser PROPERTIES FOLDER "Tools")
61 set_target_properties(MiniBrowser PROPERTIES OUTPUT_NAME "MiniBrowser")
62
63 add_dependencies(MiniBrowser MiniBrowserLib)