From f06afb429ccddad1be6878d1b9d6ffebb245909b Mon Sep 17 00:00:00 2001 From: Jack Andersen Date: Mon, 3 Aug 2015 17:42:44 -1000 Subject: [PATCH] Windows build fixes --- CMakeLists.txt | 3 +++ atdna/CMakeLists.txt | 3 --- include/Athena/DNAYaml.hpp | 8 ++++++++ 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index fba3192..e98dd80 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -148,6 +148,9 @@ add_library(AthenaZelda include/Athena/SkywardSwordQuest.hpp ) +# Icon +set(ATHENA_ICO ${CMAKE_CURRENT_SOURCE_DIR}/Athena.ico) + # Offer the user the choice of overriding the installation directories set(INSTALL_LIB_DIR lib CACHE PATH "Installation directory for libraries") set(INSTALL_INCLUDE_DIR include CACHE PATH "Installation directory for header files") diff --git a/atdna/CMakeLists.txt b/atdna/CMakeLists.txt index fb9e5b2..a289feb 100644 --- a/atdna/CMakeLists.txt +++ b/atdna/CMakeLists.txt @@ -49,9 +49,6 @@ foreach(p BIN INCLUDE CMAKE) endif() endforeach() -# Icon -set(ATHENA_ICO ${CMAKE_CURRENT_SOURCE_DIR}/Athena.ico) - # Windows resource if(WIN32) configure_file(main.rc.in main.rc @ONLY) diff --git a/include/Athena/DNAYaml.hpp b/include/Athena/DNAYaml.hpp index 621ebec..2bec2d2 100644 --- a/include/Athena/DNAYaml.hpp +++ b/include/Athena/DNAYaml.hpp @@ -177,7 +177,11 @@ inline std::unique_ptr ValToNode(const atUint32& val) template <> inline atInt64 NodeToVal(const YAMLNode* node) { +#if _WIN32 + return _strtoi64(node->m_scalarString.c_str(), NULL, 0); +#else return strtoq(node->m_scalarString.c_str(), NULL, 0); +#endif } template <> @@ -193,7 +197,11 @@ inline std::unique_ptr ValToNode(const atInt64& val) template <> inline atUint64 NodeToVal(const YAMLNode* node) { +#if _WIN32 + return _strtoui64(node->m_scalarString.c_str(), NULL, 0); +#else return strtouq(node->m_scalarString.c_str(), NULL, 0); +#endif } template <>