Skip to content

Commit

Permalink
Added CMake files for Linux compilation and removed Makefiles build. …
Browse files Browse the repository at this point in the history
…CMake build should also work on Windows and MacOS for those who wish to use it.

git-svn-id: http://recastnavigation.googlecode.com/svn/trunk@293 678f7576-1c49-11de-8b5c-13accb87f508
  • Loading branch information
cameron.hart@gmail.com committed Apr 20, 2011
1 parent 64dd71f commit c9abcec
Show file tree
Hide file tree
Showing 17 changed files with 232 additions and 186 deletions.
27 changes: 27 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
CMAKE_MINIMUM_REQUIRED(VERSION 2.6)

PROJECT(RecastNavigation)
#SET(RECAST_VERSION r129)

IF(NOT CMAKE_BUILD_TYPE)
# SET(CMAKE_BUILD_TYPE "Debug")
SET(CMAKE_BUILD_TYPE "Release")
ENDIF(NOT CMAKE_BUILD_TYPE)

IF(MSVC)
OPTION(USE_MSVC_FAST_FLOATINGPOINT "Use MSVC /fp:fast option" ON)
IF(USE_MSVC_FAST_FLOATINGPOINT)
ADD_DEFINITIONS(/fp:fast)
ENDIF(USE_MSVC_FAST_FLOATINGPOINT)
ENDIF(MSVC)

IF(WIN32)
ADD_DEFINITIONS(/D _CRT_SECURE_NO_WARNINGS)
ENDIF(WIN32)

ADD_SUBDIRECTORY(DebugUtils)
ADD_SUBDIRECTORY(Detour)
ADD_SUBDIRECTORY(DetourCrowd)
ADD_SUBDIRECTORY(DetourTileCache)
ADD_SUBDIRECTORY(Recast)
ADD_SUBDIRECTORY(RecastDemo)
23 changes: 23 additions & 0 deletions DebugUtils/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
CMAKE_MINIMUM_REQUIRED(VERSION 2.6)

SET(debugutils_SRCS
Source/DebugDraw.cpp
Source/DetourDebugDraw.cpp
Source/RecastDebugDraw.cpp
Source/RecastDump.cpp
)

SET(debugutils_HDRS
Include/DebugDraw.h
Include/DetourDebugDraw.h
Include/RecastDebugDraw.h
Include/RecastDump.h
)

INCLUDE_DIRECTORIES(Include
../Detour/Include
../DetourTileCache/Include
../Recast/Include
)

ADD_LIBRARY(DebugUtils ${debugutils_SRCS} ${debugutils_HDRS})
24 changes: 24 additions & 0 deletions Detour/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
CMAKE_MINIMUM_REQUIRED(VERSION 2.6)

SET(detour_SRCS
Source/DetourAlloc.cpp
Source/DetourCommon.cpp
Source/DetourNavMesh.cpp
Source/DetourNavMeshBuilder.cpp
Source/DetourNavMeshQuery.cpp
Source/DetourNode.cpp
)

SET(detour_HDRS
Include/DetourAlloc.h
Include/DetourAssert.h
Include/DetourCommon.h
Include/DetourNavMesh.h
Include/DetourNavMeshBuilder.h
Include/DetourNavMeshQuery.h
Include/DetourNode.h
)

INCLUDE_DIRECTORIES(Include)

ADD_LIBRARY(Detour ${detour_SRCS} ${detour_HDRS})
27 changes: 27 additions & 0 deletions DetourCrowd/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
CMAKE_MINIMUM_REQUIRED(VERSION 2.6)

SET(detourcrowd_SRCS
Source/DetourPathCorridor.cpp
Source/DetourLocalBoundary.cpp
Source/DetourObstacleAvoidance.cpp
Source/DetourPathQueue.cpp
Source/DetourCrowd.cpp
Source/DetourProximityGrid.cpp
)

SET(detourcrowd_HDRS
Include/DetourPathCorridor.h
Include/DetourCrowd.h
Include/DetourObstacleAvoidance.h
Include/DetourLocalBoundary.h
Include/DetourProximityGrid.h
Include/DetourPathQueue.h
)

INCLUDE_DIRECTORIES(Include
../Detour/Include
../DetourTileCache
../Recast/Include
)

ADD_LIBRARY(DetourCrowd ${detourcrowd_SRCS} ${detourcrowd_HDRS})
18 changes: 18 additions & 0 deletions DetourTileCache/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
CMAKE_MINIMUM_REQUIRED(VERSION 2.6)

SET(detourtilecache_SRCS
Source/DetourTileCache.cpp
Source/DetourTileCacheBuilder.cpp
)

SET(detourtilecache_HDRS
Include/DetourTileCache.h
Include/DetourTileCacheBuilder.h
)

INCLUDE_DIRECTORIES(Include
../Detour/Include
../Recast/Include
)

ADD_LIBRARY(DetourTileCache ${detourtilecache_SRCS} ${detourtilecache_HDRS})
2 changes: 1 addition & 1 deletion DetourTileCache/Source/DetourTileCache.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "DetourTileCache.h"
#include "DetourTileCacheBuilder.h"
#include "DetourNavmeshBuilder.h"
#include "DetourNavMeshBuilder.h"
#include "DetourNavMesh.h"
#include "DetourCommon.h"
#include "DetourAlloc.h"
Expand Down
25 changes: 0 additions & 25 deletions Makefile

This file was deleted.

24 changes: 24 additions & 0 deletions Recast/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
CMAKE_MINIMUM_REQUIRED(VERSION 2.6)

SET(recast_SRCS
Source/Recast.cpp
Source/RecastArea.cpp
Source/RecastAlloc.cpp
Source/RecastContour.cpp
Source/RecastFilter.cpp
Source/RecastLayers.cpp
Source/RecastMesh.cpp
Source/RecastMeshDetail.cpp
Source/RecastRasterization.cpp
Source/RecastRegion.cpp
)

SET(recast_HDRS
Include/Recast.h
Include/RecastAlloc.h
Include/RecastAssert.h
)

INCLUDE_DIRECTORIES(Include)

ADD_LIBRARY(Recast ${recast_SRCS} ${recast_HDRS})
7 changes: 0 additions & 7 deletions RecastDemo/Build/GNUMake/Common.mk

This file was deleted.

19 changes: 0 additions & 19 deletions RecastDemo/Build/GNUMake/DebugUtils.mk

This file was deleted.

22 changes: 0 additions & 22 deletions RecastDemo/Build/GNUMake/Detour.mk

This file was deleted.

7 changes: 0 additions & 7 deletions RecastDemo/Build/GNUMake/HelperLibrary.mk

This file was deleted.

10 changes: 0 additions & 10 deletions RecastDemo/Build/GNUMake/Library.mk

This file was deleted.

7 changes: 0 additions & 7 deletions RecastDemo/Build/GNUMake/Program.mk

This file was deleted.

18 changes: 0 additions & 18 deletions RecastDemo/Build/GNUMake/Recast.mk

This file was deleted.

70 changes: 0 additions & 70 deletions RecastDemo/Build/GNUMake/RecastDemo.mk

This file was deleted.

Loading

0 comments on commit c9abcec

Please sign in to comment.