<div class="gmail_quote">On Thu, Jan 15, 2009 at 11:30 AM, Michael Jackson <span dir="ltr"><<a href="mailto:mike.jackson@bluequartz.net">mike.jackson@bluequartz.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
I am not really sure about the ins-and-outs of Windows Dev but looking through the Windows-cl.cmake file (Located in the CMake-2.6.2/share/cmake-2.6/Modules directory) there are some variables that you might be able to exploit.<br>
<br>
CMAKE_CL_64<br>
CMAKE_FORCE_WIN64<br>
<br>
Not sure how these work if you are running a 32bit system and want to build for Win64? They seem to be detecting the system you are building on, not what you want to target.</blockquote></div><br>I currently have this:<br>
<br>
include( LibFindMacros )<br>
<br>
find_file( TBB_INCLUDE_DIR tbb/atomic.h )<br>
<br>
if( MSVC90 )<br>
set( TBB_PATH_SUFFIX ia32/vc9/lib )<br>
elseif( MSVC80 )<br>
set( TBB_PATH_SUFFIX ia32/vc8/lib )<br>
elseif( MSVC70 OR MSVC71 )<br>
set( TBB_PATH_SUFFIX ia32/vc7/lib )<br>
elseif( MSVC90 AND CMAKE_GENERATOR STREQUAL "Visual Studio 8 2005 Win64" )<br>
set( TBB_PATH_SUFFIX em64t/vc8/lib )<br>
elseif( MSVC80 AND CMAKE_GENERATOR STREQUAL "Visual Studio 9 2008 Win64" )<br>
set( TBB_PATH_SUFFIX em64t/vc9/lib )<br>
endif()<br>
<br>
find_library( TBB_LIBRARY_RELEASE tbb PATH_SUFFIXES ${TBB_PATH_SUFFIX} )<br>
find_library( TBBMALLOC_LIBRARY_RELEASE tbbmalloc PATH_SUFFIXES ${TBB_PATH_SUFFIX} )<br>
find_library( TBB_LIBRARY_DEBUG tbb_debug PATH_SUFFIXES ${TBB_PATH_SUFFIX} )<br>
find_library( TBBMALLOC_LIBRARY_DEBUG tbbmalloc_debug PATH_SUFFIXES ${TBB_PATH_SUFFIX} )<br>
<br>
set( TBB_LIBRARY<br>
debug ${TBB_LIBRARY_DEBUG}<br>
debug ${TBBMALLOC_LIBRARY_DEBUG}<br>
optimized ${TBB_LIBRARY_RELEASE}<br>
optimized ${TBBMALLOC_LIBRARY_RELEASE}<br>
)<br>
<br>
set( TBB_PROCESS_INCLUDES TBB_INCLUDE_DIR )<br>
set( TBB_PROCESS_LIBS TBB_LIBRARY )<br>
libfind_process( TBB )<br><br><br>