[CMAKE]
[reactos.git] / dll / win32 / odbccp32 / CMakeLists.txt
index ed7f754..e58c06b 100644 (file)
@@ -1,19 +1,21 @@
 
-add_definitions(-D__WINESRC__)
-add_definitions(-D_DLL -D__USE_CRTIMP)
+add_definitions(
+    -D__WINESRC__
+    -D_DLL -D__USE_CRTIMP)
 
 include_directories(${REACTOS_SOURCE_DIR}/include/reactos/wine)
 
-spec2def(odbccp32 ${CMAKE_CURRENT_SOURCE_DIR}/odbccp32.spec ${CMAKE_CURRENT_BINARY_DIR}/odbccp32.def)
+spec2def(odbccp32.dll odbccp32.spec)
 
-add_library(odbccp32 SHARED odbccp32.c)
+list(APPEND SOURCE
+    odbccp32.c
+    ${CMAKE_CURRENT_BINARY_DIR}/odbccp32_stubs.c
+    ${CMAKE_CURRENT_BINARY_DIR}/odbccp32.def)
 
+add_library(odbccp32 SHARED ${SOURCE})
 set_entrypoint(odbccp32 0)
 
-target_link_libraries(odbccp32
-    ${CMAKE_CURRENT_BINARY_DIR}/odbccp32.def
-    uuid
-    wine)
+target_link_libraries(odbccp32 uuid wine)
 
 add_importlibs(odbccp32
     msvcrt
@@ -21,4 +23,5 @@ add_importlibs(odbccp32
     kernel32
     ntdll)
 
-add_dependencies(odbccp32 odbccp32_def)
+add_importlib_target(odbccp32.spec)
+add_cd_file(TARGET odbccp32 DESTINATION reactos/system32)