Skip to content

Instantly share code, notes, and snippets.

@SkirnirMaNGOS
Created February 18, 2011 16:17
Show Gist options
  • Save SkirnirMaNGOS/833897 to your computer and use it in GitHub Desktop.
Save SkirnirMaNGOS/833897 to your computer and use it in GitHub Desktop.
cmake files for mmaps
diff --git a/dep/CMakeLists.txt b/dep/CMakeLists.txt
index c4e9cc1..c29e4f9 100644
--- a/dep/CMakeLists.txt
+++ b/dep/CMakeLists.txt
@@ -24,4 +24,5 @@ if(NOT ACE_USE_EXTERNAL)
add_subdirectory(ACE_wrappers)
endif()
+add_subdirectory(recastnavigation)
add_subdirectory(src)
diff --git a/dep/recastnavigation/CMakeLists.txt b/dep/recastnavigation/CMakeLists.txt
new file mode 100644
index 0000000..d97b7b0
--- /dev/null
+++ b/dep/recastnavigation/CMakeLists.txt
@@ -0,0 +1,19 @@
+#
+# Copyright (C) 2005-2011 MaNGOS project <http://getmangos.com/>
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+#
+add_subdirectory(Detour)
+#add_subdirectory(Recast)
diff --git a/dep/recastnavigation/Detour/CMakeLists.txt b/dep/recastnavigation/Detour/CMakeLists.txt
new file mode 100644
index 0000000..eec47ef
--- /dev/null
+++ b/dep/recastnavigation/Detour/CMakeLists.txt
@@ -0,0 +1,18 @@
+#
+# Copyright (C) 2005-2011 MaNGOS project <http://getmangos.com/>
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+#
+add_subdirectory(Source)
diff --git a/dep/recastnavigation/Detour/Source/CMakeLists.txt b/dep/recastnavigation/Detour/Source/CMakeLists.txt
new file mode 100644
index 0000000..f30da69
--- /dev/null
+++ b/dep/recastnavigation/Detour/Source/CMakeLists.txt
@@ -0,0 +1,37 @@
+#
+# Copyright (C) 2005-2011 MaNGOS project <http://getmangos.com/>
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+#
+set(detour_SRCS
+ DetourAlloc.cpp
+ DetourCommon.cpp
+ DetourNavMeshBuilder.cpp
+ DetourNavMesh.cpp
+ DetourNavMeshQuery.cpp
+ DetourNode.cpp
+ DetourObstacleAvoidance.cpp
+)
+
+include_directories(
+ ${CMAKE_CURRENT_SOURCE_DIR}
+ ${CMAKE_SOURCE_DIR}/dep/recastnavigation
+ ${CMAKE_SOURCE_DIR}/dep/recastnavigation/Detour
+ ${CMAKE_SOURCE_DIR}/dep/recastnavigation/Detour/Include
+)
+
+add_library(detour STATIC
+ ${detour_SRCS}
+)
diff --git a/src/game/CMakeLists.txt b/src/game/CMakeLists.txt
index b583e92..6b8216d 100644
--- a/src/game/CMakeLists.txt
+++ b/src/game/CMakeLists.txt
@@ -22,6 +22,8 @@ include_directories(
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_SOURCE_DIR}/vmap
${CMAKE_SOURCE_DIR}/dep/include/g3dlite
+ ${CMAKE_SOURCE_DIR}/dep/recastnavigation/Detour
+ ${CMAKE_SOURCE_DIR}/dep/recastnavigation/
${CMAKE_SOURCE_DIR}/dep/include
${CMAKE_SOURCE_DIR}/src/shared
${CMAKE_SOURCE_DIR}/src/framework
@@ -41,7 +43,7 @@ source_group("World/Handlers"
)
source_group("Motion generators"
- REGULAR_EXPRESSION Movement|Holder|Motion|Traveller
+ REGULAR_EXPRESSION MoveMap|MoveMapSharedDefines|Movement|Holder|Motion|Traveller
)
source_group("Server"
@@ -74,6 +76,7 @@ add_library(game STATIC
target_link_libraries(game
shared
+ detour
)
if(UNIX)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment