Skip to content

Commit

Permalink
switching to a ROS-like directory structure.
Browse files Browse the repository at this point in the history
please use something like:
#include <octomap/octomap.h>

instead of:
#include "octomap.h"
  • Loading branch information
Kai Wurm committed Jan 20, 2011
1 parent e3cc881 commit fdb4e94
Show file tree
Hide file tree
Showing 44 changed files with 56 additions and 52 deletions.
27 changes: 16 additions & 11 deletions src/CMakeLists.txt → CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ PROJECT( octomap )

# version (e.g. for packaging)
set(V_MAJOR 0)
set(V_MINOR 8)
set(V_MINOR 9)
set(V_PATCH 0)

# get rid of a useless warning:
Expand All @@ -25,7 +25,7 @@ SET (CMAKE_CXX_FLAGS_RELEASE "-O3 -funroll-loops -DNDEBUG -O3 -msse3 -mssse3")
SET (CMAKE_CXX_FLAGS_DEBUG "-O0 -g")

# Set output directories for libraries and executables
SET( BASE_DIR ${CMAKE_SOURCE_DIR}/.. )
SET( BASE_DIR ${CMAKE_SOURCE_DIR} )
SET( CMAKE_LIBRARY_OUTPUT_DIRECTORY ${BASE_DIR}/lib )
SET( CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${BASE_DIR}/lib )
SET( CMAKE_RUNTIME_OUTPUT_DIRECTORY ${BASE_DIR}/bin )
Expand All @@ -36,9 +36,9 @@ MESSAGE ("\n")
MESSAGE (STATUS "Building as ${CMAKE_BUILD_TYPE}")
MESSAGE ("\n")

# Main include dir is the "src" dir
INCLUDE_DIRECTORIES(
${CMAKE_SOURCE_DIR}
${CMAKE_SOURCE_DIR}/include
${CMAKE_SOURCE_DIR}/src # for hxx files
)


Expand All @@ -55,14 +55,19 @@ set(INSTALL_TARGETS_DEFAULT_ARGS
ARCHIVE DESTINATION lib
)

ADD_SUBDIRECTORY( octomath )
ADD_SUBDIRECTORY( octomap )
ADD_SUBDIRECTORY( src/octomap/math )
ADD_SUBDIRECTORY( src/octomap )

# installation for external targets:
install(PROGRAMS "extern/binvox/binvox" DESTINATION bin)
install(PROGRAMS "extern/binvox/binvox64" DESTINATION bin)
install(PROGRAMS "extern/binvox/viewvox" DESTINATION bin)
install(PROGRAMS "extern/binvox/viewvox64" DESTINATION bin)
install(PROGRAMS "src/extern/binvox/binvox" DESTINATION bin)
install(PROGRAMS "src/extern/binvox/binvox64" DESTINATION bin)
install(PROGRAMS "src/extern/binvox/viewvox" DESTINATION bin)
install(PROGRAMS "src/extern/binvox/viewvox64" DESTINATION bin)

file(GLOB octomap_HDRS ${CMAKE_SOURCE_DIR}/include/octomap/*.h)
install(FILES ${octomap_HDRS} DESTINATION include/octomap)
file(GLOB octomap_math_HDRS ${CMAKE_SOURCE_DIR}/include/octomap/math/*.h)
install(FILES ${octomap_math_HDRS} DESTINATION include/octomap/math)


# Documentation
Expand Down Expand Up @@ -102,7 +107,7 @@ ENDIF()
IF(BUILD_VIEWER)
MESSAGE(STATUS "\n")
MESSAGE(STATUS "viewer octovis will be build")
ADD_SUBDIRECTORY( octovis )
ADD_SUBDIRECTORY( src/octovis )
ELSE()
MESSAGE ( "Unfortunately, the viewer (octovis) can not be build.")
MESSAGE ( "See README.txt or http://octomap.sf.net for further information.\n")
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion src/octomap/OcTreeBase.h → include/octomap/OcTreeBase.h
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,6 @@ namespace octomap {

}

#include "OcTreeBase.hxx"
#include <octomap/OcTreeBase.hxx>

#endif
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,6 @@ namespace octomap {

} // end namespace

#include "OcTreeDataNode.hxx"
#include "octomap/OcTreeDataNode.hxx"

#endif
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,6 @@ namespace octomap {
};
}

#include "OcTreeFileIO.hxx"
#include "octomap/OcTreeFileIO.hxx"

#endif
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,6 @@ namespace octomap {

}

#include "OccupancyOcTreeBase.hxx"
#include "octomap/OccupancyOcTreeBase.hxx"

#endif
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@
#include <list>


#include <octomath/Vector3.h>
#include <octomath/Pose6D.h>
#include <octomap/math/Vector3.h>
#include <octomap/math/Pose6D.h>

namespace octomap {

Expand Down
5 changes: 2 additions & 3 deletions src/octomap/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,8 @@ TARGET_LINK_LIBRARIES(test_raycasting octomap)

# installation:
# store all header files to install:
file(GLOB octomap_HDRS *.h *.hxx *.hpp)

install(FILES ${octomap_HDRS} DESTINATION include/octomap)
file(GLOB octomap_impl_HDRS *.h *.hxx *.hpp)
install(FILES ${octomap_impl_HDRS} DESTINATION include/octomap)

install(TARGETS octomap
graph2tree
Expand Down
2 changes: 1 addition & 1 deletion src/octomap/CountingOcTree.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
*/

#include <cassert>
#include "CountingOcTree.h"
#include <octomap/CountingOcTree.h>

namespace octomap {

Expand Down
4 changes: 2 additions & 2 deletions src/octomap/OcTree.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@
#include <fstream>
#include <stdlib.h>

#include "OcTree.h"
#include "CountingOcTree.h"
#include <octomap/OcTree.h>
#include <octomap/CountingOcTree.h>


namespace octomap {
Expand Down
2 changes: 1 addition & 1 deletion src/octomap/OcTreeLUT.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@

#include <list>
#include <queue>
#include "OcTreeLUT.h"
#include <octomap/OcTreeLUT.h>

namespace octomap {

Expand Down
4 changes: 2 additions & 2 deletions src/octomap/OcTreeLabeled.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@

#include <fstream>

#include "OcTree.h"
#include "OcTreeLabeled.h"
#include <octomap/OcTree.h>
#include <octomap/OcTreeLabeled.h>


namespace octomap {
Expand Down
2 changes: 1 addition & 1 deletion src/octomap/OcTreeNode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
#include <fstream>
#include <stdlib.h>

#include "OcTreeNode.h"
#include <octomap/OcTreeNode.h>

namespace octomap {

Expand Down
2 changes: 1 addition & 1 deletion src/octomap/OcTreeNodeLabeled.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
#include <cassert>
#include <fstream> // REMOVE

#include "OcTreeNodeLabeled.h"
#include <octomap/OcTreeNodeLabeled.h>

namespace octomap {

Expand Down
2 changes: 1 addition & 1 deletion src/octomap/OccupancyOcTreeBase.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*/

#include "CountingOcTree.h"
#include <octomap/CountingOcTree.h>


namespace octomap {
Expand Down
2 changes: 1 addition & 1 deletion src/octomap/Pointcloud.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*/

#include "Pointcloud.h"
#include <octomap/Pointcloud.h>
#include <ext/algorithm>
#include <list>
#include <fstream>
Expand Down
4 changes: 2 additions & 2 deletions src/octomap/ScanGraph.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@
#include <sstream>
#include <stdlib.h>

#include <octomath/Pose6D.h>
#include "ScanGraph.h"
#include <octomap/math/Pose6D.h>
#include <octomap/ScanGraph.h>

namespace octomap {

Expand Down
2 changes: 1 addition & 1 deletion src/octomap/bt2vrml.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*/

#include "octomap.h"
#include <octomap/octomap.h>
#include <fstream>
#include <iostream>
#include <string.h>
Expand Down
4 changes: 2 additions & 2 deletions src/octomap/graph2tree.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@
* POSSIBILITY OF SUCH DAMAGE.
*/

#include "octomap.h"
#include "OcTreeFileIO.h"
#include <octomap/octomap.h>
#include <octomap/OcTreeFileIO.h>
#include <string.h>
#include <stdlib.h>
#include <sys/time.h>
Expand Down
4 changes: 2 additions & 2 deletions src/octomap/labeled_demo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@
* POSSIBILITY OF SUCH DAMAGE.
*/

#include "octomap.h"
#include "OcTreeLabeled.h"
#include <octomap/octomap.h>
#include <octomap/OcTreeLabeled.h>

using namespace std;
using namespace octomap;
Expand Down
2 changes: 1 addition & 1 deletion src/octomap/log2graph.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*/

#include "octomap.h"
#include <octomap/octomap.h>
#include <string.h>
#include <stdlib.h>

Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion src/octomath/Pose6D.cpp → src/octomap/math/Pose6D.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*/

#include "Pose6D.h"
#include <octomap/math/Pose6D.h>
#include <math.h>

namespace octomath {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,12 @@
* POSSIBILITY OF SUCH DAMAGE.
*/

#include "Quaternion.h"
#include "Vector3.h"
#include <octomap/math/Vector3.h>
#include <octomap/math/Quaternion.h>
#include <octomap/math/Utils.h>

#include <cassert>
#include <math.h>
#include "Utils.h"


// used from Vector: norm2, unit, *
Expand Down
2 changes: 1 addition & 1 deletion src/octomath/Vector3.cpp → src/octomap/math/Vector3.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*/

#include "Vector3.h"
#include <octomap/math/Vector3.h>
#include <cassert>
#include <math.h>
#include <string.h>
Expand Down
4 changes: 2 additions & 2 deletions src/octomap/simple.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@
* POSSIBILITY OF SUCH DAMAGE.
*/

#include "octomap.h"
#include "OcTreeLabeled.h"
#include <octomap/octomap.h>
#include <octomap/OcTreeLabeled.h>

using namespace std;
using namespace octomap;
Expand Down
4 changes: 2 additions & 2 deletions src/octomap/test_raycasting.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

#include <stdio.h>
#include "octomap.h"
#include <octomath/Utils.h>
#include <octomap/octomap.h>
#include <octomap/math/Utils.h>

using namespace std;
using namespace octomap;
Expand Down
10 changes: 5 additions & 5 deletions src/octovis/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -79,13 +79,13 @@ target_link_libraries(octovis
)


#installation:
# store all header files to install:
file(GLOB octovis_HDRS *.h *.hxx *.hpp)
# #installation:
# # store all header files to install:
# file(GLOB octovis_HDRS *.h *.hxx *.hpp)

install(FILES ${octovis_HDRS} DESTINATION include/octovis)
# install(FILES ${octovis_HDRS} DESTINATION include/octovis)

install(TARGETS octovis
octovis_library
# octovis_library
${INSTALL_TARGETS_DEFAULT_ARGS}
)

0 comments on commit fdb4e94

Please sign in to comment.