1file(GLOB SWIG_INTERFACES interface/*.i)
2file(GLOB_RECURSE SWIG_SOURCES *.swig)
3file(GLOB SWIG_HEADERS
4  ${LLDB_SOURCE_DIR}/include/lldb/API/*.h
5  ${LLDB_SOURCE_DIR}/include/lldb/*.h
6)
7file(GLOB SWIG_PRIVATE_HEADERS
8  ${LLDB_SOURCE_DIR}/include/lldb/lldb-private*.h
9)
10foreach(private_header ${SWIG_PRIVATE_HEADERS})
11  list(REMOVE_ITEM SWIG_HEADERS ${private_header})
12endforeach()
13
14if(LLDB_BUILD_FRAMEWORK)
15  set(framework_arg --framework --target-platform Darwin)
16endif()
17
18if(APPLE)
19  set(DARWIN_EXTRAS "-D__APPLE__")
20else()
21  set(DARWIN_EXTRAS "")
22endif()
23
24set(SWIG_COMMON_FLAGS
25  -c++
26  -features autodoc
27  -I${LLDB_SOURCE_DIR}/include
28  -I${CMAKE_CURRENT_SOURCE_DIR}
29  -D__STDC_LIMIT_MACROS
30  -D__STDC_CONSTANT_MACROS
31  ${DARWIN_EXTRAS}
32)
33
34if (LLDB_ENABLE_PYTHON)
35  add_subdirectory(python)
36endif()
37
38if (LLDB_ENABLE_LUA)
39  add_subdirectory(lua)
40endif()
41