CMake initial WIP commit
[dyninst.git] / cmake / packages.cmake
1 if (UNIX)
2 set (PATH_LIBDWARF "/usr" CACHE STRING "Path to libdwarf")
3 if (NOT (PATH_LIBDWARF STREQUAL ""))
4   set (CMAKE_LIBRARY_PATH ${CMAKE_LIBRARY_PATH} ${PATH_LIBDWARF}/lib ${PATH_LIBDWARF}/lib64)
5   set (CMAKE_INCLUDE_PATH ${CMAKE_INCLUDE_PATH} ${PATH_LIBDWARF}/include)
6 endif()
7
8 set (PATH_LIBELF "/usr" CACHE STRING "Path to libelf")
9 if (NOT (PATH_LIBELF STREQUAL ""))
10   set (CMAKE_LIBRARY_PATH ${CMAKE_LIBRARY_PATH} ${PATH_LIBELF}/lib ${PATH_LIBELF}/lib64)
11   set (CMAKE_INCLUDE_PATH ${CMAKE_INCLUDE_PATH} ${PATH_LIBELF}/include)
12 endif()
13
14 find_package (LibElf REQUIRED)
15 find_package (LibDwarf REQUIRED)
16 include_directories (
17                     ${LIBELF_INCLUDE_DIRS}
18                     ${LIBDWARF_INCLUDE_DIRS}
19 )
20 endif()
21
22
23 set (PATH_BOOST "/usr" CACHE STRING "Path to boost")
24 if (NOT (PATH_BOOST STREQUAL ""))
25   set (CMAKE_LIBRARY_PATH ${CMAKE_LIBRARY_PATH} ${PATH_BOOST}/lib ${PATH_BOOST}/lib64)
26   set (CMAKE_INCLUDE_PATH ${CMAKE_INCLUDE_PATH} ${PATH_BOOST}/include)
27 endif()
28
29 find_package (Boost REQUIRED)
30
31 include_directories (
32                     ${Boost_INCLUDE_DIRS}
33 )