mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 18:15:11 +00:00
[CMAKE]
- fix usage of set_entrypoint - link libpng to ntdll on amd64 - build crtdll and nmidebug only on x86 - silence some linker warnings on MSVC - compile riched20/msvc-thiscall.c only on x86 - Add WIN64 definition to acpica - Add ehandler.c to libcntpr svn path=/trunk/; revision=53396
This commit is contained in:
parent
c47522f9e8
commit
a522726b1e
20 changed files with 43 additions and 22 deletions
3
reactos/dll/3rdparty/libpng/CMakeLists.txt
vendored
3
reactos/dll/3rdparty/libpng/CMakeLists.txt
vendored
|
@ -30,5 +30,8 @@ add_library(libpng SHARED
|
|||
set_entrypoint(libpng 0)
|
||||
target_link_libraries(libpng zlib)
|
||||
add_importlibs(libpng msvcrt kernel32)
|
||||
if(ARCH MATCHES amd64)
|
||||
add_importlibs(libpng ntdll)
|
||||
endif()
|
||||
add_dependencies(libpng psdk)
|
||||
add_cd_file(TARGET libpng DESTINATION reactos/system32 FOR all)
|
||||
|
|
|
@ -22,7 +22,9 @@ add_subdirectory(comctl32)
|
|||
add_subdirectory(comdlg32)
|
||||
add_subdirectory(compstui)
|
||||
add_subdirectory(credui)
|
||||
add_subdirectory(crtdll)
|
||||
if(ARCH MATCHES i386)
|
||||
add_subdirectory(crtdll) # only built on x86
|
||||
endif()
|
||||
add_subdirectory(crypt32)
|
||||
add_subdirectory(cryptdlg)
|
||||
add_subdirectory(cryptdll)
|
||||
|
@ -210,7 +212,9 @@ add_subdirectory(usp10)
|
|||
add_subdirectory(uxtheme)
|
||||
add_subdirectory(vdmdbg)
|
||||
add_subdirectory(version)
|
||||
add_subdirectory(wdmaud.drv)
|
||||
if(ARCH MATCHES i386)
|
||||
add_subdirectory(wdmaud.drv)
|
||||
endif()
|
||||
add_subdirectory(windowscodecs)
|
||||
add_subdirectory(winemp3.acm)
|
||||
add_subdirectory(winfax)
|
||||
|
|
|
@ -21,7 +21,7 @@ add_library(crtdll SHARED ${SOURCE})
|
|||
|
||||
set_module_type(crtdll win32dll)
|
||||
|
||||
set_entrypoint(crtdll DllMain@12)
|
||||
set_entrypoint(crtdll DllMain 12)
|
||||
|
||||
target_link_libraries(crtdll wine crt)
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@ list(APPEND SOURCE
|
|||
${CMAKE_CURRENT_BINARY_DIR}/fmifs.def)
|
||||
|
||||
add_library(fmifs SHARED ${SOURCE})
|
||||
set_entrypoint(fmifs InitializeFmIfs@12)
|
||||
set_entrypoint(fmifs InitializeFmIfs 12)
|
||||
add_importlibs(fmifs kernel32 ntdll)
|
||||
add_pch(fmifs precomp.h)
|
||||
add_dependencies(fmifs psdk)
|
||||
|
|
|
@ -93,7 +93,7 @@ endif(ARCH MATCHES i386)
|
|||
|
||||
add_library(kernel32 SHARED ${SOURCE})
|
||||
|
||||
set_entrypoint(kernel32 DllMain@12)
|
||||
set_entrypoint(kernel32 DllMain 12)
|
||||
set_image_base(kernel32 ${baseaddress_kernel32})
|
||||
|
||||
target_link_libraries(kernel32 wine chkstk ${PSEH_LIB})
|
||||
|
|
|
@ -20,7 +20,7 @@ list(APPEND SOURCE
|
|||
|
||||
add_library(msacm32 SHARED ${SOURCE})
|
||||
|
||||
set_entrypoint(msacm32 DllMain@12)
|
||||
set_entrypoint(msacm32 DllMain 12)
|
||||
set_image_base(msacm32 ${baseaddress_msacm32})
|
||||
|
||||
target_link_libraries(msacm32 wine)
|
||||
|
|
|
@ -33,7 +33,9 @@ set_image_base(msvcrt ${baseaddress_msvcrt})
|
|||
|
||||
target_link_libraries(msvcrt crt wine)
|
||||
|
||||
if(NOT MSVC)
|
||||
if(MSVC)
|
||||
add_linkerflag(msvcrt "/ignore:4102")
|
||||
else()
|
||||
target_link_libraries(msvcrt pseh)
|
||||
endif()
|
||||
|
||||
|
|
|
@ -20,13 +20,15 @@ list(APPEND SOURCE
|
|||
${CMAKE_CURRENT_BINARY_DIR}/msvcrt20.def)
|
||||
|
||||
add_library(msvcrt20 SHARED ${SOURCE})
|
||||
set_entrypoint(msvcrt20 DllMain@12)
|
||||
set_entrypoint(msvcrt20 DllMain 12)
|
||||
set_image_base(msvcrt20 ${baseaddress_msvcrt20})
|
||||
|
||||
target_link_libraries(msvcrt20 crt wine)
|
||||
|
||||
if(NOT MSVC)
|
||||
target_link_libraries(msvcrt20 pseh)
|
||||
if(MSVC)
|
||||
add_linkerflag(msvcrt20 "/ignore:4102")
|
||||
else()
|
||||
target_link_libraries(msvcrt20 pseh)
|
||||
endif()
|
||||
|
||||
add_importlibs(msvcrt20 kernel32 ntdll)
|
||||
|
|
|
@ -21,11 +21,13 @@ list(APPEND SOURCE
|
|||
|
||||
add_library(msvcrt40 SHARED ${SOURCE})
|
||||
set_image_base(msvcrt40 ${baseaddress_msvcrt40})
|
||||
set_entrypoint(msvcrt40 DllMain@12)
|
||||
set_entrypoint(msvcrt40 DllMain 12)
|
||||
|
||||
target_link_libraries(msvcrt40 crt wine)
|
||||
|
||||
if(NOT MSVC)
|
||||
if(MSVC)
|
||||
add_linkerflag(msvcrt40 "/ignore:4102")
|
||||
else()
|
||||
target_link_libraries(msvcrt40 pseh)
|
||||
endif()
|
||||
|
||||
|
|
|
@ -30,7 +30,9 @@ list(APPEND SOURCE
|
|||
${CMAKE_CURRENT_BINARY_DIR}/riched20.def)
|
||||
|
||||
if(MSVC)
|
||||
list(APPEND SOURCE msvc-thiscall.c)
|
||||
if (ARCH MATCHES i386)
|
||||
list(APPEND SOURCE msvc-thiscall.c)
|
||||
endif()
|
||||
set_source_files_properties(txthost.c txtsrv.c PROPERTIES COMPILE_FLAGS "/FImsvc.h")
|
||||
endif()
|
||||
|
||||
|
|
|
@ -7,6 +7,7 @@ add_subdirectory(kddll)
|
|||
else()
|
||||
add_subdirectory(kdcom)
|
||||
endif()
|
||||
|
||||
add_subdirectory(nmidebug)
|
||||
if(ARCH MATCHES i386)
|
||||
add_subdirectory(nmidebug)
|
||||
endif()
|
||||
add_subdirectory(null)
|
||||
|
|
|
@ -3,6 +3,10 @@ include_directories(
|
|||
include
|
||||
acpica/include)
|
||||
|
||||
if(ARCH MATCHES amd64)
|
||||
add_definitions(-DWIN64)
|
||||
endif()
|
||||
|
||||
add_library(acpica
|
||||
acpica/dispatcher/dsfield.c
|
||||
acpica/dispatcher/dsinit.c
|
||||
|
|
|
@ -11,7 +11,7 @@ add_library(framebuf SHARED
|
|||
${CMAKE_CURRENT_BINARY_DIR}/framebuf.def)
|
||||
|
||||
add_pch(framebuf framebuf.h)
|
||||
set_entrypoint(framebuf DrvEnableDriver@12)
|
||||
set_entrypoint(framebuf DrvEnableDriver 12)
|
||||
set_subsystem(framebuf native)
|
||||
set_image_base(framebuf 0x00010000)
|
||||
target_link_libraries(framebuf libcntpr)
|
||||
|
|
|
@ -20,7 +20,7 @@ if(ARCH MATCHES i386)
|
|||
endif()
|
||||
endif()
|
||||
|
||||
set_entrypoint(framebuf_new DrvEnableDriver@12)
|
||||
set_entrypoint(framebuf_new DrvEnableDriver 12)
|
||||
set_subsystem(framebuf_new native)
|
||||
set_image_base(framebuf_new 0x00010000)
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@ add_library(vgaddi SHARED
|
|||
vgaddi.rc
|
||||
${CMAKE_CURRENT_BINARY_DIR}/vgaddi.def)
|
||||
|
||||
set_entrypoint(vgaddi DrvEnableDriver@12)
|
||||
set_entrypoint(vgaddi DrvEnableDriver 12)
|
||||
set_subsystem(vgaddi native)
|
||||
set_image_base(vgaddi 0x00010000)
|
||||
add_pch(vgaddi vgaddi.h)
|
||||
|
|
|
@ -5,7 +5,7 @@ add_library(bmfd SHARED
|
|||
glyph.c)
|
||||
|
||||
add_pch(bmfd bmfd.h)
|
||||
set_entrypoint(bmfd BmfdEnableDriver@12)
|
||||
set_entrypoint(bmfd BmfdEnableDriver 12)
|
||||
set_subsystem(bmfd native)
|
||||
set_image_base(bmfd 0x00010000)
|
||||
target_link_libraries(bmfd libcntpr)
|
||||
|
|
|
@ -11,7 +11,7 @@ add_library(ftfd SHARED
|
|||
sprintf.c
|
||||
${CMAKE_CURRENT_BINARY_DIR}/ftfd.def)
|
||||
|
||||
set_entrypoint(ftfd FtfdEnableDriver@12)
|
||||
set_entrypoint(ftfd FtfdEnableDriver 12)
|
||||
set_subsystem(ftfd native)
|
||||
set_image_base(ftfd ${baseaddress_ftfd})
|
||||
|
||||
|
|
|
@ -96,7 +96,7 @@ if(ARCH MATCHES i386)
|
|||
add_pch(hal include/hal.h)
|
||||
add_dependencies(hal psdk bugcodes)
|
||||
|
||||
set_entrypoint(hal HalInitSystem@8)
|
||||
set_entrypoint(hal HalInitSystem 8)
|
||||
set_subsystem(hal native)
|
||||
set_image_base(hal 0x00010000)
|
||||
add_importlibs(hal ntoskrnl)
|
||||
|
|
|
@ -98,6 +98,7 @@ if(ARCH MATCHES i386)
|
|||
endif()
|
||||
elseif(ARCH MATCHES amd64)
|
||||
list(APPEND LIBCNTPR_SOURCE
|
||||
except/amd64/ehandler.c
|
||||
except/amd64/chkstk_asm.s
|
||||
except/amd64/seh.s
|
||||
setjmp/amd64/setjmp.s
|
||||
|
|
|
@ -421,7 +421,7 @@ endif()
|
|||
add_executable(ntoskrnl ${SOURCE})
|
||||
|
||||
if (ARCH MATCHES i386)
|
||||
set_entrypoint(ntoskrnl KiSystemStartup@4)
|
||||
set_entrypoint(ntoskrnl KiSystemStartup 4)
|
||||
else()
|
||||
set_entrypoint(ntoskrnl KiSystemStartup)
|
||||
endif()
|
||||
|
|
Loading…
Reference in a new issue