[CMAKE]
authorAmine Khaldi <amine.khaldi@reactos.org>
Fri, 8 Oct 2010 19:10:33 +0000 (19:10 +0000)
committerAmine Khaldi <amine.khaldi@reactos.org>
Fri, 8 Oct 2010 19:10:33 +0000 (19:10 +0000)
- Improve some dlls.
- Fix cmd and stlport.
- Add libgcc as a C standard lib.

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

15 files changed:
base/shell/cmd/CMakeLists.txt
dll/win32/crypt32/CMakeLists.txt
dll/win32/dbghelp/CMakeLists.txt
dll/win32/mpr/CMakeLists.txt
dll/win32/mprapi/CMakeLists.txt
dll/win32/msadp32.acm/CMakeLists.txt
dll/win32/mscms/CMakeLists.txt
dll/win32/mscoree/CMakeLists.txt
dll/win32/msg711.acm/CMakeLists.txt
dll/win32/msgina/CMakeLists.txt
dll/win32/msgsm32.acm/CMakeLists.txt
dll/win32/msimg32/CMakeLists.txt
gcc.cmake
lib/3rdparty/stlport/CMakeLists.txt
toolchain-mingw32.cmake

index 4f89797..93fe225 100644 (file)
@@ -75,4 +75,4 @@ target_link_libraries(cmd wine)
 
 add_pch(cmd ${CMAKE_CURRENT_SOURCE_DIR}/precomp.h SOURCE)
 set_module_type(cmd win32cui)
-add_importlibs(cmd advapi32 user32 msvcrt)
\ No newline at end of file
+add_importlibs(cmd advapi32 user32 msvcrt kernel32 ntdll)
\ No newline at end of file
index 1b05521..47e2662 100644 (file)
@@ -46,7 +46,7 @@ target_link_libraries(crypt32
     ${CMAKE_CURRENT_BINARY_DIR}/crypt32.def
     wine
     pseh
-    mingw_common)
+    oldnames)
 
-add_importlibs(crypt32 user32 advapi32 msvcrt)
+add_importlibs(crypt32 user32 advapi32 msvcrt kernel32 ntdll)
 add_dependencies(crypt32 crypt32_def)
index 8cf02ca..41873d4 100644 (file)
@@ -46,8 +46,8 @@ set_module_type(dbghelp win32dll)
 target_link_libraries(dbghelp
     ${CMAKE_CURRENT_BINARY_DIR}/dbghelp.def
     wine
-    mingw_common
-    pseh)
+    pseh
+    oldnames)
 
-add_importlibs(dbghelp psapi version msvcrt)
+add_importlibs(dbghelp psapi version msvcrt kernel32 ntdll)
 add_dependencies(dbghelp dbghelp_def)
index 2b341e1..fa1d99e 100644 (file)
@@ -1,6 +1,4 @@
 
-
-
 add_definitions(-D__WINESRC__)
 add_definitions(-D_WINE)
 
@@ -17,13 +15,11 @@ add_library(mpr SHARED
     wnet.c
     mpr.rc)
 
-set_target_properties(mpr PROPERTIES LINK_FLAGS "-Wl,-entry,_DllMain@12")
+set_module_type(mpr win32dll)
 
 target_link_libraries(mpr
     ${CMAKE_CURRENT_BINARY_DIR}/mpr.def
-    wine
-    mingw_common
-    -ladvapi32
-    -luser32)
+    wine)
 
-add_dependencies(mpr mpr_def psdk)
+add_importlibs(mpr advapi32 user32 kernel32 ntdll)
+add_dependencies(mpr mpr_def)
index 986a1a7..b759171 100644 (file)
@@ -1,19 +1,16 @@
 
-
-
 add_definitions(-D__WINESRC__)
-
 include_directories(${REACTOS_SOURCE_DIR}/include/reactos/wine)
 
 spec2def(mprapi ${CMAKE_CURRENT_SOURCE_DIR}/mprapi.spec ${CMAKE_CURRENT_BINARY_DIR}/mprapi.def)
 
 add_library(mprapi SHARED mprapi.c)
 
-set_target_properties(mprapi PROPERTIES LINK_FLAGS "-Wl,-entry,_DllMain@12")
+set_module_type(mprapi win32dll)
 
 target_link_libraries(mprapi
     ${CMAKE_CURRENT_BINARY_DIR}/mprapi.def
-    wine
-    mingw_common)
+    wine)
 
-add_dependencies(mprapi mprapi_def psdk)
+add_importlibs(mprapi kernel32 ntdll)
+add_dependencies(mprapi mprapi_def)
index a4f0541..cacd867 100644 (file)
@@ -1,6 +1,4 @@
 
-
-
 add_definitions(-D_DLL -D__USE_CRTIMP)
 add_definitions(-D__WINESRC__)
 
@@ -15,14 +13,12 @@ add_custom_target(msadp32.acm_def ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/msadp3
 
 add_library(msadp32.acm SHARED msadp32.c)
 
-set_target_properties(msadp32.acm PROPERTIES LINK_FLAGS "-Wl,-entry,0" SUFFIX "")
+set_entrypoint(msadp32.acm 0)
+set_target_properties(msadp32.acm PROPERTIES SUFFIX "")
 
 target_link_libraries(msadp32.acm
     ${CMAKE_CURRENT_BINARY_DIR}/msadp32.acm.def
-    wine
-    -lwinmm
-    -luser32
-    mingw_common
-    -lmsvcrt)
+    wine)
 
-add_dependencies(msadp32.acm msadp32.acm_def psdk)
+add_importlibs(msadp32.acm winmm user32 msvcrt kernel32 ntdll)
+add_dependencies(msadp32.acm msadp32.acm_def psdk buildno_header)
index e5ca94d..63d5ce3 100644 (file)
@@ -1,8 +1,5 @@
 
-
-
 add_definitions(-D__WINESRC__)
-
 include_directories(${REACTOS_SOURCE_DIR}/include/reactos/wine)
 
 spec2def(mscms ${CMAKE_CURRENT_SOURCE_DIR}/mscms.spec ${CMAKE_CURRENT_BINARY_DIR}/mscms.def)
@@ -16,11 +13,11 @@ add_library(mscms SHARED
     transform.c
     version.rc)
 
-set_target_properties(mscms PROPERTIES LINK_FLAGS "-Wl,-entry,_DllMain@12")
+set_module_type(mscms win32dll)
 
 target_link_libraries(mscms
     ${CMAKE_CURRENT_BINARY_DIR}/mscms.def
-    wine
-    mingw_common)
+    wine)
 
-add_dependencies(mscms mscms_def psdk)
+add_importlibs(mscms kernel32 ntdll)
+add_dependencies(mscms mscms_def)
index d7e0bfa..d966a9e 100644 (file)
@@ -1,22 +1,17 @@
 
-
-
 add_definitions(-D__WINESRC__)
-
 include_directories(${REACTOS_SOURCE_DIR}/include/reactos/wine)
 
 spec2def(mscoree ${CMAKE_CURRENT_SOURCE_DIR}/mscoree.spec ${CMAKE_CURRENT_BINARY_DIR}/mscoree.def)
 
 add_library(mscoree SHARED corruntimehost.c mscoree_main.c)
 
-set_target_properties(mscoree PROPERTIES LINK_FLAGS "-Wl,-entry,_DllMain@12")
+set_module_type(mscoree win32dll)
 
 target_link_libraries(mscoree
     ${CMAKE_CURRENT_BINARY_DIR}/mscoree.def
     wine
-    mingw_common
-    -ladvapi32
-    -lshell32
-    -luuid)
+    uuid)
 
-add_dependencies(mscoree mscoree_def psdk)
+add_importlibs(mscoree advapi32 shell32 kernel32 ntdll)
+add_dependencies(mscoree mscoree_def)
index 1318653..e909b4c 100644 (file)
@@ -1,6 +1,4 @@
 
-
-
 add_definitions(-D_DLL -D__USE_CRTIMP)
 add_definitions(-D__WINESRC__)
 
@@ -15,14 +13,12 @@ add_custom_target(msg711.acm_def ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/msg711.
 
 add_library(msg711.acm SHARED msg711.c)
 
-set_target_properties(msg711.acm PROPERTIES LINK_FLAGS "-Wl,-entry,0" SUFFIX "")
+set_entrypoint(msg711.acm 0)
+set_target_properties(msg711.acm PROPERTIES SUFFIX "")
 
 target_link_libraries(msg711.acm
     ${CMAKE_CURRENT_BINARY_DIR}/msg711.acm.def
-    wine
-    -lwinmm
-    -luser32
-    mingw_common
-    -lmsvcrt)
+    wine)
 
-add_dependencies(msg711.acm msg711.acm_def psdk)
+add_importlibs(msg711.acm winmm user32 msvcrt kernel32 ntdll)
+add_dependencies(msg711.acm msg711.acm_def psdk buildno_header)
index 696e621..2a54bf3 100644 (file)
@@ -1,6 +1,4 @@
 
-
-
 include_directories(include)
 include_directories(${REACTOS_SOURCE_DIR}/include/reactos/wine)
 
@@ -13,15 +11,11 @@ add_library(msgina SHARED
     tui.c
     msgina.rc)
 
-set_target_properties(msgina PROPERTIES LINK_FLAGS "-Wl,-entry,_DllMain@12")
+set_module_type(msgina win32dll)
 
 target_link_libraries(msgina
     ${CMAKE_CURRENT_BINARY_DIR}/msgina.def
-    wine
-    mingw_common
-    -ladvapi32
-    -luser32
-    -lgdi32
-    -luserenv)
+    wine)
 
-add_dependencies(msgina msgina_def psdk)
+add_importlibs(msgina advapi32 user32 gdi32 userenv kernel32 ntdll)
+add_dependencies(msgina msgina_def)
index 07dda69..49e220e 100644 (file)
@@ -1,6 +1,4 @@
 
-
-
 add_definitions(-D_DLL -D__USE_CRTIMP)
 add_definitions(-D__WINESRC__)
 
@@ -15,14 +13,12 @@ add_custom_target(msgsm32.acm_def ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/msgsm3
 
 add_library(msgsm32.acm SHARED msgsm32.c)
 
-set_target_properties(msgsm32.acm PROPERTIES LINK_FLAGS "-Wl,-entry,0" SUFFIX "")
+set_entrypoint(msgsm32.acm 0)
+set_target_properties(msgsm32.acm PROPERTIES SUFFIX "")
 
 target_link_libraries(msgsm32.acm
     ${CMAKE_CURRENT_BINARY_DIR}/msgsm32.acm.def
-    wine
-    -lwinmm
-    -luser32
-    mingw_common
-    -lmsvcrt)
+    wine)
 
-add_dependencies(msgsm32.acm msgsm32.acm_def psdk)
+add_importlibs(msgsm32.acm winmm user32 msvcrt kernel32 ntdll)
+add_dependencies(msgsm32.acm msgsm32.acm_def psdk buildno_header)
index 00ceeaf..c816a44 100644 (file)
@@ -1,20 +1,16 @@
 
-
-
 include_directories(${REACTOS_SOURCE_DIR}/include/reactos/wine)
-
 add_definitions(-D__WINESRC__)
 
 spec2def(msimg32 ${CMAKE_CURRENT_SOURCE_DIR}/msimg32.spec ${CMAKE_CURRENT_BINARY_DIR}/msimg32.def)
 
 add_library(msimg32 SHARED msimg32_main.c)
 
-set_target_properties(msimg32 PROPERTIES LINK_FLAGS "-Wl,-entry,_DllMain@12")
+set_module_type(msimg32 win32dll)
 
 target_link_libraries(msimg32
     ${CMAKE_CURRENT_BINARY_DIR}/msimg32.def
-    wine
-    mingw_common
-    -lgdi32)
+    wine)
 
-add_dependencies(msimg32 msimg32_def psdk)
+add_importlibs(msimg32 gdi32 kernel32 ntdll)
+add_dependencies(msimg32 msimg32_def)
index 5509e18..1198769 100644 (file)
--- a/gcc.cmake
+++ b/gcc.cmake
@@ -18,7 +18,7 @@ set(CMAKE_EXE_LINKER_FLAGS "-nodefaultlibs -nostdlib -Wl,--enable-auto-image-bas
 add_definitions(-pipe -fms-extensions)
 
 # stlport includes
-set(CMAKE_CXX_COMPILE_OBJECT "<CMAKE_CXX_COMPILER> <DEFINES> -I${REACTOS_SOURCE_DIR}/lib/3rdparty/stlport/stlport <FLAGS> -o <OBJECT> -c <SOURCE>")
+set(CMAKE_CXX_COMPILE_OBJECT "<CMAKE_CXX_COMPILER> <DEFINES> <FLAGS> -o <OBJECT> -c <SOURCE>")
 
 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>")
 
index e618ce2..1846047 100644 (file)
@@ -4,7 +4,7 @@
 
 add_definitions(-D_STLP_USE_EXCEPTIONS)
 
-include_directories(BEFORE ./stlport)
+include_directories(BEFORE stlport)
 
 list(APPEND SOURCE
   src/allocators.cpp
index a29da7e..6281b24 100644 (file)
@@ -32,7 +32,7 @@ SET(CMAKE_IDL_COMPILE_OBJECT "<CMAKE_IDL_COMPILER> <FLAGS> <DEFINES> -m32 --win3
 SET(CMAKE_RC_COMPILE_OBJECT "<CMAKE_RC_COMPILER> -i <SOURCE> <CMAKE_C_LINK_FLAGS> <DEFINES> -I${REACTOS_SOURCE_DIR}/include/psdk -I${REACTOS_BINARY_DIR}/include/psdk -I${REACTOS_SOURCE_DIR}/include/ -I${REACTOS_SOURCE_DIR}/include/reactos -I${REACTOS_BINARY_DIR}/include/reactos -I${REACTOS_SOURCE_DIR}/include/reactos/wine -I${REACTOS_SOURCE_DIR}/include/crt -I${REACTOS_SOURCE_DIR}/include/crt/mingw32 -O coff -o <OBJECT> ")
 
 # Use stdcall fixups, and don't link with anything by default unless we say so
-set(CMAKE_C_STANDARD_LIBRARIES "" CACHE STRING "Standard C Libraries")
+set(CMAKE_C_STANDARD_LIBRARIES "-lgcc" CACHE STRING "Standard C Libraries")
 
 #MARK_AS_ADVANCED(CLEAR CMAKE_CXX_STANDARD_LIBRARIES)
 set(CMAKE_CXX_STANDARD_LIBRARIES "" CACHE STRING "Standard C++ Libraries")