2013-11-22 02:39:32 +08:00
|
|
|
set(LLVM_NO_RTTI 1)
|
|
|
|
|
2014-11-08 09:41:49 +08:00
|
|
|
if ( CMAKE_SYSTEM_NAME MATCHES "Linux" )
|
|
|
|
include_directories(
|
2015-05-10 23:22:09 +08:00
|
|
|
../../../../llvm/include
|
2014-11-08 09:41:49 +08:00
|
|
|
../../source/Plugins/Process/Linux
|
|
|
|
../../source/Plugins/Process/POSIX
|
|
|
|
)
|
|
|
|
endif ()
|
|
|
|
|
|
|
|
if ( CMAKE_SYSTEM_NAME MATCHES "FreeBSD" )
|
|
|
|
include_directories(
|
2015-05-10 23:22:09 +08:00
|
|
|
../../../../llvm/include
|
2014-11-08 09:41:49 +08:00
|
|
|
../../source/Plugins/Process/FreeBSD
|
|
|
|
../../source/Plugins/Process/POSIX
|
|
|
|
)
|
|
|
|
endif ()
|
2015-02-18 23:39:41 +08:00
|
|
|
|
2013-11-22 02:39:32 +08:00
|
|
|
include_directories(../../source)
|
|
|
|
|
2014-11-08 09:41:49 +08:00
|
|
|
include(../../cmake/LLDBDependencies.cmake)
|
|
|
|
|
2015-02-18 23:39:41 +08:00
|
|
|
if (BUILD_SHARED_LIBS )
|
|
|
|
add_lldb_executable(lldb-server
|
|
|
|
lldb-server.cpp
|
2015-01-15 05:01:15 +08:00
|
|
|
lldb-gdbserver.cpp
|
2015-02-18 23:39:41 +08:00
|
|
|
lldb-platform.cpp
|
2015-01-15 05:01:15 +08:00
|
|
|
)
|
2013-11-22 02:39:32 +08:00
|
|
|
|
2015-02-18 23:39:41 +08:00
|
|
|
target_link_libraries(lldb-server liblldb)
|
2014-11-08 09:41:49 +08:00
|
|
|
else()
|
2015-02-18 23:39:41 +08:00
|
|
|
add_lldb_executable(lldb-server
|
|
|
|
lldb-server.cpp
|
2015-01-15 05:01:15 +08:00
|
|
|
lldb-gdbserver.cpp
|
2015-02-18 23:39:41 +08:00
|
|
|
lldb-platform.cpp
|
2015-01-15 05:01:15 +08:00
|
|
|
../../source/lldb.cpp
|
|
|
|
)
|
|
|
|
|
|
|
|
# The Darwin linker doesn't understand --start-group/--end-group.
|
|
|
|
if (LLVM_COMPILER_IS_GCC_COMPATIBLE AND NOT "${CMAKE_SYSTEM_NAME}" MATCHES "Darwin")
|
2015-02-18 23:39:41 +08:00
|
|
|
target_link_libraries(lldb-server
|
2015-01-15 05:01:15 +08:00
|
|
|
-Wl,--start-group ${LLDB_USED_LIBS} -Wl,--end-group)
|
|
|
|
else()
|
2015-02-18 23:39:41 +08:00
|
|
|
target_link_libraries(lldb-server ${LLDB_USED_LIBS})
|
2015-01-15 05:01:15 +08:00
|
|
|
endif()
|
2015-02-18 23:39:41 +08:00
|
|
|
target_link_libraries(lldb-server ${CLANG_USED_LIBS})
|
|
|
|
llvm_config(lldb-server ${LLVM_LINK_COMPONENTS})
|
2015-01-15 05:01:15 +08:00
|
|
|
|
2015-02-18 23:39:41 +08:00
|
|
|
target_link_libraries(lldb-server ${LLDB_SYSTEM_LIBS})
|
2014-11-08 09:41:49 +08:00
|
|
|
endif()
|
2013-11-22 02:39:32 +08:00
|
|
|
|
2015-02-18 23:39:41 +08:00
|
|
|
set_target_properties(lldb-server PROPERTIES VERSION ${LLDB_VERSION})
|
|
|
|
|
|
|
|
install(TARGETS lldb-server
|
2013-11-22 02:39:32 +08:00
|
|
|
RUNTIME DESTINATION bin)
|