cmake-targets.patch 1.0 KB

12345678910111213141516171819202122232425262728293031
  1. commit 05cdf41dd6937fb02031727c8a5735aca70be439
  2. Author: Alexander Hirsch <1zeeky@gmail.com>
  3. Date: Thu Feb 21 04:00:41 2013 +0100
  4. add cmake install targets
  5. diff --git a/BtOgreConfig.cmake b/BtOgreConfig.cmake
  6. new file mode 100644
  7. index 0000000..d29444d
  8. --- /dev/null
  9. +++ b/BtOgreConfig.cmake
  10. @@ -0,0 +1,2 @@
  11. +find_path(BtOgre_INCLUDE_DIR BtOgreGP.h HINTS "/usr/include/BtOgre" "/usr/include")
  12. +find_library(BtOgre_LIBRARY NAMES BtOgre libBtOgre HINTS "/usr/lib")
  13. diff --git a/CMakeLists.txt b/CMakeLists.txt
  14. index 4fe3d14..6d44be4 100644
  15. --- a/CMakeLists.txt
  16. +++ b/CMakeLists.txt
  17. @@ -15,3 +15,11 @@ include_directories(
  18. add_library(BtOgre STATIC BtOgre.cpp)
  19. target_link_libraries(BtOgre ${BULLET_LIBRARIES} ${OGRE_LIBRARIES})
  20. +
  21. +file(GLOB BtOgre_HEADERS "${PROJECT_SOURCE_DIR}/include/*.h")
  22. +set_target_properties(BtOgre PROPERTIES PUBLIC_HEADER "${BtOgre_HEADERS}")
  23. +
  24. +install(TARGETS BtOgre
  25. + PUBLIC_HEADER DESTINATION include/BtOgre
  26. + ARCHIVE DESTINATION lib)
  27. +install(FILES BtOgreConfig.cmake DESTINATION lib/cmake/BtOgre)