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