mirror of
https://github.com/reactos/reactos.git
synced 2025-02-22 08:25:03 +00:00
[CMAKE]
- link executables against gcc and mingw_common - remove link dependencies from mingw_common This puts C executables into a good shape again. svn path=/branches/cmake-bringup/; revision=49054
This commit is contained in:
parent
e20a0a30ee
commit
db37322eb6
3 changed files with 11 additions and 12 deletions
|
@ -15,4 +15,5 @@ add_executable(charmap
|
|||
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)
|
||||
|
|
16
gcc.cmake
16
gcc.cmake
|
@ -37,12 +37,12 @@ add_definitions(-Wall -Wno-char-subscripts -Wpointer-arith -Wno-multichar -Wno-e
|
|||
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 @@ macro(set_module_type MODULE TYPE)
|
|||
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 @@ macro(set_module_type MODULE TYPE)
|
|||
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)
|
||||
|
|
4
lib/3rdparty/mingw/CMakeLists.txt
vendored
4
lib/3rdparty/mingw/CMakeLists.txt
vendored
|
@ -41,9 +41,7 @@ list(APPEND MINGW_COMMON_SOURCE
|
|||
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)
|
||||
|
|
Loading…
Reference in a new issue