diff --git a/dynamicEDT3D/src/CMakeLists.txt b/dynamicEDT3D/src/CMakeLists.txt index 0b9357c..bbef680 100644 --- a/dynamicEDT3D/src/CMakeLists.txt +++ b/dynamicEDT3D/src/CMakeLists.txt @@ -2,35 +2,29 @@ SET( dynamicEDT3D_SRCS dynamicEDT3D.cpp ) -add_library(dynamicedt3d SHARED ${dynamicEDT3D_SRCS}) +add_library(dynamicedt3d ${dynamicEDT3D_SRCS}) set_target_properties(dynamicedt3d PROPERTIES VERSION ${DYNAMICEDT3D_VERSION} SOVERSION ${DYNAMICEDT3D_SOVERSION} ) target_link_libraries(dynamicedt3d ${OCTOMAP_LIBRARIES}) -add_library(dynamicedt3d-static STATIC ${dynamicEDT3D_SRCS}) -target_link_libraries(dynamicedt3d-static ${OCTOMAP_LIBRARIES}) - -SET_TARGET_PROPERTIES(dynamicedt3d-static PROPERTIES OUTPUT_NAME "dynamicedt3d") - if(NOT EXISTS "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/cmake/dynamicEDT3D") file(MAKE_DIRECTORY "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/cmake/dynamicEDT3D") endif() -export(TARGETS dynamicedt3d dynamicedt3d-static +export(TARGETS dynamicedt3d FILE "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/cmake/dynamicEDT3D/dynamicEDT3DTargets.cmake") # directly depend on the octomap library target when building the # complete distribution, so it it recompiled as needed if (CMAKE_PROJECT_NAME STREQUAL "octomap-distribution") - ADD_DEPENDENCIES(dynamicedt3d-static octomap-static) ADD_DEPENDENCIES(dynamicedt3d octomap) endif() -ADD_SUBDIRECTORY(examples) -install(TARGETS dynamicedt3d dynamicedt3d-static + +install(TARGETS dynamicedt3d EXPORT dynamicEDT3DTargets INCLUDES DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}" ${INSTALL_TARGETS_DEFAULT_ARGS} diff --git a/octomap/CMakeLists.txt b/octomap/CMakeLists.txt index 87a78e9..edae7f1 100644 --- a/octomap/CMakeLists.txt +++ b/octomap/CMakeLists.txt @@ -161,7 +161,7 @@ install_pkg_config_file(octomap VERSION ${OCTOMAP_VERSION}) # Documentation -FIND_PACKAGE(Doxygen) + IF(DOXYGEN_FOUND) configure_file(${CMAKE_CURRENT_SOURCE_DIR}/octomap.dox.in ${CMAKE_CURRENT_BINARY_DIR}/octomap.dox @ONLY) ADD_CUSTOM_TARGET(docs ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/octomap.dox diff --git a/octomap/src/CMakeLists.txt b/octomap/src/CMakeLists.txt index 45b384f..837fee8 100644 --- a/octomap/src/CMakeLists.txt +++ b/octomap/src/CMakeLists.txt @@ -11,14 +11,11 @@ SET (octomap_SRCS ) # dynamic and static libs, see CMake FAQ: -ADD_LIBRARY( octomap SHARED ${octomap_SRCS}) +ADD_LIBRARY( octomap ${octomap_SRCS}) set_target_properties( octomap PROPERTIES VERSION ${OCTOMAP_VERSION} SOVERSION ${OCTOMAP_SOVERSION} ) -ADD_LIBRARY( octomap-static STATIC ${octomap_SRCS}) -SET_TARGET_PROPERTIES(octomap-static PROPERTIES OUTPUT_NAME "octomap") -add_dependencies(octomap-static octomath-static) TARGET_LINK_LIBRARIES(octomap octomath) @@ -26,10 +23,10 @@ if(NOT EXISTS "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/cmake/octomap") file(MAKE_DIRECTORY "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/cmake/octomap") endif() -export(TARGETS octomap octomap-static +export(TARGETS octomap APPEND FILE "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/cmake/octomap/octomap-targets.cmake") -ADD_SUBDIRECTORY( testing ) + ADD_EXECUTABLE(graph2tree graph2tree.cpp) TARGET_LINK_LIBRARIES(graph2tree octomap) @@ -67,7 +64,7 @@ TARGET_LINK_LIBRARIES(intersection_example octomap) ADD_EXECUTABLE(octree2pointcloud octree2pointcloud.cpp) TARGET_LINK_LIBRARIES(octree2pointcloud octomap) -install(TARGETS octomap octomap-static +install(TARGETS octomap EXPORT octomap-targets INCLUDES DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}" ${INSTALL_TARGETS_DEFAULT_ARGS} diff --git a/octomap/src/math/CMakeLists.txt b/octomap/src/math/CMakeLists.txt index 3b47ec4..9a26c46 100644 --- a/octomap/src/math/CMakeLists.txt +++ b/octomap/src/math/CMakeLists.txt @@ -5,24 +5,21 @@ SET (octomath_SRCS ) -ADD_LIBRARY( octomath SHARED ${octomath_SRCS}) +ADD_LIBRARY( octomath ${octomath_SRCS}) SET_TARGET_PROPERTIES( octomath PROPERTIES VERSION ${OCTOMAP_VERSION} SOVERSION ${OCTOMAP_SOVERSION} ) -ADD_LIBRARY( octomath-static STATIC ${octomath_SRCS}) -SET_TARGET_PROPERTIES(octomath-static PROPERTIES OUTPUT_NAME "octomath") - if(NOT EXISTS "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/cmake/octomap") file(MAKE_DIRECTORY "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/cmake/octomap") endif() -export(TARGETS octomath octomath-static +export(TARGETS octomath APPEND FILE "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/cmake/octomap/octomap-targets.cmake") -install(TARGETS octomath octomath-static +install(TARGETS octomath EXPORT octomap-targets INCLUDES DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}" ${INSTALL_TARGETS_DEFAULT_ARGS}