forked from Maproom/qmapshack
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ConfigureChecks.cmake
40 lines (32 loc) · 1008 Bytes
/
ConfigureChecks.cmake
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
include(CheckIncludeFile)
include(CheckSymbolExists)
include(CheckFunctionExists)
include(CheckLibraryExists)
include(CheckTypeSize)
include(CheckCXXSourceCompiles)
include(TestBigEndian)
set(PACKAGE ${PROJECT_NAME})
set(VERSION ${APPLICATION_VERSION})
set(DATADIR ${DATA_INSTALL_DIR})
set(LIBDIR ${LIB_INSTALL_DIR})
set(PLUGINDIR "${PLUGIN_INSTALL_DIR}")
set(SYSCONFDIR ${SYSCONF_INSTALL_DIR})
set(BINARYDIR ${CMAKE_BINARY_DIR})
set(SOURCEDIR ${CMAKE_SOURCE_DIR})
set(SHARED_LIB_EXT ".dll")
if (UNIX AND NOT WIN32)
if (APPLE)
set(SHARED_LIB_EXT ".dylib")
else(APPLE)
set(SHARED_LIB_EXT ".so")
endif(APPLE)
endif (UNIX AND NOT WIN32)
check_include_file(stdint.h HAVE_STDINT_H)
check_include_file(inttypes.h HAVE_INTTYPES_H)
check_include_file(byteswap.h HAVE_BYTESWAP_H)
test_big_endian(HAVE_BIGENDIAN)
check_function_exists(arc4random HAVE_ARC4RANDOM)
# check if we're on a 64bit host
if(CMAKE_SIZEOF_VOID_P MATCHES "8")
SET(HOST_IS_64_BIT 1)
endif(CMAKE_SIZEOF_VOID_P MATCHES "8")