forked from OctoMap/octomap
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added CMake package / module config for external projects
- Loading branch information
Armin Hornung
committed
Jul 25, 2011
1 parent
52f22cd
commit 7684acb
Showing
5 changed files
with
101 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# Builds the "octovis" viewer based on OpenGL and libQGLViewer, if dependencies available | ||
SET( BUILD_VIEWER 0) | ||
|
||
FIND_PACKAGE(OpenGL) | ||
IF(NOT OPENGL_FOUND) | ||
MESSAGE ( "\n") | ||
MESSAGE ( "OpenGL not found. \n") | ||
ELSE() | ||
MESSAGE (STATUS "OpenGL found at ${OPENGL_LIBRARY}") | ||
|
||
# Look for Qt4 | ||
FIND_PACKAGE(Qt4) | ||
IF(QT4_FOUND) | ||
FIND_PACKAGE(QGLViewer) | ||
IF(QGLViewer_FOUND) | ||
SET( BUILD_VIEWER 1) | ||
ELSE() | ||
MESSAGE ( "\n") | ||
MESSAGE ( "libQGLViewer could not be found or generated.") | ||
ENDIF() | ||
ELSE() | ||
MESSAGE ( "\n") | ||
MESSAGE ( "Qt4 development environment could not be found.") | ||
ENDIF() | ||
ENDIF() | ||
|
||
IF(BUILD_VIEWER) | ||
MESSAGE(STATUS "\n") | ||
MESSAGE(STATUS "viewer octovis will be built") | ||
ADD_SUBDIRECTORY( src/octovis ) | ||
ELSE() | ||
MESSAGE ( "Unfortunately, the viewer (octovis) can not be built because some requirements are missing.") | ||
MESSAGE ( "See README.txt or http://octomap.sf.net for further information.\n") | ||
ENDIF() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
set(PACKAGE_VERSION "@OCTOMAP_VERSION@") | ||
|
||
# Check whether the requested PACKAGE_FIND_VERSION is compatible | ||
if("${PACKAGE_VERSION}" VERSION_LESS "${PACKAGE_FIND_VERSION}") | ||
set(PACKAGE_VERSION_COMPATIBLE FALSE) | ||
else() | ||
set(PACKAGE_VERSION_COMPATIBLE TRUE) | ||
if ("${PACKAGE_VERSION}" VERSION_EQUAL "${PACKAGE_FIND_VERSION}") | ||
set(PACKAGE_VERSION_EXACT TRUE) | ||
endif() | ||
endif() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# - Config file for the OctoMap package | ||
# (example from http://www.vtk.org/Wiki/CMake/Tutorials/How_to_create_a_ProjectConfig.cmake_file) | ||
# It defines the following variables | ||
# OCTOMAP_INCLUDE_DIRS - include directories for OctoMap | ||
# OCTOMAP_LIBRARY_DIRS - library directories for OctoMap (normally not used!) | ||
# OCTOMAP_LIBRARIES - libraries to link against | ||
|
||
# Tell the user project where to find our headers and libraries | ||
set(OCTOMAP_INCLUDE_DIRS "@OCTOMAP_INCLUDE_DIRS@") | ||
set(OCTOMAP_LIBRARY_DIRS "@OCTOMAP_LIB_DIR@") | ||
|
||
# Our library dependencies (contains definitions for IMPORTED targets) | ||
# include("@FOOBAR_CMAKE_DIR@/FooBarLibraryDepends.cmake") | ||
|
||
set(OCTOMAP_LIBRARIES octomap octomath) | ||
|
||
#set(FOOBAR_EXECUTABLE bar) |