Advertisement
Guest User

Untitled

a guest
Nov 15th, 2016
204
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.78 KB | None | 0 0
  1.  
  2. cmake_minimum_required (VERSION 2.8)
  3. project (edb)
  4.  
  5. # if the user has not specified which version, we try to make Qt5 happen
  6. # if they have, we prefer their preference
  7. if (NOT QT_VERSION)
  8. SET(QT_VERSION "Qt5" CACHE STRING "Version of Qt to use")
  9. SET_PROPERTY(CACHE QT_VERSION PROPERTY STRINGS Qt5 Qt4)
  10. endif()
  11.  
  12. set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "{PROJECT_SOURCE_DIR}/cmake/Modules/")
  13.  
  14. include("GNUInstallDirs")
  15.  
  16. find_package(Boost 1.35 REQUIRED)
  17. find_package(PkgConfig REQUIRED)
  18.  
  19. pkg_check_modules(CAPSTONE REQUIRED capstone>=3.0.4)
  20. include_directories(${CAPSTONE_INCLUDE_DIRS})
  21. link_directories(${CAPSTONE_LIBRARY_DIRS})
  22.  
  23. # eventually use this to generate version.h?
  24. set(TARGET_VERSION_MAJOR 0)
  25. set(TARGET_VERSION_MINOR 9)
  26. set(TARGET_VERSION_PATCH 22)
  27. set_property(GLOBAL PROPERTY VERSION ${TARGET_VERSION_MAJOR}.${TARGET_VERSION_MINOR}.${TARGET_VERSION_PATCH})
  28.  
  29.  
  30. # TODO(eteran): how lowe can we make this
  31. pkg_check_modules(GRAPHVIZ libgvc>=2.38.0)
  32. if(${GRAPHVIZ_FOUND})
  33. include_directories(${GRAPHVIZ_INCLUDE_DIRS})
  34. link_directories(${GRAPHVIZ_LIBRARY_DIRS})
  35. add_definitions(-DENABLE_GRAPH)
  36. endif()
  37.  
  38. if(${QT_VERSION} STREQUAL "Qt5")
  39. find_package(Qt5Core)
  40. endif()
  41.  
  42. include_directories("include")
  43.  
  44. if(UNIX)
  45. include_directories("include/os/unix")
  46. endif()
  47.  
  48. if((${CMAKE_SYSTEM_PROCESSOR} MATCHES "i[3456]86") OR (${CMAKE_SYSTEM_PROCESSOR} STREQUAL "x86_64"))
  49. include_directories("include/arch/x86-generic")
  50. endif()
  51.  
  52. add_subdirectory(src)
  53. add_subdirectory(plugins)
  54.  
  55. install (FILES ${CMAKE_SOURCE_DIR}/edb.1 DESTINATION ${CMAKE_INSTALL_MANDIR})
  56. install (FILES ${CMAKE_SOURCE_DIR}/edb.desktop DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/applications/)
  57. install (FILES ${CMAKE_SOURCE_DIR}/src/images/edb.png DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/pixmaps/)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement