[CMAKE]
[reactos.git] / dll / win32 / jscript / CMakeLists.txt
index 82e55bc..881c2cc 100644 (file)
@@ -1,5 +1,5 @@
 
-ADD_TYPELIB(jsglobal jsglobal.idl)
+add_typelib(jsglobal jsglobal.idl)
 add_dependencies(jsglobal stdole2)
 
 remove_definitions(-D_WIN32_WINNT=0x502)
@@ -7,12 +7,19 @@ add_definitions(-D_WIN32_WINNT=0x600)
 
 add_definitions(
     -D__WINESRC__
+    -D_USE_MATH_DEFINES
     -D_DLL
-    -D__USE_CRTIMP)
+    -D__USE_CRTIMP
+    -Disinf=!_finite
+    -Disnan=_isnan)
 
 include_directories(${REACTOS_SOURCE_DIR}/include/reactos/wine)
 
-add_library(jscript SHARED
+set_rc_compiler()
+
+spec2def(jscript.dll jscript.spec)
+
+list(APPEND SOURCE
     activex.c
     date.c
     dispex.c
@@ -33,15 +40,16 @@ add_library(jscript SHARED
     function.c
     global.c
     rsrc.rc
-    jscript.def)
+    ${CMAKE_CURRENT_BINARY_DIR}/jscript.def)
 
-if(NOT MSVC)
-    set_source_files_properties(jscript.def PROPERTIES EXTERNAL_OBJECT TRUE)
-endif()
+add_library(jscript SHARED ${SOURCE})
 
 set_module_type(jscript win32dll)
 
 target_link_libraries(jscript wine)
+if(MSVC)
+    target_link_libraries(jscript uuid)
+endif()
 
 add_importlibs(jscript
     msvcrt
@@ -53,4 +61,4 @@ add_importlibs(jscript
     ntdll)
 
 add_dependencies(jscript jsglobal)
-add_cab_target(jscript 1)
+add_cd_file(TARGET jscript DESTINATION reactos/system32)