reactos/dll/directx/wine/ddraw/CMakeLists.txt
Jérôme Gardou 23373acbb9 [CMAKE] Use modules instead of shared libraries
There is no need to compile our DLLs as shared libraries since we are
managing symbols exports and imports through spec files.

On my system, this reduces the configure-time by a factor of two.
2019-04-06 17:43:38 +02:00

43 lines
1 KiB
CMake

add_definitions(
-D__WINESRC__
-DUSE_WIN32_OPENGL)
include_directories(${REACTOS_SOURCE_DIR}/sdk/include/reactos/wine)
spec2def(ddraw.dll ddraw.spec ADD_IMPORTLIB)
list(APPEND SOURCE
clipper.c
ddraw.c
device.c
executebuffer.c
light.c
main.c
material.c
palette.c
surface.c
utils.c
vertexbuffer.c
viewport.c
precomp.h
${CMAKE_CURRENT_BINARY_DIR}/ddraw_stubs.c)
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()
add_library(ddraw MODULE
${SOURCE}
ddraw.rc
${CMAKE_CURRENT_BINARY_DIR}/ddraw.def)
set_module_type(ddraw win32dll)
target_link_libraries(ddraw wine uuid dxguid ${PSEH_LIB})
add_importlibs(ddraw advapi32 gdi32 user32 d3dwine msvcrt kernel32 ntdll)
add_dependencies(ddraw wineheaders)
add_pch(ddraw precomp.h SOURCE)
add_cd_file(TARGET ddraw DESTINATION reactos/system32 FOR all)