Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sma/rework cmake module #57

Open
wants to merge 4 commits into
base: devel
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
cmake: cleanup trailing whitespaces
  • Loading branch information
tSed committed May 5, 2014
commit 3c55cb2ca9796c26284f54c9fa085284ba37e2db
3 changes: 0 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,3 @@ ENABLE_TESTING() # enable CTest environment of subprojects
ADD_SUBDIRECTORY( octomap )
ADD_SUBDIRECTORY( octovis )
ADD_SUBDIRECTORY( dynamicEDT3D )



6 changes: 3 additions & 3 deletions dynamicEDT3D/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ install(FILES ${dynamicEDT3D_HDRS} DESTINATION include/dynamicEDT3D)
# Export the package for use from the build-tree
# (this registers the build-tree with a global CMake-registry)
export(PACKAGE dynamicEDT3D)

# Create a dynamicEDT3D-config.cmake file for the use from the build tree
set(DYNAMICEDT3D_INCLUDE_DIRS "${INCLUDE_DIRS}")
set(DYNAMICEDT3D_LIB_DIR "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}")
Expand All @@ -81,7 +81,7 @@ configure_file(dynamicEDT3D-config-version.cmake.in
#install(EXPORT FooBarLibraryDepends DESTINATION
# "${INSTALL_DATA_DIR}/FooBar/CMake"
# COMPONENT dev)

# Create a dynamicEDT3D-config.cmake file for the use from the install tree
# and install it
set(DYNAMICEDT3D_INCLUDE_DIRS "${CMAKE_INSTALL_PREFIX}/include")
Expand Down Expand Up @@ -110,7 +110,7 @@ install_pkg_config_file(dynamicEDT3D
VERSION ${DYNAMICEDT3D_MAJOR_VERSION}.${DYNAMICEDT3D_MINOR_VERSION}.${DYNAMICEDT3D_PATCH_VERSION})


# Documentation
# Documentation
FIND_PACKAGE(Doxygen)
IF(DOXYGEN_FOUND)
ADD_CUSTOM_TARGET(docs_dynamicEDT3D ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/dynamicEDT3D.dox
Expand Down
8 changes: 4 additions & 4 deletions octomap/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ add_custom_target(uninstall
# Export the package for use from the build-tree
# (this registers the build-tree with a global CMake-registry)
export(PACKAGE octomap)

# Create a octomap-config.cmake file for the use from the build tree
set(OCTOMAP_INCLUDE_DIRS "${INCLUDE_DIRS}")
set(OCTOMAP_LIB_DIR "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}")
Expand All @@ -88,7 +88,7 @@ configure_file(octomap-config-version.cmake.in
#install(EXPORT FooBarLibraryDepends DESTINATION
# "${INSTALL_DATA_DIR}/FooBar/CMake"
# COMPONENT dev)

# Create a octomap-config.cmake file for the use from the install tree
# and install it
set(OCTOMAP_INCLUDE_DIRS "${CMAKE_INSTALL_PREFIX}/include")
Expand All @@ -104,7 +104,7 @@ ELSE()
set(OCTOMAP_MODULE_FILE "${PROJECT_BINARY_DIR}/InstallFiles/octomap-config.cmake" )
ENDIF()
install(FILES
"${PROJECT_BINARY_DIR}/InstallFiles/octomap-config-version.cmake"
"${PROJECT_BINARY_DIR}/InstallFiles/octomap-config-version.cmake"
"${OCTOMAP_MODULE_FILE}"
DESTINATION share/octomap/)

Expand All @@ -116,7 +116,7 @@ install_pkg_config_file(octomap
REQUIRES
VERSION ${OCTOMAP_VERSION})

# Documentation
# Documentation
FIND_PACKAGE(Doxygen)
IF(DOXYGEN_FOUND)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/octomap.dox.in ${CMAKE_CURRENT_BINARY_DIR}/octomap.dox @ONLY)
Expand Down
24 changes: 12 additions & 12 deletions octovis/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -47,15 +47,15 @@ set(INSTALL_TARGETS_DEFAULT_ARGS
ARCHIVE DESTINATION lib
)

# Builds the "octovis" viewer based on OpenGL and
# Builds the "octovis" viewer based on OpenGL and
# libQGLViewer, if dependencies available
SET( BUILD_VIEWER 0)

# Look for required libraries:
FIND_PACKAGE(OpenGL)
FIND_PACKAGE(Qt4)
IF (OpenGL-NOTFOUND OR Qt4-NOTFOUND)
MESSAGE ( "OpenGL and QT4 are required for octovis but could not be found.")
IF (OpenGL-NOTFOUND OR Qt4-NOTFOUND)
MESSAGE ( "OpenGL and QT4 are required for octovis but could not be found.")
ELSE()
FIND_PACKAGE(QGLViewer)
IF(QGLViewer_FOUND)
Expand All @@ -70,12 +70,12 @@ ENDIF()
IF(BUILD_VIEWER)
MESSAGE(STATUS "\n")
MESSAGE(STATUS "viewer octovis will be built")

set(INCLUDE_DIRS "${PROJECT_SOURCE_DIR}/include")
INCLUDE_DIRECTORIES(${INCLUDE_DIRS})

INCLUDE( CMakeLists_src.txt )

# Create an octovis-config.cmake file for the use from the build tree
set(OCTOVIS_INCLUDE_DIR "${INCLUDE_DIRS}")
set(OCTOVIS_LIB_DIR "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}")
Expand All @@ -84,8 +84,8 @@ IF(BUILD_VIEWER)
configure_file(octovis-config.cmake.in
"${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/cmake/octovis/octovis-config.cmake" @ONLY)
configure_file(octovis-config-version.cmake.in
"${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/cmake/octovis/octovis-config-version.cmake" @ONLY)
"${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/cmake/octovis/octovis-config-version.cmake" @ONLY)

# Create a octovis-config.cmake file for the use from the install tree
# and install it
set(OCTOVIS_INCLUDE_DIRS "${CMAKE_INSTALL_PREFIX}/include")
Expand All @@ -101,19 +101,19 @@ IF(BUILD_VIEWER)
set(OCTOVIS_MODULE_FILE "${PROJECT_BINARY_DIR}/InstallFiles/octovis-config.cmake" )
ENDIF()
install(FILES
"${PROJECT_BINARY_DIR}/InstallFiles/octovis-config-version.cmake"
"${PROJECT_BINARY_DIR}/InstallFiles/octovis-config-version.cmake"
"${OCTOVIS_MODULE_FILE}"
DESTINATION share/octovis/)


# #installation:
# # store all header files to install:
file(GLOB octovis_HDRS *.h *.hxx *.hpp)
install(FILES ${octovis_HDRS} DESTINATION include/octovis)

# Install catkin package.xml
install(FILES package.xml DESTINATION share/octovis)

ELSE()
MESSAGE ( "Unfortunately, the viewer (octovis) can not be built because some requirements are missing.")
MESSAGE ( "This will not affect the compilation of the stand-alone library and tools (octomap)")
Expand Down