cmake.patch 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131
  1. diff --git a/dynamicEDT3D/src/CMakeLists.txt b/dynamicEDT3D/src/CMakeLists.txt
  2. index 0b9357c..bbef680 100644
  3. --- a/dynamicEDT3D/src/CMakeLists.txt
  4. +++ b/dynamicEDT3D/src/CMakeLists.txt
  5. @@ -2,35 +2,29 @@ SET( dynamicEDT3D_SRCS
  6. dynamicEDT3D.cpp
  7. )
  8. -add_library(dynamicedt3d SHARED ${dynamicEDT3D_SRCS})
  9. +add_library(dynamicedt3d ${dynamicEDT3D_SRCS})
  10. set_target_properties(dynamicedt3d PROPERTIES
  11. VERSION ${DYNAMICEDT3D_VERSION}
  12. SOVERSION ${DYNAMICEDT3D_SOVERSION}
  13. )
  14. target_link_libraries(dynamicedt3d ${OCTOMAP_LIBRARIES})
  15. -add_library(dynamicedt3d-static STATIC ${dynamicEDT3D_SRCS})
  16. -target_link_libraries(dynamicedt3d-static ${OCTOMAP_LIBRARIES})
  17. -
  18. -SET_TARGET_PROPERTIES(dynamicedt3d-static PROPERTIES OUTPUT_NAME "dynamicedt3d")
  19. -
  20. if(NOT EXISTS "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/cmake/dynamicEDT3D")
  21. file(MAKE_DIRECTORY "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/cmake/dynamicEDT3D")
  22. endif()
  23. -export(TARGETS dynamicedt3d dynamicedt3d-static
  24. +export(TARGETS dynamicedt3d
  25. FILE "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/cmake/dynamicEDT3D/dynamicEDT3DTargets.cmake")
  26. # directly depend on the octomap library target when building the
  27. # complete distribution, so it it recompiled as needed
  28. if (CMAKE_PROJECT_NAME STREQUAL "octomap-distribution")
  29. - ADD_DEPENDENCIES(dynamicedt3d-static octomap-static)
  30. ADD_DEPENDENCIES(dynamicedt3d octomap)
  31. endif()
  32. -ADD_SUBDIRECTORY(examples)
  33. -install(TARGETS dynamicedt3d dynamicedt3d-static
  34. +
  35. +install(TARGETS dynamicedt3d
  36. EXPORT dynamicEDT3DTargets
  37. INCLUDES DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}"
  38. ${INSTALL_TARGETS_DEFAULT_ARGS}
  39. diff --git a/octomap/CMakeLists.txt b/octomap/CMakeLists.txt
  40. index 87a78e9..edae7f1 100644
  41. --- a/octomap/CMakeLists.txt
  42. +++ b/octomap/CMakeLists.txt
  43. @@ -161,7 +161,7 @@ install_pkg_config_file(octomap
  44. VERSION ${OCTOMAP_VERSION})
  45. # Documentation
  46. -FIND_PACKAGE(Doxygen)
  47. +
  48. IF(DOXYGEN_FOUND)
  49. configure_file(${CMAKE_CURRENT_SOURCE_DIR}/octomap.dox.in ${CMAKE_CURRENT_BINARY_DIR}/octomap.dox @ONLY)
  50. ADD_CUSTOM_TARGET(docs ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/octomap.dox
  51. diff --git a/octomap/src/CMakeLists.txt b/octomap/src/CMakeLists.txt
  52. index 45b384f..837fee8 100644
  53. --- a/octomap/src/CMakeLists.txt
  54. +++ b/octomap/src/CMakeLists.txt
  55. @@ -11,14 +11,11 @@ SET (octomap_SRCS
  56. )
  57. # dynamic and static libs, see CMake FAQ:
  58. -ADD_LIBRARY( octomap SHARED ${octomap_SRCS})
  59. +ADD_LIBRARY( octomap ${octomap_SRCS})
  60. set_target_properties( octomap PROPERTIES
  61. VERSION ${OCTOMAP_VERSION}
  62. SOVERSION ${OCTOMAP_SOVERSION}
  63. )
  64. -ADD_LIBRARY( octomap-static STATIC ${octomap_SRCS})
  65. -SET_TARGET_PROPERTIES(octomap-static PROPERTIES OUTPUT_NAME "octomap")
  66. -add_dependencies(octomap-static octomath-static)
  67. TARGET_LINK_LIBRARIES(octomap octomath)
  68. @@ -26,10 +23,10 @@ if(NOT EXISTS "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/cmake/octomap")
  69. file(MAKE_DIRECTORY "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/cmake/octomap")
  70. endif()
  71. -export(TARGETS octomap octomap-static
  72. +export(TARGETS octomap
  73. APPEND FILE "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/cmake/octomap/octomap-targets.cmake")
  74. -ADD_SUBDIRECTORY( testing )
  75. +
  76. ADD_EXECUTABLE(graph2tree graph2tree.cpp)
  77. TARGET_LINK_LIBRARIES(graph2tree octomap)
  78. @@ -67,7 +64,7 @@ TARGET_LINK_LIBRARIES(intersection_example octomap)
  79. ADD_EXECUTABLE(octree2pointcloud octree2pointcloud.cpp)
  80. TARGET_LINK_LIBRARIES(octree2pointcloud octomap)
  81. -install(TARGETS octomap octomap-static
  82. +install(TARGETS octomap
  83. EXPORT octomap-targets
  84. INCLUDES DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}"
  85. ${INSTALL_TARGETS_DEFAULT_ARGS}
  86. diff --git a/octomap/src/math/CMakeLists.txt b/octomap/src/math/CMakeLists.txt
  87. index 3b47ec4..9a26c46 100644
  88. --- a/octomap/src/math/CMakeLists.txt
  89. +++ b/octomap/src/math/CMakeLists.txt
  90. @@ -5,24 +5,21 @@ SET (octomath_SRCS
  91. )
  92. -ADD_LIBRARY( octomath SHARED ${octomath_SRCS})
  93. +ADD_LIBRARY( octomath ${octomath_SRCS})
  94. SET_TARGET_PROPERTIES( octomath PROPERTIES
  95. VERSION ${OCTOMAP_VERSION}
  96. SOVERSION ${OCTOMAP_SOVERSION}
  97. )
  98. -ADD_LIBRARY( octomath-static STATIC ${octomath_SRCS})
  99. -SET_TARGET_PROPERTIES(octomath-static PROPERTIES OUTPUT_NAME "octomath")
  100. -
  101. if(NOT EXISTS "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/cmake/octomap")
  102. file(MAKE_DIRECTORY "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/cmake/octomap")
  103. endif()
  104. -export(TARGETS octomath octomath-static
  105. +export(TARGETS octomath
  106. APPEND FILE "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/cmake/octomap/octomap-targets.cmake")
  107. -install(TARGETS octomath octomath-static
  108. +install(TARGETS octomath
  109. EXPORT octomap-targets
  110. INCLUDES DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}"
  111. ${INSTALL_TARGETS_DEFAULT_ARGS}