[CMAKE]
[reactos.git] / reactos / dll / directx / wine / ddraw / CMakeLists.txt
index 33d5755..1765459 100644 (file)
@@ -3,10 +3,6 @@ add_definitions(
     -D__WINESRC__
     -DUSE_WIN32_OPENGL)
 
-if(MSVC)
-    add_definitions(/FIwine/typeof.h)
-endif()
-
 include_directories(${REACTOS_SOURCE_DIR}/include/reactos/wine)
 
 set_rc_compiler()
@@ -16,7 +12,6 @@ spec2def(ddraw.dll ddraw.spec ADD_IMPORTLIB)
 list(APPEND SOURCE
     clipper.c
     ddraw.c
-    ddraw.rc
     device.c
     executebuffer.c
     light.c
@@ -31,7 +26,16 @@ list(APPEND SOURCE
     ${CMAKE_CURRENT_BINARY_DIR}/ddraw_stubs.c
     ${CMAKE_CURRENT_BINARY_DIR}/ddraw.def)
 
-add_library(ddraw SHARED ${SOURCE})
+add_library(ddraw SHARED
+    ${SOURCE}
+    ddraw.rc)
+
+if(MSVC)
+    # FIXME: http://www.cmake.org/Bug/view.php?id=12998
+    #add_target_compile_flags(ddraw "/FIwine/typeof.h")
+    set_source_files_properties(${SOURCE} PROPERTIES COMPILE_FLAGS "/FIwine/typeof.h")
+endif()
+
 set_module_type(ddraw win32dll)
 
 target_link_libraries(ddraw
@@ -53,4 +57,3 @@ add_importlibs(ddraw
 add_dependencies(ddraw wineheaders)
 add_pch(ddraw ddraw_private.h)
 add_cd_file(TARGET ddraw DESTINATION reactos/system32 FOR all)
-