[CMAKE]
authorAmine Khaldi <amine.khaldi@reactos.org>
Sun, 22 Aug 2010 01:17:53 +0000 (01:17 +0000)
committerAmine Khaldi <amine.khaldi@reactos.org>
Sun, 22 Aug 2010 01:17:53 +0000 (01:17 +0000)
- Add cabinet, cards, cfgmgr32 and clusapi to build.

svn path=/branches/cmake-bringup/; revision=48589

dll/win32/CMakeLists.txt
dll/win32/cabinet/CMakeLists.txt [new file with mode: 0644]
dll/win32/cards/CMakeLists.txt [new file with mode: 0644]
dll/win32/cfgmgr32/CMakeLists.txt [new file with mode: 0644]
dll/win32/clusapi/CMakeLists.txt [new file with mode: 0644]

index 6b2e9fe..81b6ae6 100644 (file)
@@ -8,6 +8,10 @@ add_subdirectory(authz)
 add_subdirectory(avicap32)
 add_subdirectory(batt)
 add_subdirectory(beepmidi)
+add_subdirectory(cabinet)
+add_subdirectory(cards)
+add_subdirectory(cfgmgr32)
+add_subdirectory(clusapi)
 add_subdirectory(gdi32)
 add_subdirectory(kernel32)
 add_subdirectory(msvcrt)
diff --git a/dll/win32/cabinet/CMakeLists.txt b/dll/win32/cabinet/CMakeLists.txt
new file mode 100644 (file)
index 0000000..429be52
--- /dev/null
@@ -0,0 +1,23 @@
+
+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")
+
+add_definitions(-D__WINESRC__)
+
+include_directories(${REACTOS_SOURCE_DIR}/include/reactos/wine)
+
+spec2def(cabinet ${CMAKE_CURRENT_SOURCE_DIR}/cabinet.spec ${CMAKE_CURRENT_BINARY_DIR}/cabinet.def)
+
+file(GLOB_RECURSE SOURCE *.c)
+
+add_library(cabinet SHARED
+    ${SOURCE}
+    ${CMAKE_CURRENT_SOURCE_DIR}/cabinet.rc)
+
+set_target_properties(cabinet PROPERTIES LINK_FLAGS "-Wl,-entry,0")
+
+target_link_libraries(cabinet
+    ${CMAKE_CURRENT_BINARY_DIR}/cabinet.def
+    wine
+    mingw_common)
+
+add_dependencies(cabinet cabinet_def psdk)
diff --git a/dll/win32/cards/CMakeLists.txt b/dll/win32/cards/CMakeLists.txt
new file mode 100644 (file)
index 0000000..146430f
--- /dev/null
@@ -0,0 +1,20 @@
+
+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>")
+
+add_definitions(-DUNICODE -D_UNICODE)
+
+# Possible definitions: CARDSTYLE_DEFAULT or CARDSTYLE_BAVARIAN
+add_definitions(-DCARDSTYLE_DEFAULT)
+
+spec2def(cards ${CMAKE_CURRENT_SOURCE_DIR}/cards.spec ${CMAKE_CURRENT_BINARY_DIR}/cards.def)
+
+add_library(cards SHARED ${CMAKE_CURRENT_SOURCE_DIR}/cards.c ${CMAKE_CURRENT_SOURCE_DIR}/cards.rc)
+
+set_target_properties(cards PROPERTIES LINK_FLAGS "-Wl,-entry,_DllMain@12")
+
+target_link_libraries(cards
+    ${CMAKE_CURRENT_BINARY_DIR}/cards.def
+    ${REACTOS_SOURCE_DIR}/dll/win32/user32/libuser32.a
+    ${REACTOS_SOURCE_DIR}/dll/win32/gdi32/libgdi32.a)
+
+add_dependencies(cards cards_def psdk)
diff --git a/dll/win32/cfgmgr32/CMakeLists.txt b/dll/win32/cfgmgr32/CMakeLists.txt
new file mode 100644 (file)
index 0000000..96a3273
--- /dev/null
@@ -0,0 +1,12 @@
+
+set(CMAKE_RC_CREATE_SHARED_LIBRARY "<CMAKE_C_COMPILER> <CMAKE_SHARED_LIBRARY_C_FLAGS> <LINK_FLAGS> <CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS> -o <TARGET> <OBJECTS> <LINK_LIBRARIES>")
+
+spec2def(cfgmgr32 ${CMAKE_CURRENT_SOURCE_DIR}/cfgmgr32.spec ${CMAKE_CURRENT_BINARY_DIR}/cfgmgr32.def)
+
+add_library(cfgmgr32 SHARED cfgmgr32.rc)
+
+set_target_properties(cfgmgr32 PROPERTIES LINK_FLAGS "-Wl,-entry,0")
+
+target_link_libraries(cfgmgr32 ${CMAKE_CURRENT_BINARY_DIR}/cfgmgr32.def)
+
+add_dependencies(cfgmgr32 cfgmgr32_def psdk)
diff --git a/dll/win32/clusapi/CMakeLists.txt b/dll/win32/clusapi/CMakeLists.txt
new file mode 100644 (file)
index 0000000..1f678d6
--- /dev/null
@@ -0,0 +1,19 @@
+
+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")
+
+add_definitions(-D__WINESRC__)
+
+include_directories(${REACTOS_SOURCE_DIR}/include/reactos/wine)
+
+spec2def(clusapi ${CMAKE_CURRENT_SOURCE_DIR}/clusapi.spec ${CMAKE_CURRENT_BINARY_DIR}/clusapi.def)
+
+add_library(clusapi SHARED clusapi.c)
+
+set_target_properties(clusapi PROPERTIES LINK_FLAGS "-Wl,-entry,_DllMain@12")
+
+target_link_libraries(clusapi
+    ${CMAKE_CURRENT_BINARY_DIR}/clusapi.def
+    wine
+    mingw_common)
+
+add_dependencies(clusapi clusapi_def psdk)