[CMAKE]
[reactos.git] / dll / win32 / msadp32.acm / CMakeLists.txt
1
2 set(CMAKE_C_CREATE_SHARED_LIBRARY "<CMAKE_C_COMPILER> <CMAKE_SHARED_LIBRARY_C_FLAGS> <LINK_FLAGS> <CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS> -o <TARGET> <OBJECTS> <LINK_LIBRARIES> -L${REACTOS_BINARY_DIR}/lib/3rdparty/mingw")
3
4 add_definitions(-D_DLL -D__USE_CRTIMP)
5 add_definitions(-D__WINESRC__)
6
7 include_directories(${REACTOS_SOURCE_DIR}/include/reactos/wine)
8
9 add_custom_command(
10 OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/msadp32.acm.def
11 COMMAND native-winebuild -o ${CMAKE_CURRENT_BINARY_DIR}/msadp32.acm.def --def -E ${CMAKE_CURRENT_SOURCE_DIR}/msadp32.acm.spec --filename msadp32.acm
12 DEPENDS native-winebuild)
13 set_source_files_properties(${CMAKE_CURRENT_BINARY_DIR}/msadp32.acm.def PROPERTIES GENERATED TRUE)
14 add_custom_target(msadp32.acm_def ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/msadp32.acm.def)
15
16 add_library(msadp32.acm SHARED msadp32.c)
17
18 set_target_properties(msadp32.acm PROPERTIES LINK_FLAGS "-Wl,-entry,0" SUFFIX "")
19
20 target_link_libraries(msadp32.acm
21 ${CMAKE_CURRENT_BINARY_DIR}/msadp32.acm.def
22 wine
23 -lwinmm
24 ${REACTOS_SOURCE_DIR}/dll/win32/user32/libuser32.a
25 mingw_common
26 ${REACTOS_SOURCE_DIR}/dll/win32/msvcrt/libmsvcrt.a)
27
28 add_dependencies(msadp32.acm msadp32.acm_def psdk)