Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Genrich <daniel.genrich@gmx.net>2008-07-13 22:29:07 +0400
committerDaniel Genrich <daniel.genrich@gmx.net>2008-07-13 22:29:07 +0400
commit8a19adeb5857f67db22e4f1b08330a967f462844 (patch)
treeb15bf1d4956b2ae383aa471feb61b0d7691d26ec
parent37ca3d7a3928962442d10381018c3c8eeb078f16 (diff)
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!)
-rw-r--r--CMakeLists.txt27
-rw-r--r--intern/bsp/intern/BSP_CSGMesh.cpp2
-rw-r--r--intern/container/CTR_TaggedIndex.h16
-rw-r--r--intern/decimation/intern/LOD_ManMesh2.cpp6
4 files changed, 43 insertions, 8 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index b58fe945663..5a23e77d9f8 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -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)
diff --git a/intern/bsp/intern/BSP_CSGMesh.cpp b/intern/bsp/intern/BSP_CSGMesh.cpp
index 553f39a4642..ca7795b3cf5 100644
--- a/intern/bsp/intern/BSP_CSGMesh.cpp
+++ b/intern/bsp/intern/BSP_CSGMesh.cpp
@@ -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];
}
diff --git a/intern/container/CTR_TaggedIndex.h b/intern/container/CTR_TaggedIndex.h
index 7a7bd85e890..68d2536c879 100644
--- a/intern/container/CTR_TaggedIndex.h
+++ b/intern/container/CTR_TaggedIndex.h
@@ -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 {
diff --git a/intern/decimation/intern/LOD_ManMesh2.cpp b/intern/decimation/intern/LOD_ManMesh2.cpp
index eeb497bb09e..2fe49b36583 100644
--- a/intern/decimation/intern/LOD_ManMesh2.cpp
+++ b/intern/decimation/intern/LOD_ManMesh2.cpp
@@ -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)) {