project(sosplugin)

set(CMAKE_INCLUDE_CURRENT_DIR ON)

set(LLDB_SRC_DIR $ENV{LLDB_SRC_DIR})
set(LLVM_BUILD_DIR $ENV{LLVM_BUILD_DIR})

if((NOT ${LLDB_SRC_DIR} STREQUAL "") AND (NOT ${LLVM_BUILD_DIR} STREQUAL ""))
    add_compile_options(-Wno-delete-non-virtual-dtor)

    set(LLDB_INCLUDE_DIR "${LLDB_SRC_DIR}/include")

    include_directories(inc)
    include_directories("${LLDB_INCLUDE_DIR}")

    link_directories("${LLVM_BUILD_DIR}/lib")

    set(SOURCES
        sosplugin.cpp
        soscommand.cpp
        debugclient.cpp
    )

    add_library(sosplugin SHARED ${SOURCES})
    add_dependencies(sosplugin sos)
    target_link_libraries(sosplugin lldb)

    # add the install targets
    install (TARGETS sosplugin DESTINATION .)
endif()
project(sosplugin)

set(CMAKE_INCLUDE_CURRENT_DIR ON)

set(LLVM_DIR "/usr/lib/llvm-3.5")
set(LLDB_INCLUDE_DIR "${LLVM_DIR}/include")
set(LLDB_LIB_DIR "${LLVM_DIR}/lib")

add_compile_options(-Wno-delete-non-virtual-dtor)

include_directories(inc)
include_directories("${LLDB_INCLUDE_DIR}")
link_directories("${LLDB_LIB_DIR}")

set(SOURCES
    sosplugin.cpp
    soscommand.cpp
    debugclient.cpp
)

add_library(sosplugin SHARED ${SOURCES})
add_dependencies(sosplugin sos)

# add the install targets
install (TARGETS sosplugin DESTINATION .)
Change lldb plugin to use lldb dev package for its include and lib files.
Change lldb plugin to use lldb dev package for its include and lib files.

NOTE: Now there is another pre-requisite package to install: sudo apt-get install lldb-3.5-dev

Not sure what to do for OS-X.
