mirror of https://github.com/AxioDL/nod.git
MSVC fixes
This commit is contained in:
parent
edb8468575
commit
48e3298797
|
@ -1,13 +1,16 @@
|
||||||
cmake_minimum_required(VERSION 3.0)
|
cmake_minimum_required(VERSION 3.0)
|
||||||
project(NODLib)
|
project(NODLib)
|
||||||
|
|
||||||
|
if(NOT WIN32)
|
||||||
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
|
||||||
|
endif()
|
||||||
|
|
||||||
if (NOT TARGET LogVisor)
|
if (NOT TARGET LogVisor)
|
||||||
add_subdirectory(LogVisor)
|
add_subdirectory(LogVisor)
|
||||||
set(LOG_VISOR_INCLUDE_DIR LogVisor/include)
|
set(LOG_VISOR_INCLUDE_DIR LogVisor/include)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
include_directories(include ${LOG_VISOR_INCLUDE_DIR})
|
include_directories(include ${LOG_VISOR_INCLUDE_DIR})
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
|
|
||||||
file(GLOB NOD_HEADERS include/NOD/*.hpp)
|
file(GLOB NOD_HEADERS include/NOD/*.hpp)
|
||||||
|
|
||||||
add_subdirectory(lib)
|
add_subdirectory(lib)
|
||||||
|
|
2
LogVisor
2
LogVisor
|
@ -1 +1 @@
|
||||||
Subproject commit c2bfffa6cf1d07986fecaf7dde42acb29fe1f6e6
|
Subproject commit 403e2549ee5599ad9b05ddc37ed74720756eecd0
|
|
@ -44,7 +44,7 @@ public:
|
||||||
uint32_t offset;
|
uint32_t offset;
|
||||||
uint32_t length;
|
uint32_t length;
|
||||||
public:
|
public:
|
||||||
inline bool isDir() const {return SBig(typeAndNameOffset) >> 24;}
|
inline bool isDir() const {return ((SBig(typeAndNameOffset) >> 24) != 0);}
|
||||||
inline uint32_t getNameOffset() const {return SBig(typeAndNameOffset) & 0xffffff;}
|
inline uint32_t getNameOffset() const {return SBig(typeAndNameOffset) & 0xffffff;}
|
||||||
inline uint32_t getOffset() const {return SBig(offset);}
|
inline uint32_t getOffset() const {return SBig(offset);}
|
||||||
inline uint32_t getLength() const {return SBig(length);}
|
inline uint32_t getLength() const {return SBig(length);}
|
||||||
|
|
|
@ -1,4 +1,6 @@
|
||||||
|
if(NOT WIN32)
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-multichar")
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-multichar")
|
||||||
|
endif()
|
||||||
add_library(NOD
|
add_library(NOD
|
||||||
aes.cpp
|
aes.cpp
|
||||||
DiscBase.cpp
|
DiscBase.cpp
|
||||||
|
@ -11,4 +13,6 @@ add_library(NOD
|
||||||
NOD.cpp
|
NOD.cpp
|
||||||
WideStringConvert.cpp
|
WideStringConvert.cpp
|
||||||
${NOD_HEADERS})
|
${NOD_HEADERS})
|
||||||
|
if(NOT WIN32)
|
||||||
set_source_files_properties(aes.cpp PROPERTIES COMPILE_FLAGS -maes)
|
set_source_files_properties(aes.cpp PROPERTIES COMPILE_FLAGS -maes)
|
||||||
|
endif()
|
||||||
|
|
|
@ -3,6 +3,11 @@
|
||||||
#include "NOD/Util.hpp"
|
#include "NOD/Util.hpp"
|
||||||
#include "NOD/IDiscIO.hpp"
|
#include "NOD/IDiscIO.hpp"
|
||||||
|
|
||||||
|
#if _WIN32
|
||||||
|
#define ftello _ftelli64
|
||||||
|
#define fseeko _fseeki64
|
||||||
|
#endif
|
||||||
|
|
||||||
namespace NOD
|
namespace NOD
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
|
@ -3,6 +3,11 @@
|
||||||
#include "NOD/Util.hpp"
|
#include "NOD/Util.hpp"
|
||||||
#include "NOD/IDiscIO.hpp"
|
#include "NOD/IDiscIO.hpp"
|
||||||
|
|
||||||
|
#if _WIN32
|
||||||
|
#define ftello _ftelli64
|
||||||
|
#define fseeko _fseeki64
|
||||||
|
#endif
|
||||||
|
|
||||||
namespace NOD
|
namespace NOD
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
|
@ -4,6 +4,11 @@
|
||||||
#include "NOD/Util.hpp"
|
#include "NOD/Util.hpp"
|
||||||
#include "NOD/IFileIO.hpp"
|
#include "NOD/IFileIO.hpp"
|
||||||
|
|
||||||
|
#if _WIN32
|
||||||
|
#define ftello _ftelli64
|
||||||
|
#define fseeko _fseeki64
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Macros for min/max */
|
/* Macros for min/max */
|
||||||
#define MIN(a,b) (((a)<(b))?(a):(b))
|
#define MIN(a,b) (((a)<(b))?(a):(b))
|
||||||
#define MAX(a,b) (((a)>(b))?(a):(b))
|
#define MAX(a,b) (((a)>(b))?(a):(b))
|
||||||
|
|
|
@ -2,6 +2,10 @@
|
||||||
#include "NOD/NOD.hpp"
|
#include "NOD/NOD.hpp"
|
||||||
#include "NOD/DiscBase.hpp"
|
#include "NOD/DiscBase.hpp"
|
||||||
|
|
||||||
|
#if _WIN32
|
||||||
|
#define fseeko _fseeki64
|
||||||
|
#endif
|
||||||
|
|
||||||
namespace NOD
|
namespace NOD
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,12 @@
|
||||||
#include "NOD/aes.hpp"
|
#include "NOD/aes.hpp"
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
|
#if _WIN32
|
||||||
|
#include <intrin.h>
|
||||||
|
#else
|
||||||
#include <cpuid.h>
|
#include <cpuid.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
namespace NOD
|
namespace NOD
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue