860d1382419b880534a41057c1302ce0b0171333
[reactos.git] / dll / win32 / dnsapi / 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 include_directories(include)
5 include_directories(${REACTOS_SOURCE_DIR}/lib/3rdparty/adns/src)
6 include_directories(${REACTOS_SOURCE_DIR}/lib/3rdparty/adns/adns_win32)
7
8 add_definitions(-D_DLL -D__USE_CRTIMP)
9 add_definitions(-DADNS_JGAA_WIN32)
10
11 spec2def(dnsapi ${CMAKE_CURRENT_SOURCE_DIR}/dnsapi.spec ${CMAKE_CURRENT_BINARY_DIR}/dnsapi.def)
12
13 list(APPEND SOURCE
14 dnsapi/adns.c
15 dnsapi/context.c
16 dnsapi/memory.c
17 dnsapi/names.c
18 dnsapi/query.c
19 dnsapi/record.c
20 dnsapi/stubs.c
21 dnsapi.rc)
22
23 add_library(dnsapi SHARED
24 ${CMAKE_CURRENT_BINARY_DIR}/dnsapi_precomp.h.gch
25 ${SOURCE})
26
27 set_target_properties(dnsapi PROPERTIES LINK_FLAGS "-Wl,-entry,0")
28
29 target_link_libraries(dnsapi
30 ${CMAKE_CURRENT_BINARY_DIR}/dnsapi.def
31 adns
32 -luser32
33 -lws2_32
34 -lmsvcrt
35 -liphlpapi
36 -lkernel32
37 -lntdll)
38
39 add_pch(dnsapi ${CMAKE_CURRENT_SOURCE_DIR}/dnsapi/precomp.h ${SOURCE})
40 add_dependencies(dnsapi dnsapi_def psdk)