2011-05-16 13:12:07 +00:00
|
|
|
|
|
|
|
include_directories(include)
|
|
|
|
|
|
|
|
add_definitions(-D_CRTBLD)
|
|
|
|
|
2012-08-27 18:58:27 +00:00
|
|
|
if(ARCH STREQUAL "i386")
|
2013-01-08 20:33:08 +00:00
|
|
|
list(APPEND CHKSTK_ASM_SOURCE except/i386/chkstk_asm.s)
|
2011-06-11 16:09:57 +00:00
|
|
|
if(NOT MSVC)
|
|
|
|
list(APPEND CHKSTK_SOURCE except/i386/chkstk_ms.s)
|
|
|
|
endif()
|
2012-08-27 18:58:27 +00:00
|
|
|
elseif(ARCH STREQUAL "amd64")
|
2013-01-08 20:33:08 +00:00
|
|
|
list(APPEND CHKSTK_ASM_SOURCE except/amd64/chkstk_asm.s)
|
2011-06-11 16:09:57 +00:00
|
|
|
if(NOT MSVC)
|
|
|
|
list(APPEND CHKSTK_SOURCE except/amd64/chkstk_ms.s)
|
|
|
|
endif()
|
2014-07-05 19:17:16 +00:00
|
|
|
elseif(ARCH STREQUAL "arm")
|
|
|
|
list(APPEND CHKSTK_ASM_SOURCE except/arm/chkstk_asm.s)
|
|
|
|
if(NOT MSVC)
|
|
|
|
list(APPEND CHKSTK_SOURCE except/arm/chkstk_ms.s)
|
|
|
|
endif()
|
2012-08-27 18:58:27 +00:00
|
|
|
elseif(ARCH STREQUAL "powerpc")
|
2013-01-08 20:33:08 +00:00
|
|
|
list(APPEND CHKSTK_ASM_SOURCE except/powerpc/chkstk_asm.s)
|
2011-06-05 18:42:09 +00:00
|
|
|
endif()
|
|
|
|
|
2013-01-08 20:33:08 +00:00
|
|
|
add_asm_files(chkstk_lib_asm ${CHKSTK_ASM_SOURCE})
|
|
|
|
add_library(chkstk ${CHKSTK_SOURCE} ${chkstk_lib_asm})
|
|
|
|
set_target_properties(chkstk PROPERTIES LINKER_LANGUAGE "C")
|
2011-06-11 16:09:57 +00:00
|
|
|
add_dependencies(chkstk asm)
|
2011-06-05 18:42:09 +00:00
|
|
|
|
2011-05-23 15:50:03 +00:00
|
|
|
include(crt.cmake)
|
|
|
|
include(libcntpr.cmake)
|
|
|
|
include(msvcrtex.cmake)
|
|
|
|
include(oldnames.cmake)
|
2011-05-16 13:12:07 +00:00
|
|
|
|
|
|
|
add_library(user32_wsprintf
|
|
|
|
printf/streamout.c
|
|
|
|
printf/wstreamout.c
|
|
|
|
printf/wsprintfA.c
|
|
|
|
printf/wsprintfW.c
|
|
|
|
printf/wvsprintfA.c
|
|
|
|
printf/wvsprintfW.c
|
|
|
|
printf/wvsnprintfA.c
|
|
|
|
printf/wvsnprintfW.c
|
2012-07-04 18:58:09 +00:00
|
|
|
string/strnlen.c
|
|
|
|
string/wcsnlen.c
|
2011-05-16 13:12:07 +00:00
|
|
|
string/mbstowcs_nt.c
|
|
|
|
string/wcstombs_nt.c)
|
|
|
|
|
2012-04-01 17:32:55 +00:00
|
|
|
add_dependencies(user32_wsprintf psdk)
|
2011-10-02 18:59:33 +00:00
|
|
|
add_target_compile_definitions(user32_wsprintf _USER32_WSPRINTF)
|
2011-05-23 15:50:03 +00:00
|
|
|
|
2015-09-29 17:24:48 +00:00
|
|
|
add_library(memcmp mem/memcmp.c)
|
|
|
|
add_dependencies(memcmp psdk)
|
|
|
|
|
2011-05-23 15:50:03 +00:00
|
|
|
add_library(getopt misc/getopt.c)
|
2011-10-02 18:59:33 +00:00
|
|
|
add_target_compile_definitions(getopt _DLL __USE_CRTIMP)
|
2011-05-23 15:50:03 +00:00
|
|
|
add_dependencies(getopt psdk)
|
2016-06-01 07:09:50 +00:00
|
|
|
|
|
|
|
add_library(strtol
|
|
|
|
string/ctype.c
|
|
|
|
string/iswctype.c
|
|
|
|
string/strtoi64.c
|
|
|
|
string/strtol.c
|
|
|
|
string/strtoul.c
|
|
|
|
string/strtoull.c
|
|
|
|
string/wctype.c)
|
|
|
|
add_target_compile_definitions(strtol _LIBCNT_)
|
|
|
|
add_dependencies(strtol psdk)
|
2016-07-23 20:35:11 +00:00
|
|
|
|
|
|
|
|
|
|
|
if(ARCH STREQUAL "i386")
|
|
|
|
list(APPEND ATAN2_ASM_SOURCE math/i386/atan2_asm.s)
|
|
|
|
elseif(ARCH STREQUAL "amd64")
|
|
|
|
list(APPEND ATAN2_ASM_SOURCE math/amd64/atan2.S)
|
|
|
|
elseif(ARCH STREQUAL "arm")
|
|
|
|
list(APPEND ATAN2_ASM_SOURCE math/arm/atan2.s)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
add_asm_files(atan2_asm ${ATAN2_ASM_SOURCE})
|
|
|
|
add_library(atan2 ${atan2_asm})
|
|
|
|
set_target_properties(atan2 PROPERTIES LINKER_LANGUAGE "C")
|
|
|
|
add_dependencies(atan2 asm)
|
|
|
|
|
|
|
|
|