Fix quirks in CMake build on Mac and 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     CFLite
29     DbgHelp
30     WTF
31     WebKit
32     WebKitGUID
33     comctl32
34     comsupp
35     comsuppw
36     shlwapi
37 )
38
39 set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /ENTRY:wWinMainCRTStartup")
40
41 if (${WTF_PLATFORM_WIN_CAIRO})
42     add_definitions(-DWIN_CAIRO)
43 endif ()
44 add_definitions(-D_UNICODE)
45 include_directories(${WinLauncher_INCLUDE_DIRECTORIES})
46 add_library(WinLauncherLib SHARED ${WinLauncher_SOURCES})
47 target_link_libraries(WinLauncherLib ${WinLauncher_LIBRARIES})
48 set_target_properties(WinLauncherLib PROPERTIES FOLDER "Tools")
49
50 add_executable(WinLauncher WIN32 ${TOOLS_DIR}/win/DLLLauncher/DLLLauncherMain.cpp WinLauncher.vcxproj/WinLauncher.rc)
51 target_link_libraries(WinLauncher shlwapi)
52 set_target_properties(WinLauncher PROPERTIES FOLDER "Tools")
53 set_target_properties(WinLauncher PROPERTIES OUTPUT_NAME "WinLauncher")