Permalink
Browse files

add 64bit build support for windows

Pretty minimal, tested on vs2010.
requires cmake 2.8.4 because of this bug:
http://www.vtk.org/Bug/view.php?id=11464
  • Loading branch information...
1 parent 0a61b03 commit d46b3358441baa109efe1be861a9bf9cc30bd45a @dougma dougma committed Jun 1, 2011
Showing with 34 additions and 10 deletions.
  1. +11 −7 cmake/Win.cmake
  2. +8 −2 cmake/buildconfig.cmake
  3. +7 −0 prep2008x64.cmd
  4. +7 −0 prep2010x64.cmd
  5. +1 −1 src/ActiveXCore/FBControl.h
View
@@ -82,13 +82,17 @@ if (NOT ATL_INCLUDE_DIR)
NO_DEFAULT_PATH
)
- find_file(ATLLIB
- atls.lib
- PATHS
- ${VC_DIR}/atlmfc/lib
- ${ATLLIB_GUESSES}
- NO_DEFAULT_PATH
- )
+ if (CMAKE_SIZEOF_VOID_P EQUAL 8)
+ set(ATLLIB_GUESSES "${VC_DIR}/atlmfc/lib/amd64" ${ATLLIB_GUESSES})
+ else()
+ set(ATLLIB_GUESSES "${VC_DIR}/atlmfc/lib" ${ATLLIB_GUESSES})
+ endif()
+ find_file(ATLLIB
+ atls.lib
+ PATHS
+ ${ATLLIB_GUESSES}
+ NO_DEFAULT_PATH
+ )
find_file(MFCWIN
winres.h
View
@@ -22,8 +22,14 @@ if (WIN32)
set(CMAKE_CXX_FLAGS "/DWIN32 /DFB_WIN=1 /DXP_WIN=1 /W3 /wd4996 /nologo /EHsc /wd4290 /D UNICODE /D _UNICODE /D _WINDOWS")
set(CMAKE_C_FLAGS_RELEASE "/MT /Ox /DNDEBUG")
set(CMAKE_CXX_FLAGS_RELEASE "/MT /Ox /DNDEBUG")
- set(CMAKE_C_FLAGS_DEBUG "/MTd /Od /DDEBUG /D_DEBUG /ZI /RTC1 /Gm")
- set(CMAKE_CXX_FLAGS_DEBUG "/MTd /Od /DDEBUG /D_DEBUG /ZI /RTC1 /Gm")
+ # x64 does not support edit-and-continue.
+ if (CMAKE_SIZEOF_VOID_P EQUAL 8)
+ set(CMAKE_C_FLAGS_DEBUG "/MTd /Od /DDEBUG /D_DEBUG /Zi /RTC1 /Gm")
+ set(CMAKE_CXX_FLAGS_DEBUG "/MTd /Od /DDEBUG /D_DEBUG /Zi /RTC1 /Gm")
+ else()
+ set(CMAKE_C_FLAGS_DEBUG "/MTd /Od /DDEBUG /D_DEBUG /ZI /RTC1 /Gm")
+ set(CMAKE_CXX_FLAGS_DEBUG "/MTd /Od /DDEBUG /D_DEBUG /ZI /RTC1 /Gm")
+ endif()
set(CMAKE_C_FLAGS_MINSIZEREL "/MT /O1 /DNDEBUG")
set(CMAKE_CXX_FLAGS_MINSIZEREL "/MT /O1 /DNDEBUG")
set(CMAKE_C_FLAGS_RELWITHDEBINFO "/MT /Ox /DNDEBUG /Zi")
View
@@ -0,0 +1,7 @@
+@echo off & setlocal enableextensions enabledelayedexpansion
+
+set _FB_GEN="Visual Studio 9 2008 Win64"
+
+call "%~d0%~p0\common.cmd" %*
+if %errorlevel% == 2 exit /b 1
+call "%~d0%~p0\winprep.cmd"
View
@@ -0,0 +1,7 @@
+@echo off & setlocal enableextensions enabledelayedexpansion
+
+set _FB_GEN="Visual Studio 10 Win64"
+
+call "%~d0%~p0\common.cmd" %*
+if %errorlevel% == 2 exit /b 1
+call "%~d0%~p0\winprep.cmd"
@@ -221,7 +221,7 @@ namespace FB {
HRESULT FB::ActiveX::CFBControl<pFbCLSID, pMT, ICurObjInterface, piid, plibid>::OnDraw( ATL_DRAWINFO& di )
{
if (pluginWin && m_bWndLess && FB::pluginGuiEnabled()) {
- HRESULT lRes(0);
+ LRESULT lRes(0);
PluginWindowlessWin* win = static_cast<PluginWindowlessWin*>(pluginWin.get());
win->setWindowPosition(
di.prcBounds->left,

0 comments on commit d46b335

Please sign in to comment.