VirtualBox

source: vbox/trunk/src/libs/libogg-1.3.5/cmake/CheckSizes.cmake@ 99132

Last change on this file since 99132 was 96360, checked in by vboxsync, 2 years ago

libogg, libvorbis: export to OSE

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.0 KB
Line 
1include(CheckTypeSize)
2
3check_type_size("int16_t" INT16_SIZE LANGUAGE C)
4check_type_size("uint16_t" UINT16_SIZE LANGUAGE C)
5check_type_size("u_int16_t" U_INT16_SIZE LANGUAGE C)
6check_type_size("int32_t" INT32_SIZE LANGUAGE C)
7check_type_size("uint32_t" UINT32_SIZE LANGUAGE C)
8check_type_size("u_int32_t" U_INT32_SIZE LANGUAGE C)
9check_type_size("int64_t" INT64_SIZE LANGUAGE C)
10check_type_size("short" SHORT_SIZE LANGUAGE C)
11check_type_size("int" INT_SIZE LANGUAGE C)
12check_type_size("long" LONG_SIZE LANGUAGE C)
13check_type_size("long long" LONG_LONG_SIZE LANGUAGE C)
14
15if(INT16_SIZE EQUAL 2)
16 set(SIZE16 "int16_t")
17elseif(SHORT_SIZE EQUAL 2)
18 set(SIZE16 "short")
19elseif(INT_SIZE EQUAL 2)
20 set(SIZE16 "int")
21else()
22 message(FATAL_ERROR "No 16 bit type found on this platform!")
23endif()
24
25if(UINT16_SIZE EQUAL 2)
26 set(USIZE16 "uint16_t")
27elseif(SHORT_SIZE EQUAL 2)
28 set(USIZE16 "unsigned short")
29elseif(INT_SIZE EQUAL 2)
30 set(USIZE16 "unsigned int")
31elseif(U_INT_SIZE EQUAL 2)
32 set(USIZE16 "u_int16_t")
33else()
34 message(FATAL_ERROR "No unsigned 16 bit type found on this platform!")
35endif()
36
37if(INT32_SIZE EQUAL 4)
38 set(SIZE32 "int32_t")
39elseif(SHORT_SIZE EQUAL 4)
40 set(SIZE32 "short")
41elseif(INT_SIZE EQUAL 4)
42 set(SIZE32 "int")
43elseif(LONG_SIZE EQUAL 4)
44 set(SIZE16 "long")
45else()
46 message(FATAL_ERROR "No 32 bit type found on this platform!")
47endif()
48
49if(UINT32_SIZE EQUAL 4)
50 set(USIZE32 "uint32_t")
51elseif(SHORT_SIZE EQUAL 4)
52 set(USIZE32 "unsigned short")
53elseif(INT_SIZE EQUAL 4)
54 set(USIZE32 "unsigned int")
55elseif(LONG_SIZE EQUAL 4)
56 set(USIZE32 "unsigned long")
57elseif(U_INT_SIZE EQUAL 4)
58 set(USIZE32 "u_int32_t")
59else()
60 message(FATAL_ERROR "No unsigned 32 bit type found on this platform!")
61endif()
62
63if(INT64_SIZE EQUAL 8)
64 set(SIZE64 "int64_t")
65elseif(INT_SIZE EQUAL 8)
66 set(SIZE64 "int")
67elseif(LONG_SIZE EQUAL 8)
68 set(SIZE64 "long")
69elseif(LONG_LONG_SIZE EQUAL 8)
70 set(SIZE64 "long long")
71else()
72 message(FATAL_ERROR "No 64 bit type found on this platform!")
73endif()
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette