Win64 fix: if you disable enough things in CMakeList.txt blender compiles on win64 now using cmake --> *BUT* it doesn't say anything about if it works with MEM>4GB (that's next thing to explore!)
This commit is contained in:
parent
37ca3d7a39
commit
8a19adeb58
@ -197,10 +197,17 @@ IF(UNIX)
|
||||
ENDIF(UNIX)
|
||||
|
||||
IF(WIN32)
|
||||
INCLUDE(${CMAKE_ROOT}/Modules/Platform/Windows-cl.cmake)
|
||||
|
||||
INCLUDE(${CMAKE_ROOT}/Modules/Platform/Windows-cl.cmake)
|
||||
|
||||
SET(LIBDIR ${CMAKE_SOURCE_DIR}/../lib/windows)
|
||||
|
||||
# Setup 64bit and 64bit windows systems
|
||||
IF(CMAKE_CL_64)
|
||||
message("64 bit compiler detected.")
|
||||
SET(LIBDIR ${CMAKE_SOURCE_DIR}/../lib/win64)
|
||||
ENDIF(CMAKE_CL_64)
|
||||
|
||||
SET(PYTHON ${LIBDIR}/python)
|
||||
SET(PYTHON_VERSION 2.5)
|
||||
SET(PYTHON_INC "${PYTHON}/include/python${PYTHON_VERSION}")
|
||||
@ -214,12 +221,20 @@ IF(WIN32)
|
||||
SET(OPENAL_LIB openal_static)
|
||||
SET(OPENAL_LIBPATH ${OPENAL}/lib)
|
||||
|
||||
SET(PNG_LIB libpng_st)
|
||||
IF(CMAKE_CL_64)
|
||||
SET(PNG_LIB libpng)
|
||||
ELSE(CMAKE_CL_64)
|
||||
SET(PNG_LIB libpng_st)
|
||||
ENDIF(CMAKE_CL_64)
|
||||
SET(JPEG_LIB libjpeg)
|
||||
|
||||
SET(ZLIB ${LIBDIR}/zlib)
|
||||
SET(ZLIB_INC ${ZLIB}/include)
|
||||
SET(ZLIB_LIB libz)
|
||||
IF(CMAKE_CL_64)
|
||||
SET(ZLIB_LIB zlib)
|
||||
ELSE(CMAKE_CL_64)
|
||||
SET(ZLIB_LIB libz)
|
||||
ENDIF(CMAKE_CL_64)
|
||||
SET(ZLIB_LIBPATH ${ZLIB}/lib)
|
||||
|
||||
SET(PTHREADS ${LIBDIR}/pthreads)
|
||||
@ -302,7 +317,11 @@ IF(WIN32)
|
||||
|
||||
SET(WINTAB_INC ${LIBDIR}/wintab/include)
|
||||
|
||||
SET(PLATFORM_LINKFLAGS "/NODEFAULTLIB:libc.lib")
|
||||
IF(CMAKE_CL_64)
|
||||
SET(PLATFORM_LINKFLAGS "/NODEFAULTLIB:libc.lib;MSVCRT.lib ")
|
||||
ELSE(CMAKE_CL_64)
|
||||
SET(PLATFORM_LINKFLAGS "/NODEFAULTLIB:libc.lib ")
|
||||
ENDIF(CMAKE_CL_64)
|
||||
SET(CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_DEBUG} /NODEFAULTLIB:libcmt.lib;libc.lib ")
|
||||
ENDIF(WIN32)
|
||||
|
||||
|
@ -197,7 +197,7 @@ BuildEdges(
|
||||
|
||||
for (int vert = 0; vert < vertex_num; ++vert) {
|
||||
|
||||
BSP_FaceInd fi(f_it - f_it_begin);
|
||||
BSP_FaceInd fi(size_t (f_it - f_it_begin));
|
||||
InsertEdge(prev_vi,face.m_verts[vert],fi,dummy);
|
||||
prev_vi = face.m_verts[vert];
|
||||
}
|
||||
|
@ -93,6 +93,16 @@ public:
|
||||
}
|
||||
|
||||
|
||||
#if defined(_WIN64)
|
||||
CTR_TaggedIndex(
|
||||
const unsigned __int64 val
|
||||
) :
|
||||
m_val ( ((unsigned __int64)val & index_mask)
|
||||
| ( (empty_tag << tag_shift)
|
||||
& (~index_mask) ) ) {
|
||||
}
|
||||
#endif
|
||||
|
||||
CTR_TaggedIndex(
|
||||
const CTR_TaggedIndex &my_index
|
||||
):
|
||||
@ -124,6 +134,12 @@ public:
|
||||
return (long int)(m_val & index_mask);
|
||||
}
|
||||
|
||||
#if defined(_WIN64)
|
||||
operator unsigned __int64 () const {
|
||||
return (unsigned __int64)(m_val & index_mask);
|
||||
}
|
||||
#endif
|
||||
|
||||
bool
|
||||
IsEmpty(
|
||||
) const {
|
||||
|
@ -477,7 +477,7 @@ DeleteVertex(
|
||||
return;
|
||||
}
|
||||
|
||||
LOD_VertexInd last = LOD_VertexInd(verts.end() - verts.begin() - 1);
|
||||
LOD_VertexInd last = LOD_VertexInd(size_t(verts.end() - verts.begin() - 1));
|
||||
|
||||
if (!(last == v)) {
|
||||
|
||||
@ -533,7 +533,7 @@ DeleteEdge(
|
||||
return;
|
||||
}
|
||||
|
||||
LOD_EdgeInd last = LOD_EdgeInd(edges.end() - edges.begin() - 1);
|
||||
LOD_EdgeInd last = LOD_EdgeInd(size_t(edges.end() - edges.begin() - 1));
|
||||
|
||||
if (!(last == e)) {
|
||||
vector<LOD_EdgeInd> e_verts;
|
||||
@ -573,7 +573,7 @@ DeleteFace(
|
||||
return;
|
||||
}
|
||||
|
||||
LOD_FaceInd last = LOD_FaceInd(faces.end() - faces.begin() - 1);
|
||||
LOD_FaceInd last = LOD_FaceInd(size_t (faces.end() - faces.begin() - 1));
|
||||
|
||||
if (!(last == f)) {
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user