-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
57 lines (49 loc) · 1.96 KB
/
CMakeLists.txt
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
cmake_minimum_required(VERSION 2.8)
project(asn1c)
SET(VERSION "0.9.29")
INCLUDE (CheckIncludeFiles)
INCLUDE (CheckFunctionExists)
INCLUDE (CheckTypeSize)
# usage: CHECK_INCLUDE_FILES (<header> <RESULT_VARIABLE> )
CHECK_INCLUDE_FILES (alloca.h HAVE_ALLOCA_H)
CHECK_FUNCTION_EXISTS(strcasecmp HAVE_DECL_ALLOCA_STRCASECMP)
CHECK_INCLUDE_FILES(dlfcn.h HAVE_DLFCN_H)
CHECK_INCLUDE_FILES(inttypes.h HAVE_INTTYPES_H)
CHECK_INCLUDE_FILES(memory.h HAVE_MEMORY_H)
CHECK_FUNCTION_EXISTS(mergesort HAVE_MERGESORT)
CHECK_FUNCTION_EXISTS(mkstemps HAVE_MKSTEMPS)
CHECK_INCLUDE_FILES(stdint.h HAVE_STDINT_H)
CHECK_INCLUDE_FILES(stdlib.h HAVE_STDLIB_H)
CHECK_INCLUDE_FILES(strings.h HAVE_STRINGS_H)
CHECK_INCLUDE_FILES(string.h HAVE_STRING_H)
CHECK_FUNCTION_EXISTS(strtoimax HAVE_STRTOIMAX)
CHECK_FUNCTION_EXISTS(strtoll HAVE_STRTOLL)
CHECK_FUNCTION_EXISTS(symlink HAVE_SYMLINK)
CHECK_INCLUDE_FILES(sys/param.h HAVE_SYS_PARAM_H)
CHECK_INCLUDE_FILES(sys/stat.h HAVE_SYS_STAT_H)
CHECK_INCLUDE_FILES(sys/types.h HAVE_SYS_TYPES_H)
CHECK_FUNCTION_EXISTS(timegm HAVE_TIMEGM)
CHECK_INCLUDE_FILES(unistd.h HAVE_UNISTD_H)
SET(STDC_HEADERS 1)
SET(CMAKE_EXTRA_INCLUDE_FILES sys/time.h)
CHECK_TYPE_SIZE("struct tm" TM_IN_SYS_TIME)
SET(CMAKE_EXTRA_INCLUDE_FILES)
SET(CMAKE_EXTRA_INCLUDE_FILES sys/types.h)
CHECK_TYPE_SIZE(off_t HAVE_OFF_T)
CHECK_TYPE_SIZE(intmax_t HAVE_INTMAX_T)
CHECK_TYPE_SIZE(size_t HAVE_SIZE_T)
SET(CMAKE_EXTRA_INCLUDE_FILES)
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config.h)
ADD_DEFINITIONS(-DHAVE_CONFIG_H=1)
ADD_DEFINITIONS(-DDATADIR="${CMAKE_CURRENT_SOURCE_DIR}/skeletons")
include_directories(${CMAKE_CURRENT_BINARY_DIR})
SET (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu99")
include_directories(skeletons)
include_directories(libasn1common)
include_directories(libasn1print)
add_subdirectory(asn1c)
add_subdirectory(libasn1compiler)
add_subdirectory(libasn1parser)
add_subdirectory(libasn1print)
add_subdirectory(libasn1fix)
add_subdirectory(libasn1common)