[CMake][Win] Conditionally select DLL CRT or static CRT
[WebKit-https.git] / Source / JavaScriptCore / shell / PlatformWin.cmake
1 include_directories(./ ${JavaScriptCore_INCLUDE_DIRECTORIES})
2 include_directories(SYSTEM ${JavaScriptCore_SYSTEM_INCLUDE_DIRECTORIES})
3 add_library(jscLib SHARED ${JSC_SOURCES})
4
5 list(APPEND JSC_LIBRARIES
6     Winmm
7 )
8
9 target_link_libraries(jscLib ${JSC_LIBRARIES})
10
11 if (${WTF_PLATFORM_WIN_CAIRO})
12     add_definitions(-DWIN_CAIRO)
13 endif ()
14
15 set(JSC_SOURCES ${JAVASCRIPTCORE_DIR}/shell/DLLLauncherMain.cpp)
16 set(JSC_LIBRARIES shlwapi)
17 add_definitions(-DUSE_CONSOLE_ENTRY_POINT)
18
19 set(JSC_OUTPUT_NAME "jsc${DEBUG_SUFFIX}")
20
21 add_library(testRegExpLib SHARED ../testRegExp.cpp)
22 add_executable(testRegExp ${JSC_SOURCES})
23 set_target_properties(testRegExp PROPERTIES OUTPUT_NAME "testRegExp${DEBUG_SUFFIX}")
24 target_link_libraries(testRegExp shlwapi)
25 add_dependencies(testRegExp testRegExpLib)
26 target_link_libraries(testRegExpLib JavaScriptCore)
27
28 add_library(testapiLib SHARED ${TESTAPI_SOURCES})
29 set_source_files_properties(../API/tests/CustomGlobalObjectClassTest.c PROPERTIES COMPILE_FLAGS "/TP ${MSVC_RUNTIME_COMPILE_FLAG}")
30 set_source_files_properties(../API/tests/testapi.c PROPERTIES COMPILE_FLAGS "/TP ${MSVC_RUNTIME_COMPILE_FLAG}")
31 add_executable(testapi ${JSC_SOURCES})
32 set_target_properties(testapi PROPERTIES OUTPUT_NAME "testapi${DEBUG_SUFFIX}")
33 target_link_libraries(testapi shlwapi)
34 add_dependencies(testapi testapiLib)
35 target_link_libraries(testapiLib JavaScriptCore)
36
37 add_library(testmasmLib SHARED ../assembler/testmasm.cpp)
38 add_executable(testmasm ${JSC_SOURCES})
39 set_target_properties(testmasm PROPERTIES OUTPUT_NAME "testmasm${DEBUG_SUFFIX}")
40 target_link_libraries(testmasm shlwapi)
41 add_dependencies(testmasm testmasmLib)
42 target_link_libraries(testmasmLib JavaScriptCore)