1 #------------------------------------
2 # Definitions (for platform)
3 #-----------------------------------
4 if (CLR_CMAKE_PLATFORM_ARCH_AMD64)
5 add_definitions(-D_AMD64_)
6 add_definitions(-D_WIN64)
7 add_definitions(-DAMD64)
8 add_definitions(-DBIT64=1)
9 elseif (CLR_CMAKE_PLATFORM_ARCH_I386)
10 add_definitions(-D_X86_)
11 elseif (CLR_CMAKE_PLATFORM_ARCH_ARM)
12 add_definitions(-D_ARM_)
13 add_definitions(-DARM)
14 elseif (CLR_CMAKE_PLATFORM_ARCH_ARM64)
15 add_definitions(-D_ARM64_)
16 add_definitions(-DARM64)
17 add_definitions(-D_WIN64)
18 add_definitions(-DBIT64=1)
23 if (CLR_CMAKE_PLATFORM_UNIX)
24 if(CLR_CMAKE_PLATFORM_LINUX)
25 if(CLR_CMAKE_PLATFORM_UNIX_AMD64)
26 message("Detected Linux x86_64")
27 add_definitions(-DLINUX64)
28 elseif(CLR_CMAKE_PLATFORM_UNIX_ARM)
29 message("Detected Linux ARM")
30 add_definitions(-DLINUX32)
31 elseif(CLR_CMAKE_PLATFORM_UNIX_ARM64)
32 message("Detected Linux ARM64")
33 add_definitions(-DLINUX64)
34 elseif(CLR_CMAKE_PLATFORM_UNIX_X86)
35 message("Detected Linux i686")
36 add_definitions(-DLINUX32)
40 endif(CLR_CMAKE_PLATFORM_LINUX)
41 endif(CLR_CMAKE_PLATFORM_UNIX)
43 if (CLR_CMAKE_PLATFORM_UNIX)
44 add_definitions(-DPLATFORM_UNIX=1)
46 if(CLR_CMAKE_PLATFORM_DARWIN)
47 message("Detected OSX x86_64")
48 endif(CLR_CMAKE_PLATFORM_DARWIN)
50 if(CLR_CMAKE_PLATFORM_FREEBSD)
51 message("Detected FreeBSD amd64")
52 endif(CLR_CMAKE_PLATFORM_FREEBSD)
54 if(CLR_CMAKE_PLATFORM_NETBSD)
55 message("Detected NetBSD amd64")
56 endif(CLR_CMAKE_PLATFORM_NETBSD)
57 endif(CLR_CMAKE_PLATFORM_UNIX)
60 # Define the CRT lib references that link into Desktop imports
61 set(STATIC_MT_CRT_LIB "libcmt$<$<OR:$<CONFIG:Debug>,$<CONFIG:Checked>>:d>.lib")
62 set(STATIC_MT_VCRT_LIB "libvcruntime$<$<OR:$<CONFIG:Debug>,$<CONFIG:Checked>>:d>.lib")
63 set(STATIC_MT_CPP_LIB "libcpmt$<$<OR:$<CONFIG:Debug>,$<CONFIG:Checked>>:d>.lib")
66 # Architecture specific files folder name
67 if (CLR_CMAKE_TARGET_ARCH_AMD64)
68 set(ARCH_SOURCES_DIR amd64)
69 elseif (CLR_CMAKE_TARGET_ARCH_ARM64)
70 set(ARCH_SOURCES_DIR arm64)
71 elseif (CLR_CMAKE_TARGET_ARCH_ARM)
72 set(ARCH_SOURCES_DIR arm)
73 elseif (CLR_CMAKE_TARGET_ARCH_I386)
74 set(ARCH_SOURCES_DIR i386)