diff --git a/CMakeLists.txt b/CMakeLists.txt index 6e24ad433..4efe2ad5b 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 000000000..a5ff810af --- /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 000000000..ee92cf4c8 --- /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 45db6dff0..32d1f6b13 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 91536389c..000000000 --- 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