forked from pooryorick/metakit
-
Notifications
You must be signed in to change notification settings - Fork 1
/
CMakeLists.txt
50 lines (39 loc) · 1.37 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
cmake_minimum_required(VERSION 2.8)
project(metakit)
set(CMAKE_OSX_ARCHITECTURES x86_64)
include(CheckIncludeFiles)
include(CheckFunctionExists)
include(CheckTypeSize)
include(CTest)
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_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_include_files(sys/stat.h HAVE_SYS_STAT_H)
check_include_files(sys/types.h HAVE_SYS_TYPES_H)
check_include_files(unistd.h HAVE_UNISTD_H)
check_function_exists(bcopy HAVE_BCOPY)
check_function_exists(memmove HAVE_MEMMOVE)
check_function_exists(mmap HAVE_MMAP)
set(CMAKE_EXTRA_INCLUDE_FILES)
check_type_size(long SIZEOF_LONG)
check_type_size("long long" LONG_LONG)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config.h)
include_directories(${CMAKE_CURRENT_BINARY_DIR})
option (USE_SYSTEM_STL "Build with system STL (duh?)" OFF)
option (METAKIT_TCL "Build Tcl bindings" ON)
option (METAKIT_PYTHON "Build Python bindings" ON)
add_subdirectory(src)
add_subdirectory(demos)
if (BUILD_TESTING)
add_subdirectory(tests)
endif (BUILD_TESTING)
if (METAKIT_TCL)
add_subdirectory(tcl)
endif()
if (METAKIT_PYTHON)
add_subdirectory(python)
endif()