From f87810ce7a6b638603b2b6c5b19361f8fc94da88 Mon Sep 17 00:00:00 2001 From: Nicolay Korslund Date: Wed, 21 Jul 2010 13:52:28 +0200 Subject: [PATCH] Moved esmtool to apps/ --- CMakeLists.txt | 5 +++++ .../esm/tests => apps/esmtool}/.gitignore | 0 apps/esmtool/CMakeLists.txt | 21 +++++++++++++++++++ apps/esmtool/Makefile | 5 +++++ .../esm/tests => apps/esmtool}/esmtool.cpp | 4 ++-- .../esm/tests => apps/esmtool}/esmtool.ggo | 0 .../esm/tests => apps/esmtool}/esmtool_cmd.c | 0 .../esm/tests => apps/esmtool}/esmtool_cmd.h | 0 components/esm/tests/Makefile | 10 --------- 9 files changed, 33 insertions(+), 12 deletions(-) rename {components/esm/tests => apps/esmtool}/.gitignore (100%) create mode 100644 apps/esmtool/CMakeLists.txt create mode 100644 apps/esmtool/Makefile rename {components/esm/tests => apps/esmtool}/esmtool.cpp (99%) rename {components/esm/tests => apps/esmtool}/esmtool.ggo (100%) rename {components/esm/tests => apps/esmtool}/esmtool_cmd.c (100%) rename {components/esm/tests => apps/esmtool}/esmtool_cmd.h (100%) delete mode 100644 components/esm/tests/Makefile diff --git a/CMakeLists.txt b/CMakeLists.txt index 6e24ad433a..4efe2ad5b6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -191,6 +191,11 @@ endif (APPLE) # Apps and tools add_subdirectory( apps/openmw ) +option(BUILD_ESMTOOL "build ESM inspector" ON) +if (BUILD_ESMTOOL) + add_subdirectory( apps/esmtool ) +endif() + option(BUILD_CLIENTCONSOLE "build external console for script interpreter" ON) if (BUILD_CLIENTCONSOLE) add_subdirectory( apps/clientconsole ) diff --git a/components/esm/tests/.gitignore b/apps/esmtool/.gitignore similarity index 100% rename from components/esm/tests/.gitignore rename to apps/esmtool/.gitignore diff --git a/apps/esmtool/CMakeLists.txt b/apps/esmtool/CMakeLists.txt new file mode 100644 index 0000000000..a5ff810afa --- /dev/null +++ b/apps/esmtool/CMakeLists.txt @@ -0,0 +1,21 @@ +set(ESMTOOL + esmtool_cmd.c + esmtool_cmd.h + esmtool.cpp +) +source_group(apps\\esmtool FILES ${ESMTOOL}) + +# Main executable +add_executable(esmtool + ${ESMTOOL} + ${MISC} ${MISC_HEADER} +) + +target_link_libraries(esmtool + ${Boost_LIBRARIES} +) + +#if (APPLE) +# find_library(CARBON_FRAMEWORK Carbon) +# target_link_libraries(openmw ${CARBON_FRAMEWORK}) +#endif (APPLE) diff --git a/apps/esmtool/Makefile b/apps/esmtool/Makefile new file mode 100644 index 0000000000..ee92cf4c84 --- /dev/null +++ b/apps/esmtool/Makefile @@ -0,0 +1,5 @@ +esmtool_cmd.c: esmtool.ggo + gengetopt < esmtool.ggo + +clean: + rm esmtool_cmd.c esmtool_cmd.h diff --git a/components/esm/tests/esmtool.cpp b/apps/esmtool/esmtool.cpp similarity index 99% rename from components/esm/tests/esmtool.cpp rename to apps/esmtool/esmtool.cpp index 45db6dff06..32d1f6b134 100644 --- a/components/esm/tests/esmtool.cpp +++ b/apps/esmtool/esmtool.cpp @@ -1,5 +1,5 @@ -#include "../esm_reader.hpp" -#include "../records.hpp" +#include +#include #include "esmtool_cmd.h" diff --git a/components/esm/tests/esmtool.ggo b/apps/esmtool/esmtool.ggo similarity index 100% rename from components/esm/tests/esmtool.ggo rename to apps/esmtool/esmtool.ggo diff --git a/components/esm/tests/esmtool_cmd.c b/apps/esmtool/esmtool_cmd.c similarity index 100% rename from components/esm/tests/esmtool_cmd.c rename to apps/esmtool/esmtool_cmd.c diff --git a/components/esm/tests/esmtool_cmd.h b/apps/esmtool/esmtool_cmd.h similarity index 100% rename from components/esm/tests/esmtool_cmd.h rename to apps/esmtool/esmtool_cmd.h diff --git a/components/esm/tests/Makefile b/components/esm/tests/Makefile deleted file mode 100644 index 91536389cb..0000000000 --- a/components/esm/tests/Makefile +++ /dev/null @@ -1,10 +0,0 @@ -all: esmtool - -esmtool: esmtool.cpp ../esm_reader.hpp ../records.hpp esmtool_cmd.c - g++ esmtool.cpp ../../tools/stringops.cpp esmtool_cmd.c -o $@ - -esmtool_cmd.c: esmtool.ggo - gengetopt < esmtool.ggo - -clean: - rm *_test esmtool