summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPetr Mrázek2010-08-16 00:45:02 +0200
committerPetr Mrázek2010-08-16 00:45:02 +0200
commit3b29fddf7bb4851f77a707f32effa77cb3b1a466 (patch)
treecb1a41d4c80a56d480f50a528727c03b3d810c3b
parent891c4542561113751d2997e63de7abab84e731aa (diff)
downloaddfhack-3b29fddf7bb4851f77a707f32effa77cb3b1a466.tar.gz
dfhack-3b29fddf7bb4851f77a707f32effa77cb3b1a466.tar.bz2
dfhack-3b29fddf7bb4851f77a707f32effa77cb3b1a466.tar.xz
unify build system, start on the new offset file format
-rw-r--r--CMakeLists.txt26
-rw-r--r--build/build-MinGW32-release-trace.bat10
-rw-r--r--build/generate-MSVC-2010.bat6
-rw-r--r--doc/CMakeLists.txt6
-rw-r--r--library/CMakeLists.txt6
-rw-r--r--library/DFMemInfoManager.cpp4
-rw-r--r--tools/examples/CMakeLists.txt6
-rw-r--r--tools/playground/CMakeLists.txt6
8 files changed, 39 insertions, 31 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index a03f7d6c..4105db70 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -26,6 +26,8 @@ OPTION(BUILD_DFHACK_EXAMPLES "Build example tools" OFF)
OPTION(BUILD_DFHACK_PLAYGROUND "Build tools from the playground folder" OFF)
OPTION(BUILD_DFHACK_C_BINDIGS "Build the C portion of the library" ON)
OPTION(BUILD_OFFSET_EDITOR "Build the Offset GUI editor (not ready for use)." OFF)
+OPTION(BUILD_DFHACK_SUPPORTED "Build the supported toold." ON)
+OPTION(BUILD_DFHACK_SHM "Build the SHM." OFF)
include_directories (${CMAKE_SOURCE_DIR}/library/include/)
include_directories (${CMAKE_SOURCE_DIR}/library/shm/)
@@ -35,12 +37,26 @@ include_directories (${CMAKE_SOURCE_DIR}/library/depends/argstream/)
add_subdirectory (library)
+IF(BUILD_DFHACK_SUPPORTED)
+ add_subdirectory (tools/supported)
+ENDIF(BUILD_DFHACK_SUPPORTED)
+
IF(BUILD_OFFSET_EDITOR)
add_subdirectory (offsetedit)
ENDIF(BUILD_OFFSET_EDITOR)
-add_subdirectory (library/shm)
-add_subdirectory (tools/examples)
-add_subdirectory (tools/playground)
-add_subdirectory (tools/supported)
-add_subdirectory (doc) \ No newline at end of file
+IF(BUILD_DFHACK_SHM)
+ add_subdirectory (library/shm)
+ENDIF(BUILD_DFHACK_SHM)
+
+IF(BUILD_DFHACK_EXAMPLES)
+ add_subdirectory (tools/examples)
+ENDIF(BUILD_DFHACK_EXAMPLES)
+
+IF(BUILD_DFHACK_PLAYGROUND)
+ add_subdirectory (tools/playground)
+ENDIF(BUILD_DFHACK_PLAYGROUND)
+
+IF(BUILD_DFHACK_DOCUMENTATION)
+ add_subdirectory (doc)
+ENDIF(BUILD_DFHACK_DOCUMENTATION) \ No newline at end of file
diff --git a/build/build-MinGW32-release-trace.bat b/build/build-MinGW32-release-trace.bat
index f75da5ff..ca7df86d 100644
--- a/build/build-MinGW32-release-trace.bat
+++ b/build/build-MinGW32-release-trace.bat
@@ -1,6 +1,6 @@
-mkdir build-real
-cd build-real
-cmake ..\.. -G"MinGW Makefiles" -DCMAKE_BUILD_TYPE:string=Release --trace > trace-stdout.txt 2> trace-stderr.txt
-mingw32-make 2> log.txt
-pause
+mkdir build-real
+cd build-real
+cmake ..\.. -G"MinGW Makefiles" -DCMAKE_BUILD_TYPE:string=Release --trace > trace-stdout.txt 2> trace-stderr.txt
+mingw32-make 2> log.txt
+pause
dir file.xxx \ No newline at end of file
diff --git a/build/generate-MSVC-2010.bat b/build/generate-MSVC-2010.bat
index 588051bc..50828f7e 100644
--- a/build/generate-MSVC-2010.bat
+++ b/build/generate-MSVC-2010.bat
@@ -1,4 +1,4 @@
-mkdir build-real
-cd build-real
-cmake ..\.. -G"Visual Studio 10"
+mkdir build-real
+cd build-real
+cmake ..\.. -G"Visual Studio 10"
pause \ No newline at end of file
diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt
index 1ced1fd7..c1f2cdac 100644
--- a/doc/CMakeLists.txt
+++ b/doc/CMakeLists.txt
@@ -10,8 +10,6 @@
# http://tobias.rautenkranz.ch/cmake/doxygen/
# but it is hard to understand...
-IF (BUILD_DFHACK_DOCUMENTATION)
-
FIND_PACKAGE(Doxygen)
IF(DOXYGEN_FOUND)
@@ -63,6 +61,4 @@ IF(DOXYGEN_FOUND)
ELSE(DOXYGEN_FOUND)
MESSAGE (FATAL_ERROR "doxygen binary couldn't be found")
-ENDIF(DOXYGEN_FOUND)
-
-ENDIF (BUILD_DFHACK_DOCUMENTATION) \ No newline at end of file
+ENDIF(DOXYGEN_FOUND) \ No newline at end of file
diff --git a/library/CMakeLists.txt b/library/CMakeLists.txt
index 8e09a220..79e9f109 100644
--- a/library/CMakeLists.txt
+++ b/library/CMakeLists.txt
@@ -192,11 +192,15 @@ if(MSVC)
ADD_CUSTOM_COMMAND(TARGET dfhack POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_SOURCE_DIR}/Readme.html $(TargetDir)/Readme.html
)
+ ADD_CUSTOM_COMMAND(TARGET dfhack POST_BUILD
+ COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_SOURCE_DIR}/LICENSE $(TargetDir)/LICENSE.txt
+ )
else(MSVC)
# Just put the file in the output directory on Linux and Mac
- configure_file(${CMAKE_SOURCE_DIR}/data/Memory.xml ${DATA_OUTPUT_PATH}/Memory.xml COPYONLY)
+ configure_file(${CMAKE_SOURCE_DIR}/data/Memory-ng.xml ${DATA_OUTPUT_PATH}/Memory.xml COPYONLY)
configure_file(${CMAKE_SOURCE_DIR}/Compile.html ${DATA_OUTPUT_PATH}/Compile.html COPYONLY)
configure_file(${CMAKE_SOURCE_DIR}/Readme.html ${DATA_OUTPUT_PATH}/Readme.html COPYONLY)
+ configure_file(${CMAKE_SOURCE_DIR}/LICENSE ${DATA_OUTPUT_PATH}/LICENSE.txt COPYONLY)
endif(MSVC)
IF(UNIX)
diff --git a/library/DFMemInfoManager.cpp b/library/DFMemInfoManager.cpp
index cc4c5de4..216061c2 100644
--- a/library/DFMemInfoManager.cpp
+++ b/library/DFMemInfoManager.cpp
@@ -254,10 +254,10 @@ bool MemInfoManager::loadFile(string path_to_xml)
throw Error::MemoryXmlNoRoot();
}
string m_name=pElem->Value();
- if(m_name != "DFExtractor")
+ if(m_name != "DFHack")
{
error = true;
- throw Error::MemoryXmlNoDFExtractor(m_name.c_str());
+ throw Error::MemoryXmlNoRoot();
}
// save this for later
hRoot=TiXmlHandle(pElem);
diff --git a/tools/examples/CMakeLists.txt b/tools/examples/CMakeLists.txt
index 05d03e3d..251efe49 100644
--- a/tools/examples/CMakeLists.txt
+++ b/tools/examples/CMakeLists.txt
@@ -1,8 +1,5 @@
# don't use this file directly. use the one in the root folder of the project
-# only build this stuff when BUILD_DFHACK_EXAMPLES is set to ON
-IF (BUILD_DFHACK_EXAMPLES)
-
# this is required to ensure we use the right configuration for the system.
IF(UNIX)
add_definitions(-DLINUX_BUILD)
@@ -61,5 +58,4 @@ dftreedump
dfspatterdump
dfprocessenum
RUNTIME DESTINATION bin
-)
-ENDIF (BUILD_DFHACK_EXAMPLES) \ No newline at end of file
+) \ No newline at end of file
diff --git a/tools/playground/CMakeLists.txt b/tools/playground/CMakeLists.txt
index a2859747..26417e23 100644
--- a/tools/playground/CMakeLists.txt
+++ b/tools/playground/CMakeLists.txt
@@ -1,8 +1,5 @@
# don't use this file directly. use the one in the root folder of the project
-# only build this stuff when BUILD_DFHACK_PLAYGROUND is set to ON
-IF (BUILD_DFHACK_PLAYGROUND)
-
# this is required to ensure we use the right configuration for the system.
IF(UNIX)
add_definitions(-DLINUX_BUILD)
@@ -79,5 +76,4 @@ IF(UNIX)
dfincremental
RUNTIME DESTINATION bin
)
-ENDIF(UNIX)
-ENDIF (BUILD_DFHACK_PLAYGROUND) \ No newline at end of file
+ENDIF(UNIX) \ No newline at end of file