Author: jgardou
Date: Fri Oct 8 18:04:16 2010
New Revision: 49054
URL:
http://svn.reactos.org/svn/reactos?rev=49054&view=rev
Log:
[CMAKE]
- link executables against gcc and mingw_common
- remove link dependencies from mingw_common
This puts C executables into a good shape again.
Modified:
branches/cmake-bringup/base/applications/charmap/CMakeLists.txt
branches/cmake-bringup/gcc.cmake
branches/cmake-bringup/lib/3rdparty/mingw/CMakeLists.txt
Modified: branches/cmake-bringup/base/applications/charmap/CMakeLists.txt
URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/base/applications…
==============================================================================
--- branches/cmake-bringup/base/applications/charmap/CMakeLists.txt [iso-8859-1]
(original)
+++ branches/cmake-bringup/base/applications/charmap/CMakeLists.txt [iso-8859-1] Fri Oct
8 18:04:16 2010
@@ -15,4 +15,5 @@
add_pch(charmap ${CMAKE_CURRENT_SOURCE_DIR}/precomp.h ${SOURCE})
set_module_type(charmap win32gui)
-add_importlibs(charmap user32 gdi32 comctl32 msvcrt)
+
+add_importlibs(charmap user32 gdi32 comctl32 kernel32 msvcrt)
Modified: branches/cmake-bringup/gcc.cmake
URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/gcc.cmake?rev=490…
==============================================================================
--- branches/cmake-bringup/gcc.cmake [iso-8859-1] (original)
+++ branches/cmake-bringup/gcc.cmake [iso-8859-1] Fri Oct 8 18:04:16 2010
@@ -37,12 +37,12 @@
add_definitions(-Os -fno-strict-aliasing -ftracer -momit-leaf-frame-pointer
-mpreferred-stack-boundary=2 -fno-set-stack-executable -fno-optimize-sibling-calls)
#linkage hell...
-add_library(gcc STATIC IMPORTED)
-set_target_properties(gcc PROPERTIES IMPORTED_LOCATION
${REACTOS_SOURCE_DIR}/importlibs/libgcc.a
- IMPORTED_LINK_INTERFACE_LIBRARIES "mingw_common -lkernel32")
-add_library(supc++ STATIC IMPORTED)
-set_target_properties(supc++ PROPERTIES IMPORTED_LOCATION
${REACTOS_SOURCE_DIR}/importlibs/libsupc++.a
- IMPORTED_LINK_INTERFACE_LIBRARIES "gcc -lmsvcrt")
+#add_library(gcc STATIC IMPORTED)
+#set_target_properties(gcc PROPERTIES IMPORTED_LOCATION
${REACTOS_SOURCE_DIR}/importlibs/libgcc.a
+# IMPORTED_LINK_INTERFACE_LIBRARIES "mingw_common -lkernel32")
+#add_library(supc++ STATIC IMPORTED)
+#set_target_properties(supc++ PROPERTIES IMPORTED_LOCATION
${REACTOS_SOURCE_DIR}/importlibs/libsupc++.a
+# IMPORTED_LINK_INTERFACE_LIBRARIES "gcc -lmsvcrt")
# Macros
macro(set_entrypoint MODULE ENTRYPOINT)
@@ -89,7 +89,7 @@
else()
target_link_libraries(${MODULE} mingw_wmain)
endif(NOT IS_UNICODE)
- target_link_libraries(${MODULE} mingw_common gcc)
+ target_link_libraries(${MODULE} -lgcc mingw_common)
endif()
if(${TYPE} MATCHES win32cui)
set_subsystem(${MODULE} console)
@@ -99,7 +99,7 @@
else()
target_link_libraries(${MODULE} mingw_wmain)
endif(NOT IS_UNICODE)
- target_link_libraries(${MODULE} mingw_common gcc)
+ target_link_libraries(${MODULE} -lgcc mingw_common)
endif()
if(${TYPE} MATCHES win32dll)
set_entrypoint(${MODULE} DllMain@12)
Modified: branches/cmake-bringup/lib/3rdparty/mingw/CMakeLists.txt
URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/lib/3rdparty/ming…
==============================================================================
--- branches/cmake-bringup/lib/3rdparty/mingw/CMakeLists.txt [iso-8859-1] (original)
+++ branches/cmake-bringup/lib/3rdparty/mingw/CMakeLists.txt [iso-8859-1] Fri Oct 8
18:04:16 2010
@@ -41,9 +41,7 @@
add_library(mingw_common ${MINGW_COMMON_SOURCE})
if(NOT MSVC)
- target_link_libraries(mingw_common)
-# add_importlibs(mingw_common kernel32 ntdll oldnames)
-# add_dependencies(mingw_common oldnames)
+ add_dependencies(mingw_common oldnames)
endif(NOT MSVC)
set_target_properties(mingw_common PROPERTIES COMPILE_DEFINITIONS _M_CEE_PURE)