mirror of
https://github.com/reactos/reactos.git
synced 2025-02-22 08:25:03 +00:00
[CMAKE]
- Add mingw libs to build. svn path=/branches/cmake-bringup/; revision=48335
This commit is contained in:
parent
23735be2c3
commit
e7c36f373f
2 changed files with 69 additions and 1 deletions
2
lib/3rdparty/CMakeLists.txt
vendored
2
lib/3rdparty/CMakeLists.txt
vendored
|
@ -9,5 +9,5 @@ add_subdirectory(icu4ros)
|
|||
add_subdirectory(libsamplerate)
|
||||
add_subdirectory(libwine)
|
||||
add_subdirectory(libxml2)
|
||||
#add_subdirectory(mingw) # Multiple targets, watch out for isstartuplib="true" crt="..."
|
||||
add_subdirectory(mingw)
|
||||
add_subdirectory(zlib)
|
68
lib/3rdparty/mingw/CMakeLists.txt
vendored
Normal file
68
lib/3rdparty/mingw/CMakeLists.txt
vendored
Normal file
|
@ -0,0 +1,68 @@
|
|||
|
||||
include_directories(${REACTOS_SOURCE_DIR}/include/reactos/mingw-w64)
|
||||
|
||||
add_definitions(-D_CRTBLD -Wno-main)
|
||||
|
||||
set(MINGW_COMMON_SOURCE
|
||||
_newmode.c
|
||||
atonexit.c
|
||||
binmode.c
|
||||
charmax.c
|
||||
cinitexe.c
|
||||
CRT_fp10.c
|
||||
CRT_fp8.c
|
||||
CRT_glob.c
|
||||
crt_handler.c
|
||||
dllentry.c
|
||||
gccmain.c
|
||||
gs_support.c
|
||||
merr.c
|
||||
mingw_helpers.c
|
||||
natstart.c
|
||||
pesect.c
|
||||
pseudo-reloc.c
|
||||
pseudo-reloc-list.c
|
||||
tlsmcrt.c
|
||||
tlssup.c
|
||||
tlsthrd.c
|
||||
txtmode.c
|
||||
wildcard.c
|
||||
xncommod.c
|
||||
xthdloc.c
|
||||
xtxtmode.c
|
||||
ofmt_stub.c
|
||||
cxa_pure_virtual.c
|
||||
)
|
||||
|
||||
add_library(mingw_common ${MINGW_COMMON_SOURCE})
|
||||
target_link_libraries(mingw_common oldnames)
|
||||
|
||||
set_property(TARGET mingw_common PROPERTY COMPILE_DEFINITIONS _M_CEE_PURE)
|
||||
|
||||
add_dependencies(mingw_common psdk)
|
||||
|
||||
|
||||
add_library(mingw_main crt0_c.c crtexe.c dllargv.c)
|
||||
set_property(TARGET mingw_main PROPERTY COMPILE_DEFINITIONS _DLL __USE_CRTIMP)
|
||||
add_dependencies(mingw_main psdk)
|
||||
|
||||
add_library(mingw_wmain crt0_c.c crtexe.c dllargv.c)
|
||||
set_property(TARGET mingw_wmain PROPERTY COMPILE_DEFINITIONS WPRFLAG UNICODE _UNICODE)
|
||||
add_dependencies(mingw_wmain psdk)
|
||||
|
||||
add_library(mingw_dllmain crtdll.c dllargv.c)
|
||||
add_dependencies(mingw_dllmain psdk)
|
||||
|
||||
ADD_CUSTOM_COMMAND(
|
||||
OUTPUT ${REACTOS_BINARY_DIR}/lib/3rdparty/mingw/oldnames.a
|
||||
COMMAND ${MINGW_PREFIX}dlltool --def ${REACTOS_SOURCE_DIR}/lib/3rdparty/mingw/moldname-msvcrt.def --kill-at --output-lib ${REACTOS_BINARY_DIR}/lib/3rdparty/mingw/oldnames.a
|
||||
COMMAND ${MINGW_PREFIX}ar -rc ${REACTOS_BINARY_DIR}/lib/3rdparty/mingw/oldnames.a
|
||||
)
|
||||
|
||||
SET_SOURCE_FILES_PROPERTIES(${REACTOS_BINARY_DIR}/lib/3rdparty/mingw/oldnames.a PROPERTIES GENERATED TRUE)
|
||||
|
||||
ADD_CUSTOM_TARGET(oldnames ALL DEPENDS ${REACTOS_BINARY_DIR}/lib/3rdparty/mingw/oldnames.a)
|
||||
|
||||
add_library(getopt getopt.c)
|
||||
set_property(TARGET getopt PROPERTY COMPILE_DEFINITIONS _DLL __USE_CRTIMP)
|
||||
add_dependencies(getopt psdk)
|
Loading…
Reference in a new issue