[Solved] CMake can't find TBB / Building Ogre with TBB

Anything and everything that's related to OGRE or the wider graphics field that doesn't fit into the other forums.
Post Reply
kynan
Gnoblar
Posts: 6
Joined: Wed Jul 04, 2012 6:24 am

[Solved] CMake can't find TBB / Building Ogre with TBB

Post by kynan »

I want to build Ogre from source (straight from bitbucket) with TBB as the threading support. I'm on Windows and I'm using VS2013. I've gotten it to build with and without boost, but I want TBB instead. I came across this thread http://www.ogre3d.org/forums/viewtopic.php?f=4&t=78443 so it seems my problem might not be new.

I "installed" TBB using "bin\tbbvars.bat ia32 vs2013". That didn't do anything, so after looking inside the script, I tried the same with "vs2012". That actually set a few env variables. I tried "Configure" in CMake both times, and TBB was never detected. I also tried manually setting environment variables for TBB_HOME, TBB_ROOT, TBB_INCLUDE_DIR, etc, but no luck there either.

Do any of you know what's going on?

Tomorrow I'm going to see if I can build TBB from source for VS2013, just in case it's related to a version mismatch. Also, once I do get CMake to detect TBB, what configuration do I set in CMake so that Ogre actually uses TBB?

Thanks.
Last edited by kynan on Mon Dec 23, 2013 5:46 am, edited 1 time in total.
User avatar
Klaim
Old One
Posts: 2565
Joined: Sun Sep 11, 2005 1:04 am
Location: Paris, France
x 56
Contact:

Re: CMake can't find TBB / Building Ogre with TBB

Post by Klaim »

Did you try what I am doing myself so that it work, which I describe at the end of the thread you linked?

Without forcing the

Code: Select all

set( TBB_FOUND TRUE ) # HERE
before adding ogre subdirectory, it will not work.
Ogre CMAke script will consider TBB to not be found even if it is found (I don't remember why but looking at the OGre cmake files made me realize this, so I forced it).
kynan
Gnoblar
Posts: 6
Joined: Wed Jul 04, 2012 6:24 am

Re: CMake can't find TBB / Building Ogre with TBB

Post by kynan »

Looks like it was related to a version mismatch like I suspected. I added three lines to packages/FindTBB.cmake:

Code: Select all

  if (MSVC_VERSION EQUAL 1700)
    set(COMPILER_PREFIX "vc11")
  endif ()
  if (MSVC_VERSION EQUAL 1800)
    set(COMPILER_PREFIX "vc11")
  endif ()
I also found the OGRE_CONFIG_THREAD_PROVIDER setting and changed it from 'boost' to 'tbb'. So far so good.
kynan
Gnoblar
Posts: 6
Joined: Wed Jul 04, 2012 6:24 am

Re: CMake can't find TBB / Building Ogre with TBB

Post by kynan »

So I tried running the sample browser from the Ogre install directory, and it complains that it can't find the TBB dlls. OIS.dll and cg.dll have been copied there, but not any of the other binaries from Ogredeps.

These are the results of CMake configuration for Ogre:

Code: Select all

-- Cache values
// Boost atomic library (debug)
Boost_ATOMIC_LIBRARY_DEBUG:FILEPATH=C:/Source/vs2013/robandkynanmakeagame/boost/lib/libboost_atomic-vc120-mt-gd-1_55.lib

// Boost atomic library (release)
Boost_ATOMIC_LIBRARY_RELEASE:FILEPATH=C:/Source/vs2013/robandkynanmakeagame/boost/lib/libboost_atomic-vc120-mt-1_55.lib

// Boost chrono library (debug)
Boost_CHRONO_LIBRARY_DEBUG:FILEPATH=C:/Source/vs2013/robandkynanmakeagame/boost/lib/libboost_chrono-vc120-mt-gd-1_55.lib

// Boost chrono library (release)
Boost_CHRONO_LIBRARY_RELEASE:FILEPATH=C:/Source/vs2013/robandkynanmakeagame/boost/lib/libboost_chrono-vc120-mt-1_55.lib

// Boost date_time library (debug)
Boost_DATE_TIME_LIBRARY_DEBUG:FILEPATH=C:/Source/vs2013/robandkynanmakeagame/boost/lib/libboost_date_time-vc120-mt-gd-1_55.lib

// Boost date_time library (release)
Boost_DATE_TIME_LIBRARY_RELEASE:FILEPATH=C:/Source/vs2013/robandkynanmakeagame/boost/lib/libboost_date_time-vc120-mt-1_55.lib

// The directory containing a CMake configuration file for Boost.
Boost_DIR:PATH=Boost_DIR-NOTFOUND

// Path to a file.
Boost_INCLUDE_DIR:PATH=C:\Source\vs2013\robandkynanmakeagame\boost

// Boost library directory
Boost_LIBRARY_DIR:PATH=C:/Source/vs2013/robandkynanmakeagame/boost/lib

// Boost system library (debug)
Boost_SYSTEM_LIBRARY_DEBUG:FILEPATH=C:/Source/vs2013/robandkynanmakeagame/boost/lib/libboost_system-vc120-mt-gd-1_55.lib

// Boost system library (release)
Boost_SYSTEM_LIBRARY_RELEASE:FILEPATH=C:/Source/vs2013/robandkynanmakeagame/boost/lib/libboost_system-vc120-mt-1_55.lib

// Boost thread library (debug)
Boost_THREAD_LIBRARY_DEBUG:FILEPATH=C:/Source/vs2013/robandkynanmakeagame/boost/lib/libboost_thread-vc120-mt-gd-1_55.lib

// Boost thread library (release)
Boost_THREAD_LIBRARY_RELEASE:FILEPATH=C:/Source/vs2013/robandkynanmakeagame/boost/lib/libboost_thread-vc120-mt-1_55.lib

// Semicolon separated list of supported configuration types, only supports Debug, Release, MinSizeRel, and RelWithDebInfo, anything else will be ignored.
CMAKE_CONFIGURATION_TYPES:STRING=Debug;Release;MinSizeRel;RelWithDebInfo

// Flags used by the compiler during all build types.
CMAKE_CXX_FLAGS:STRING= /DWIN32 /D_WINDOWS /W3 /GR /EHsc

// Flags used by the compiler during debug builds.
CMAKE_CXX_FLAGS_DEBUG:STRING=/D_DEBUG /MDd /Zi /Ob0 /Od /RTC1

// Flags used by the compiler during release minsize builds.
CMAKE_CXX_FLAGS_MINSIZEREL:STRING=/MD /O1 /Ob1 /D NDEBUG

// Flags used by the compiler during release builds (/MD /Ob1 /Oi /Ot /Oy /Gs will produce slightly less optimized but smaller files).
CMAKE_CXX_FLAGS_RELEASE:STRING=/MD /O2 /Ob2 /D NDEBUG

// Flags used by the compiler during Release with Debug Info builds.
CMAKE_CXX_FLAGS_RELWITHDEBINFO:STRING=/MD /Zi /O2 /Ob1 /D NDEBUG

// Libraries linked by defalut with all C++ applications.
CMAKE_CXX_STANDARD_LIBRARIES:STRING=kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib

// Flags used by the compiler during all build types.
CMAKE_C_FLAGS:STRING= /DWIN32 /D_WINDOWS /W3

// Flags used by the compiler during debug builds.
CMAKE_C_FLAGS_DEBUG:STRING=/D_DEBUG /MDd /Zi /Ob0 /Od /RTC1

// Flags used by the compiler during release minsize builds.
CMAKE_C_FLAGS_MINSIZEREL:STRING=/MD /O1 /Ob1 /D NDEBUG

// Flags used by the compiler during release builds (/MD /Ob1 /Oi /Ot /Oy /Gs will produce slightly less optimized but smaller files).
CMAKE_C_FLAGS_RELEASE:STRING=/MD /O2 /Ob2 /D NDEBUG

// Flags used by the compiler during Release with Debug Info builds.
CMAKE_C_FLAGS_RELWITHDEBINFO:STRING=/MD /Zi /O2 /Ob1 /D NDEBUG

// Libraries linked by defalut with all C applications.
CMAKE_C_STANDARD_LIBRARIES:STRING=kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib

// Flags used by the linker.
CMAKE_EXE_LINKER_FLAGS:STRING= /machine:X86 

// Flags used by the linker during debug builds.
CMAKE_EXE_LINKER_FLAGS_DEBUG:STRING=/debug /INCREMENTAL

// Flags used by the linker during release minsize builds.
CMAKE_EXE_LINKER_FLAGS_MINSIZEREL:STRING=/INCREMENTAL:NO

// Flags used by the linker during release builds.
CMAKE_EXE_LINKER_FLAGS_RELEASE:STRING=/INCREMENTAL:NO

// Flags used by the linker during Release with Debug Info builds.
CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO:STRING=/debug /INCREMENTAL

// OGRE install prefix
CMAKE_INSTALL_PREFIX:PATH=C:/Source/vs2013/robandkynanmakeagame/ogre-compiled

// Path to a program.
CMAKE_LINKER:FILEPATH=C:/Program Files (x86)/Microsoft Visual Studio 12.0/VC/bin/link.exe

// make program
CMAKE_MAKE_PROGRAM:FILEPATH=C:/PROGRA~2/MSBuild/12.0/Bin/MSBuild.exe

// Flags used by the linker during the creation of modules.
CMAKE_MODULE_LINKER_FLAGS:STRING= /machine:X86 

// Flags used by the linker during debug builds.
CMAKE_MODULE_LINKER_FLAGS_DEBUG:STRING=/debug /INCREMENTAL

// Flags used by the linker during release minsize builds.
CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL:STRING=/INCREMENTAL:NO

// Flags used by the linker during release builds.
CMAKE_MODULE_LINKER_FLAGS_RELEASE:STRING=/INCREMENTAL:NO

// Flags used by the linker during Release with Debug Info builds.
CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO:STRING=/debug /INCREMENTAL

// RC compiler
CMAKE_RC_COMPILER:FILEPATH=rc

// Flags for Fortran compiler.
CMAKE_RC_FLAGS:STRING= 

// Flags used by the linker during the creation of dll's.
CMAKE_SHARED_LINKER_FLAGS:STRING= /machine:X86 

// Flags used by the linker during debug builds.
CMAKE_SHARED_LINKER_FLAGS_DEBUG:STRING=/debug /INCREMENTAL

// Flags used by the linker during release minsize builds.
CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL:STRING=/INCREMENTAL:NO

// Flags used by the linker during release builds.
CMAKE_SHARED_LINKER_FLAGS_RELEASE:STRING=/INCREMENTAL:NO

// Flags used by the linker during Release with Debug Info builds.
CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO:STRING=/debug /INCREMENTAL

// If set, runtime paths are not added when installing shared libraries, but are added when building.
CMAKE_SKIP_INSTALL_RPATH:BOOL=OFF

// If set, runtime paths are not added when using shared libraries.
CMAKE_SKIP_RPATH:BOOL=OFF

// Flags used by the linker during the creation of static libraries.
CMAKE_STATIC_LINKER_FLAGS:STRING=

// Flags used by the linker during debug builds.
CMAKE_STATIC_LINKER_FLAGS_DEBUG:STRING=

// Flags used by the linker during release minsize builds.
CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL:STRING=

// Flags used by the linker during release builds.
CMAKE_STATIC_LINKER_FLAGS_RELEASE:STRING=

// Flags used by the linker during Release with Debug Info builds.
CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO:STRING=

// If true, cmake will use relative paths in makefiles and projects.
CMAKE_USE_RELATIVE_PATHS:BOOL=OFF

// If this value is on, makefiles will be generated without the .SILENT directive, and all commands will be echoed to the console during the make.  This is useful for debugging only. With Visual Studio IDE projects all commands are done without /nologo.
CMAKE_VERBOSE_MAKEFILE:BOOL=OFF

// Enable to build NSIS packages
CPACK_BINARY_NSIS:BOOL=ON

// Enable to build WiX packages
CPACK_BINARY_WIX:BOOL=OFF

// Enable to build ZIP packages
CPACK_BINARY_ZIP:BOOL=OFF

// Enable to build ZIP source packages
CPACK_SOURCE_ZIP:BOOL=ON

// Path to a file.
Cg_BINARY_DBG:FILEPATH=C:/Source/vs2013/robandkynanmakeagame/ogredeps-compiled/bin/debug/cg.dll

// Path to a file.
Cg_BINARY_REL:FILEPATH=C:/Source/vs2013/robandkynanmakeagame/ogredeps-compiled/bin/release/cg.dll

// x
Cg_INCLUDE_DIR:PATH=C:/Source/vs2013/robandkynanmakeagame/ogredeps-compiled/include/Cg

// x
Cg_LIBRARY_DBG:FILEPATH=C:/Source/vs2013/robandkynanmakeagame/ogredeps-compiled/lib/Debug/cg.lib

// x
Cg_LIBRARY_FWK:STRING=NOTFOUND

// x
Cg_LIBRARY_REL:FILEPATH=C:/Source/vs2013/robandkynanmakeagame/ogredeps-compiled/lib/Release/cg.lib

// Path to a file.
CppUnit_INCLUDE_DIR:PATH=CppUnit_INCLUDE_DIR-NOTFOUND

// Path to a library.
CppUnit_LIBRARY_DBG:FILEPATH=CppUnit_LIBRARY_DBG-NOTFOUND

// Path to a library.
CppUnit_LIBRARY_REL:FILEPATH=CppUnit_LIBRARY_REL-NOTFOUND

// Graphviz Dot tool for using Doxygen
DOXYGEN_DOT_EXECUTABLE:FILEPATH=DOXYGEN_DOT_EXECUTABLE-NOTFOUND

// Doxygen documentation generation tool (http://www.doxygen.org)
DOXYGEN_EXECUTABLE:FILEPATH=DOXYGEN_EXECUTABLE-NOTFOUND

// Path to a library.
DirectX11_D3DCOMPILER_LIBRARY:FILEPATH=C:/Program Files (x86)/Microsoft DirectX SDK (June 2010)/Lib/x86/d3dcompiler.lib

// Path to a library.
DirectX11_D3DX11_LIBRARY:FILEPATH=C:/Program Files (x86)/Microsoft DirectX SDK (June 2010)/Lib/x86/d3dx11.lib

// Path to a library.
DirectX11_DXERR_LIBRARY:FILEPATH=C:/Program Files (x86)/Microsoft DirectX SDK (June 2010)/Lib/x86/DxErr.lib

// Path to a library.
DirectX11_DXGI_LIBRARY:FILEPATH=C:/Program Files (x86)/Microsoft DirectX SDK (June 2010)/Lib/x86/dxgi.lib

// Path to a library.
DirectX11_DXGUID_LIBRARY:FILEPATH=C:/Program Files (x86)/Microsoft DirectX SDK (June 2010)/Lib/x86/dxguid.lib

// x
DirectX11_INCLUDE_DIR:PATH=C:/Program Files (x86)/Microsoft DirectX SDK (June 2010)/Include

// x
DirectX11_LIBRARY:FILEPATH=C:/Program Files (x86)/Microsoft DirectX SDK (June 2010)/Lib/x86/d3d11.lib

// Path to a library.
DirectX9_D3DX9_LIBRARY:FILEPATH=C:/Program Files (x86)/Microsoft DirectX SDK (June 2010)/Lib/x86/d3dx9.lib

// Path to a library.
DirectX9_DXERR_LIBRARY:FILEPATH=C:/Program Files (x86)/Microsoft DirectX SDK (June 2010)/Lib/x86/DxErr.lib

// Path to a library.
DirectX9_DXGUID_LIBRARY:FILEPATH=C:/Program Files (x86)/Microsoft DirectX SDK (June 2010)/Lib/x86/dxguid.lib

// x
DirectX9_INCLUDE_DIR:PATH=C:/Program Files (x86)/Microsoft DirectX SDK (June 2010)/Include

// x
DirectX9_LIBRARY:FILEPATH=C:/Program Files (x86)/Microsoft DirectX SDK (June 2010)/Lib/x86/d3d9.lib

// Path to a file.
EGL_INCLUDE_DIR:PATH=EGL_INCLUDE_DIR-NOTFOUND

// Path to a library.
EGL_egl_LIBRARY:FILEPATH=EGL_egl_LIBRARY-NOTFOUND

// Path to a file.
FREETYPE_FT2BUILD_INCLUDE_DIR:PATH=C:/Source/vs2013/robandkynanmakeagame/ogredeps-compiled/include

// Path to a file.
FREETYPE_INCLUDE_DIR:PATH=C:/Source/vs2013/robandkynanmakeagame/ogredeps-compiled/include

// Path to a library.
FREETYPE_LIBRARY_DBG:FILEPATH=C:/Source/vs2013/robandkynanmakeagame/ogredeps-compiled/lib/Debug/freetype_d.lib

// Path to a library.
FREETYPE_LIBRARY_REL:FILEPATH=C:/Source/vs2013/robandkynanmakeagame/ogredeps-compiled/lib/Release/freetype.lib

// Path to a file.
FreeImage_INCLUDE_DIR:PATH=C:/Source/vs2013/robandkynanmakeagame/ogredeps-compiled/include

// Path to a library.
FreeImage_LIBRARY_DBG:FILEPATH=C:/Source/vs2013/robandkynanmakeagame/ogredeps-compiled/lib/Debug/FreeImage_d.lib

// Path to a library.
FreeImage_LIBRARY_REL:FILEPATH=C:/Source/vs2013/robandkynanmakeagame/ogredeps-compiled/lib/Release/FreeImage.lib

// x
GLSL_Optimizer_INCLUDE_DIR:PATH=GLSL_Optimizer_INCLUDE_DIR-NOTFOUND

// x
GLSL_Optimizer_LIBRARY_DBG:FILEPATH=GLSL_Optimizer_LIBRARY_DBG-NOTFOUND

// x
GLSL_Optimizer_LIBRARY_FWK:STRING=NOTFOUND

// x
GLSL_Optimizer_LIBRARY_REL:FILEPATH=GLSL_Optimizer_LIBRARY_REL-NOTFOUND

// x
HLSL2GLSL_INCLUDE_DIR:PATH=HLSL2GLSL_INCLUDE_DIR-NOTFOUND

// x
HLSL2GLSL_LIBRARY_DBG:FILEPATH=HLSL2GLSL_LIBRARY_DBG-NOTFOUND

// x
HLSL2GLSL_LIBRARY_FWK:STRING=NOTFOUND

// x
HLSL2GLSL_LIBRARY_REL:FILEPATH=HLSL2GLSL_LIBRARY_REL-NOTFOUND

// Enable Ogre asserts and exceptions. Possible values:
	0 - Standard asserts in debug builds, nothing in release builds.
	1 - Standard asserts in debug builds, exceptions in release builds.
	2 - Exceptions in debug builds, exceptions in release builds.
OGRE_ASSERT_MODE:STRING=0

// Build MeshLodGenerator component
OGRE_BUILD_COMPONENT_MESHLODGENERATOR:BOOL=ON

// Build Overlay component
OGRE_BUILD_COMPONENT_OVERLAY:BOOL=ON

// Build Paging component
OGRE_BUILD_COMPONENT_PAGING:BOOL=ON

// Build Property component
OGRE_BUILD_COMPONENT_PROPERTY:BOOL=ON

// Build RTShader System component
OGRE_BUILD_COMPONENT_RTSHADERSYSTEM:BOOL=ON

// Build Terrain component
OGRE_BUILD_COMPONENT_TERRAIN:BOOL=ON

// Build Volume component
OGRE_BUILD_COMPONENT_VOLUME:BOOL=ON

// Generate documentation target for build if Doxygen is installed.
OGRE_BUILD_DOCS:BOOL=ON

// Enable build with multiple processes in Visual Studio
OGRE_BUILD_MSVC_MP:BOOL=ON

// Add /Zm256 compiler option to Visual Studio to fix PCH errors
OGRE_BUILD_MSVC_ZM:BOOL=ON

// Build Ogre for Google's Native Client (NaCl)
OGRE_BUILD_PLATFORM_NACL:BOOL=OFF

// Build Ogre for Windows Phone
OGRE_BUILD_PLATFORM_WINDOWS_PHONE:BOOL=OFF

// Build Ogre for Metro style application (WinRT)
OGRE_BUILD_PLATFORM_WINRT:BOOL=OFF

// Build BSP SceneManager plugin
OGRE_BUILD_PLUGIN_BSP:BOOL=ON

// Build Cg plugin
OGRE_BUILD_PLUGIN_CG:BOOL=ON

// Build Octree SceneManager plugin
OGRE_BUILD_PLUGIN_OCTREE:BOOL=ON

// Build PCZ SceneManager plugin
OGRE_BUILD_PLUGIN_PCZ:BOOL=ON

// Build ParticleFX plugin
OGRE_BUILD_PLUGIN_PFX:BOOL=ON

// Build Direct3D11 RenderSystem [EXPERIMENTAL]
OGRE_BUILD_RENDERSYSTEM_D3D11:BOOL=ON

// Build Direct3D9 RenderSystem
OGRE_BUILD_RENDERSYSTEM_D3D9:BOOL=OFF

// Build OpenGL RenderSystem
OGRE_BUILD_RENDERSYSTEM_GL:BOOL=ON

// Build OpenGL 3+ RenderSystem [EXPERIMENTAL]
OGRE_BUILD_RENDERSYSTEM_GL3PLUS:BOOL=OFF

// Build OpenGL ES 1.x RenderSystem
OGRE_BUILD_RENDERSYSTEM_GLES:BOOL=OFF

// Build OpenGL ES 2.x RenderSystem
OGRE_BUILD_RENDERSYSTEM_GLES2:BOOL=OFF

// Build RTShader System FFP core shaders
OGRE_BUILD_RTSHADERSYSTEM_CORE_SHADERS:BOOL=ON

// Build RTShader System extensions shaders
OGRE_BUILD_RTSHADERSYSTEM_EXT_SHADERS:BOOL=ON

// Build Ogre demos
OGRE_BUILD_SAMPLES:BOOL=ON

// Build the unit tests & PlayPen
OGRE_BUILD_TESTS:BOOL=OFF

// Build the command-line tools
OGRE_BUILD_TOOLS:BOOL=ON

// Specify the memory allocator to use. Possible values:
  1 - Standard allocator
  2 - nedmalloc
  3 - User-provided allocator
  4 - nedmalloc with pooling
OGRE_CONFIG_ALLOCATOR:STRING=4

// STL containers in Ogre use the custom allocator
OGRE_CONFIG_CONTAINERS_USE_CUSTOM_ALLOCATOR:BOOL=ON

// Use doubles instead of floats in Ogre
OGRE_CONFIG_DOUBLE:BOOL=OFF

// Build DDS codec.
OGRE_CONFIG_ENABLE_DDS:BOOL=ON

// Build ETC codec.
OGRE_CONFIG_ENABLE_ETC:BOOL=OFF

// Build FreeImage codec. If you disable this option, you need to provide your own image handling codecs.
OGRE_CONFIG_ENABLE_FREEIMAGE:BOOL=ON

// Enable OpenGL state cache management
OGRE_CONFIG_ENABLE_GL_STATE_CACHE_SUPPORT:BOOL=OFF

// Enable Mesh Lod.
OGRE_CONFIG_ENABLE_MESHLOD:BOOL=TRUE

// Build PVRTC codec.
OGRE_CONFIG_ENABLE_PVRTC:BOOL=OFF

// Include Viewport orientation mode support.
OGRE_CONFIG_ENABLE_VIEWPORT_ORIENTATIONMODE:BOOL=OFF

// Build ZIP archive support. If you disable this option, you cannot use ZIP archives resource locations. The samples won't work.
OGRE_CONFIG_ENABLE_ZIP:BOOL=ON

// Enable Ogre's memory tracker in debug mode
OGRE_CONFIG_MEMTRACK_DEBUG:BOOL=OFF

// Enable Ogre's memory tracker in release mode
OGRE_CONFIG_MEMTRACK_RELEASE:BOOL=OFF

// Statically link the MS CRT dlls (msvcrt)
OGRE_CONFIG_STATIC_LINK_CRT:BOOL=OFF

// Ogre String uses the custom allocator
OGRE_CONFIG_STRING_USE_CUSTOM_ALLOCATOR:BOOL=OFF

// Enable Ogre thread support for background loading. Possible values:
		0 - Threading off.
		1 - Full background loading.
		2 - Background resource preparation.
OGRE_CONFIG_THREADS:STRING=2

// Select the library to use for thread support. Possible values:
		boost - Boost thread library.
		poco  - Poco thread library.
		tbb   - ThreadingBuildingBlocks library.
OGRE_CONFIG_THREAD_PROVIDER:STRING=tbb

// Copy dependency libs to the build directory
OGRE_COPY_DEPENDENCIES:BOOL=ON

// Path to prebuilt OGRE dependencies
OGRE_DEPENDENCIES_DIR:PATH=C:/Source/vs2013/robandkynanmakeagame/ogredeps-compiled

// Install dependency libs needed for samples
OGRE_INSTALL_DEPENDENCIES:BOOL=ON

// Install documentation.
OGRE_INSTALL_DOCS:BOOL=ON

// Install debug pdb files
OGRE_INSTALL_PDB:BOOL=ON

// Install Ogre demos.
OGRE_INSTALL_SAMPLES:BOOL=ON

// Install samples source files.
OGRE_INSTALL_SAMPLES_SOURCE:BOOL=OFF

// Install Ogre tools.
OGRE_INSTALL_TOOLS:BOOL=ON

// Install Visual Studio Property Page.
OGRE_INSTALL_VSPROPS:BOOL=OFF

// Install path for libraries, e.g. 'lib64' on some 64-bit Linux distros.
OGRE_LIB_DIRECTORY:STRING=lib

// Enable internal profiling support.
OGRE_PROFILING:BOOL=OFF

// Static build
OGRE_STATIC:BOOL=OFF

// Enable unity build for Ogre.
OGRE_UNITY_BUILD:BOOL=ON

// Number of files per compilation unit in Unity build.
OGRE_UNITY_FILES_PER_UNIT:STRING=50

// Use Boost extensions
OGRE_USE_BOOST:BOOL=ON

// Path to a file.
OIS_BINARY_DBG:FILEPATH=C:/Source/vs2013/robandkynanmakeagame/ogredeps-compiled/bin/Debug/OIS_d.dll

// Path to a file.
OIS_BINARY_REL:FILEPATH=C:/Source/vs2013/robandkynanmakeagame/ogredeps-compiled/bin/Release/OIS.dll

// x
OIS_INCLUDE_DIR:PATH=C:/Source/vs2013/robandkynanmakeagame/ogredeps-compiled/include/OIS

// x
OIS_LIBRARY_DBG:FILEPATH=C:/Source/vs2013/robandkynanmakeagame/ogredeps-compiled/lib/Debug/OIS_d.lib

// x
OIS_LIBRARY_FWK:STRING=NOTFOUND

// x
OIS_LIBRARY_REL:FILEPATH=C:/Source/vs2013/robandkynanmakeagame/ogredeps-compiled/lib/Release/OIS.lib

// Path to a file.
OPENGLES2_INCLUDE_DIR:PATH=OPENGLES2_INCLUDE_DIR-NOTFOUND

// Path to a library.
OPENGLES2_gl_LIBRARY:FILEPATH=OPENGLES2_gl_LIBRARY-NOTFOUND

// Path to a file.
OPENGLES3_INCLUDE_DIR:PATH=OPENGLES3_INCLUDE_DIR-NOTFOUND

// Path to a library.
OPENGLES3_gl_LIBRARY:FILEPATH=OPENGLES3_gl_LIBRARY-NOTFOUND

// OpenGL ES 1.x library for win32
OPENGLES_gl_LIBRARY:STRING=C:/Source/vs2013/robandkynanmakeagame/ogre/Dependencies/lib/release/libgles_cm.lib

// OpenGL library for win32
OPENGL_gl_LIBRARY:STRING=opengl32

// GLU library for win32
OPENGL_glu_LIBRARY:STRING=glu32

// pkg-config executable
PKG_CONFIG_EXECUTABLE:FILEPATH=PKG_CONFIG_EXECUTABLE-NOTFOUND

// Path to a file.
POCO_INCLUDE_DIR:PATH=POCO_INCLUDE_DIR-NOTFOUND

// Path to a library.
POCO_LIBRARY_DBG:FILEPATH=POCO_LIBRARY_DBG-NOTFOUND

// Path to a library.
POCO_LIBRARY_REL:FILEPATH=POCO_LIBRARY_REL-NOTFOUND

// x
Softimage_INCLUDE_DIR:PATH=Softimage_INCLUDE_DIR-NOTFOUND

// x
Softimage_LIBRARY:FILEPATH=Softimage_LIBRARY-NOTFOUND

// x
Softimage_SICPPSDK_LIBRARY:FILEPATH=Softimage_SICPPSDK_LIBRARY-NOTFOUND

// x
TBB_INCLUDE_DIR:PATH=C:/Source/vs2013/robandkynanmakeagame/tbb/include

// x
TBB_LIBRARY_DBG:FILEPATH=C:/Source/vs2013/robandkynanmakeagame/tbb/lib/ia32/vc11/tbb_debug.lib

// x
TBB_LIBRARY_FWK:STRING=NOTFOUND

// x
TBB_LIBRARY_REL:FILEPATH=C:/Source/vs2013/robandkynanmakeagame/tbb/lib/ia32/vc11/tbb.lib

// Path to a file.
TBB_MALLOC_INCLUDE_DIR:PATH=C:/Source/vs2013/robandkynanmakeagame/tbb/include

// Path to a library.
TBB_MALLOC_LIBRARY_DBG:FILEPATH=C:/Source/vs2013/robandkynanmakeagame/tbb/lib/ia32/vc11/tbbmalloc_debug.lib

// Path to a library.
TBB_MALLOC_LIBRARY_REL:FILEPATH=C:/Source/vs2013/robandkynanmakeagame/tbb/lib/ia32/vc11/tbbmalloc.lib

// Path to a file.
TBB_MALLOC_PROXY_INCLUDE_DIR:PATH=C:/Source/vs2013/robandkynanmakeagame/tbb/include

// Path to a library.
TBB_MALLOC_PROXY_LIBRARY_DBG:FILEPATH=C:/Source/vs2013/robandkynanmakeagame/tbb/lib/ia32/vc11/tbbmalloc_proxy_debug.lib

// Path to a library.
TBB_MALLOC_PROXY_LIBRARY_REL:FILEPATH=C:/Source/vs2013/robandkynanmakeagame/tbb/lib/ia32/vc11/tbbmalloc_proxy.lib

// Path to a file.
TINYXML_INCLUDE_DIR:PATH=TINYXML_INCLUDE_DIR-NOTFOUND

// Path to a library.
TINYXML_LIBRARIES:FILEPATH=TINYXML_LIBRARIES-NOTFOUND

// Path to a file.
Wix_BINARY_DIR:PATH=Wix_BINARY_DIR-NOTFOUND

// Path to a file.
ZLIB_INCLUDE_DIR:PATH=C:/Source/vs2013/robandkynanmakeagame/ogredeps-compiled/include

// Path to a library.
ZLIB_LIBRARY_DBG:FILEPATH=C:/Source/vs2013/robandkynanmakeagame/ogredeps-compiled/lib/Debug/zlib_d.lib

// Path to a library.
ZLIB_LIBRARY_REL:FILEPATH=C:/Source/vs2013/robandkynanmakeagame/ogredeps-compiled/lib/Release/zlib.lib

// Path to a file.
ZZip_INCLUDE_DIR:PATH=C:/Source/vs2013/robandkynanmakeagame/ogredeps-compiled/include

// Path to a library.
ZZip_LIBRARY_DBG:FILEPATH=C:/Source/vs2013/robandkynanmakeagame/ogredeps-compiled/lib/Debug/zziplib_d.lib

// Path to a library.
ZZip_LIBRARY_REL:FILEPATH=C:/Source/vs2013/robandkynanmakeagame/ogredeps-compiled/lib/Release/zziplib.lib

Code: Select all

Configuring OGRE 1.10.0unstable
Search path: C:/Source/vs2013/robandkynanmakeagame/ogredeps-compiled;C:/Source/vs2013/robandkynanmakeagame/ogre-bin/Dependencies;C:/Source/vs2013/robandkynanmakeagame/ogre/Dependencies;C:/Source/vs2013/robandkynanmakeagame/ogre-bin/../Dependencies;C:/Source/vs2013/robandkynanmakeagame/ogre/../Dependencies
Looking for ZLIB...
Could NOT find PkgConfig (missing:  PKG_CONFIG_EXECUTABLE) 
Found ZLIB: optimized;C:/Source/vs2013/robandkynanmakeagame/ogredeps-compiled/lib/Release/zlib.lib;debug;C:/Source/vs2013/robandkynanmakeagame/ogredeps-compiled/lib/Debug/zlib_d.lib
Looking for ZZip...
Could NOT find PkgConfig (missing:  PKG_CONFIG_EXECUTABLE) 
Found ZZip: optimized;C:/Source/vs2013/robandkynanmakeagame/ogredeps-compiled/lib/Release/zziplib.lib;debug;C:/Source/vs2013/robandkynanmakeagame/ogredeps-compiled/lib/Debug/zziplib_d.lib
Looking for FreeImage...
Could NOT find PkgConfig (missing:  PKG_CONFIG_EXECUTABLE) 
Found FreeImage: optimized;C:/Source/vs2013/robandkynanmakeagame/ogredeps-compiled/lib/Release/FreeImage.lib;debug;C:/Source/vs2013/robandkynanmakeagame/ogredeps-compiled/lib/Debug/FreeImage_d.lib
Looking for FREETYPE...
Could NOT find PkgConfig (missing:  PKG_CONFIG_EXECUTABLE) 
CMAKE_PREFIX_PATH: C:/Source/vs2013/robandkynanmakeagame/ogredeps-compiled;C:/Source/vs2013/robandkynanmakeagame/ogre-bin/Dependencies;C:/Source/vs2013/robandkynanmakeagame/ogre/Dependencies;C:/Source/vs2013/robandkynanmakeagame/ogre-bin/../Dependencies;C:/Source/vs2013/robandkynanmakeagame/ogre/../Dependencies
CMAKE_PREFIX_PATH: C:/Source/vs2013/robandkynanmakeagame/ogredeps-compiled;C:/Source/vs2013/robandkynanmakeagame/ogre-bin/Dependencies;C:/Source/vs2013/robandkynanmakeagame/ogre/Dependencies;C:/Source/vs2013/robandkynanmakeagame/ogre-bin/../Dependencies;C:/Source/vs2013/robandkynanmakeagame/ogre/../Dependencies
Found FREETYPE: optimized;C:/Source/vs2013/robandkynanmakeagame/ogredeps-compiled/lib/Release/freetype.lib;debug;C:/Source/vs2013/robandkynanmakeagame/ogredeps-compiled/lib/Debug/freetype_d.lib
Looking for DirectX9...
Found DirectX9: C:/Program Files (x86)/Microsoft DirectX SDK (June 2010)/Lib/x86/d3d9.lib
Looking for DirectX11...
Found DirectX11: C:/Program Files (x86)/Microsoft DirectX SDK (June 2010)/Lib/x86/d3d11.lib
Looking for Cg...
Could NOT find PkgConfig (missing:  PKG_CONFIG_EXECUTABLE) 
Found Cg: optimized;C:/Source/vs2013/robandkynanmakeagame/ogredeps-compiled/lib/Release/cg.lib;debug;C:/Source/vs2013/robandkynanmakeagame/ogredeps-compiled/lib/Debug/cg.lib
Looking for POCO...
Could NOT find PkgConfig (missing:  PKG_CONFIG_EXECUTABLE) 
Could not locate POCO
Looking for TBB...
MSVC_VERSION = 1800
Found TBB: optimized;C:/Source/vs2013/robandkynanmakeagame/tbb/lib/ia32/vc11/tbb.lib;debug;C:/Source/vs2013/robandkynanmakeagame/tbb/lib/ia32/vc11/tbb_debug.lib
Looking for TBB_MALLOC...
Found TBB_MALLOC: optimized;C:/Source/vs2013/robandkynanmakeagame/tbb/lib/ia32/vc11/tbbmalloc.lib;debug;C:/Source/vs2013/robandkynanmakeagame/tbb/lib/ia32/vc11/tbbmalloc_debug.lib
Looking for TBB_MALLOC_PROXY...
Found TBB_MALLOC_PROXY: optimized;C:/Source/vs2013/robandkynanmakeagame/tbb/lib/ia32/vc11/tbbmalloc_proxy.lib;debug;C:/Source/vs2013/robandkynanmakeagame/tbb/lib/ia32/vc11/tbbmalloc_proxy_debug.lib
Looking for GLSL_Optimizer...
Could NOT find PkgConfig (missing:  PKG_CONFIG_EXECUTABLE) 
Could not locate GLSL_Optimizer
Looking for HLSL2GLSL...
Could NOT find PkgConfig (missing:  PKG_CONFIG_EXECUTABLE) 
Could not locate HLSL2GLSL
Looking for OIS...
Could NOT find PkgConfig (missing:  PKG_CONFIG_EXECUTABLE) 
Found OIS: optimized;C:/Source/vs2013/robandkynanmakeagame/ogredeps-compiled/lib/Release/OIS.lib;debug;C:/Source/vs2013/robandkynanmakeagame/ogredeps-compiled/lib/Debug/OIS_d.lib
Could NOT find Doxygen (missing:  DOXYGEN_EXECUTABLE) 
Looking for Softimage...
Could not locate Softimage
Could NOT find TinyXML (missing:  TINYXML_INCLUDE_DIR TINYXML_LIBRARIES) 
Looking for CppUnit...
Could NOT find PkgConfig (missing:  PKG_CONFIG_EXECUTABLE) 
Could not locate CppUnit

-----------------------------------------------------------------------------
-- The following external packages were located on your system.
-- This installation will have the extra features provided by these packages.
+ zlib
+ zziplib
+ freeimage
+ freetype
+ OpenGL
+ OpenGL 3+
+ OpenGL ES 1.x
+ OpenGL ES 2.x
+ OpenGL ES 3.x
+ DirectX9
+ DirectX11
+ cg
+ boost
+ boost-thread
+ boost-date_time
+ boost-system
+ boost-chrono
+ boost-atomic
+ tbb
+ OIS
-----------------------------------------------------------------------------
-- The following OPTIONAL packages could NOT be located on your system.
-- Consider installing them to enable more features from this software.
+ POCO: POCO framework <http://pocoproject.org/>
+ GLSL Optimizer: GLSL Optimizer <http://github.com/aras-p/glsl-optimizer/>
+ HLSL2GLSL: HLSL2GLSL <http://hlsl2glslfork.googlecode.com/>
+ Doxygen: Tool for building API documentation <http://doxygen.org>
+ Softimage: Softimage SDK needed for building XSIExporter <FALSE>
+ TinyXML: TinyXML needed for building OgreXMLConverter <FALSE>
+ CppUnit: Library for performing unit tests <http://cppunit.sourceforge.net>
-----------------------------------------------------------------------------

Creating Unity build files for target OgreMain
  C:/Source/vs2013/robandkynanmakeagame/ogre-bin/OgreMain/compile_OgreMain_0.cpp is up to date.
  C:/Source/vs2013/robandkynanmakeagame/ogre-bin/OgreMain/compile_OgreMain_1.cpp is up to date.
  C:/Source/vs2013/robandkynanmakeagame/ogre-bin/OgreMain/compile_OgreMain_2.cpp is up to date.
  C:/Source/vs2013/robandkynanmakeagame/ogre-bin/OgreMain/compile_OgreMain_3.cpp is up to date.
Creating Unity build files for target RenderSystem_Direct3D11
  C:/Source/vs2013/robandkynanmakeagame/ogre-bin/RenderSystem_Direct3D11/compile_RenderSystem_Direct3D11_0.cpp is up to date.
Creating Unity build files for target RenderSystem_GL
  C:/Source/vs2013/robandkynanmakeagame/ogre-bin/RenderSystem_GL/compile_RenderSystem_GL_0.cpp is up to date.
Creating Unity build files for target Plugin_OctreeSceneManager
  C:/Source/vs2013/robandkynanmakeagame/ogre-bin/Plugin_OctreeSceneManager/compile_Plugin_OctreeSceneManager_0.cpp is up to date.
Creating Unity build files for target Plugin_BSPSceneManager
  C:/Source/vs2013/robandkynanmakeagame/ogre-bin/Plugin_BSPSceneManager/compile_Plugin_BSPSceneManager_0.cpp is up to date.
Creating Unity build files for target Plugin_CgProgramManager
  C:/Source/vs2013/robandkynanmakeagame/ogre-bin/Plugin_CgProgramManager/compile_Plugin_CgProgramManager_0.cpp is up to date.
Creating Unity build files for target Plugin_ParticleFX
  C:/Source/vs2013/robandkynanmakeagame/ogre-bin/Plugin_ParticleFX/compile_Plugin_ParticleFX_0.cpp is up to date.
Creating Unity build files for target Plugin_PCZSceneManager
  C:/Source/vs2013/robandkynanmakeagame/ogre-bin/Plugin_PCZSceneManager/compile_Plugin_PCZSceneManager_0.cpp is up to date.
Creating Unity build files for target Plugin_OctreeZone
  C:/Source/vs2013/robandkynanmakeagame/ogre-bin/Plugin_OctreeZone/compile_Plugin_OctreeZone_0.cpp is up to date.
Creating Unity build files for target OgrePaging
  C:/Source/vs2013/robandkynanmakeagame/ogre-bin/OgrePaging/compile_OgrePaging_0.cpp is up to date.
Creating Unity build files for target OgreMeshLodGenerator
  C:/Source/vs2013/robandkynanmakeagame/ogre-bin/OgreMeshLodGenerator/compile_OgreMeshLodGenerator_0.cpp is up to date.
Creating Unity build files for target OgreProperty
  C:/Source/vs2013/robandkynanmakeagame/ogre-bin/OgreProperty/compile_OgreProperty_0.cpp is up to date.
Creating Unity build files for target OgreTerrain
  C:/Source/vs2013/robandkynanmakeagame/ogre-bin/OgreTerrain/compile_OgreTerrain_0.cpp is up to date.
Creating Unity build files for target OgreRTShaderSystem
  C:/Source/vs2013/robandkynanmakeagame/ogre-bin/OgreRTShaderSystem/compile_OgreRTShaderSystem_0.cpp is up to date.
Creating Unity build files for target OgreVolume
  C:/Source/vs2013/robandkynanmakeagame/ogre-bin/OgreVolume/compile_OgreVolume_0.cpp is up to date.
Creating Unity build files for target OgreOverlay
  C:/Source/vs2013/robandkynanmakeagame/ogre-bin/OgreOverlay/compile_OgreOverlay_0.cpp is up to date.
Creating Unity build files for target Sample_PNTriangles
  C:/Source/vs2013/robandkynanmakeagame/ogre-bin/Sample_PNTriangles/compile_Sample_PNTriangles_0.cpp is up to date.
Creating Unity build files for target Sample_DeferredShading
  C:/Source/vs2013/robandkynanmakeagame/ogre-bin/Sample_DeferredShading/compile_Sample_DeferredShading_0.cpp is up to date.
Creating Unity build files for target SampleBrowser
  C:/Source/vs2013/robandkynanmakeagame/ogre-bin/SampleBrowser/compile_SampleBrowser_0.cpp is up to date.
Creating Unity build files for target OgreXMLConverter
  C:/Source/vs2013/robandkynanmakeagame/ogre-bin/OgreXMLConverter/compile_OgreXMLConverter_0.cpp is up to date.
Creating Unity build files for target OgreMeshUpgrader
  C:/Source/vs2013/robandkynanmakeagame/ogre-bin/OgreMeshUpgrader/compile_OgreMeshUpgrader_0.cpp is up to date.

----------------------------------------------------------------------------
  FEATURE SUMMARY
----------------------------------------------------------------------------

Building components:
  + Paging
  + MeshLodGenerator
  + Property
  + Terrain
  + RTShader System
  + RTShader System Core Shaders
  + RTShader System Extensions Shaders
  + Volume
  + Overlay
Building plugins:
  + BSP scene manager
  + Cg program manager
  + Octree scene manager
  + Portal connected zone scene manager
  + Particle FX
Building rendersystems:
  + Direct3D 11
  + OpenGL
Building executables:
  + Samples
  + Tools
Building core features:
  + Mesh Lod
  + DDS image codec
  + FreeImage codec
  + ZIP archives

Build type:                      dynamic
Threading support:               background (tbb)
Use double precision:            disabled
Assert mode:                     standard
Allocator type:                  nedmalloc (pooling)
STL containers use allocator:    enabled
Strings use allocator:           disabled
Memory tracker (debug):          disabled
Memory tracker (release):        disabled
Use Boost:                       enabled

----------------------------------------------------------------------------
Notice anything wrong?
Last edited by kynan on Mon Dec 23, 2013 4:42 am, edited 1 time in total.
User avatar
c6burns
Beholder
Posts: 1512
Joined: Fri Feb 22, 2013 4:44 am
Location: Deep behind enemy lines
x 138

Re: CMake can't find TBB / Building Ogre with TBB

Post by c6burns »

Copy the TBB dlls into the working dirs?

Clearly the project didn't generate a postbuild to do it for you
kynan
Gnoblar
Posts: 6
Joined: Wed Jul 04, 2012 6:24 am

Re: CMake can't find TBB / Building Ogre with TBB

Post by kynan »

I was wondering if I'd misconfigured something so that it wasn't copying the TBB dlls. I'll try copying them myself. Thanks.
kynan
Gnoblar
Posts: 6
Joined: Wed Jul 04, 2012 6:24 am

Re: CMake can't find TBB / Building Ogre with TBB

Post by kynan »

UPDATE: I gave up and just filled in the TBB_* CMake config entries by hand. Seems to build and run ok now.

I can't get CMake to detect TBB any more. :(

I copied the vc11 dlls from the TBB binary distribution into the Ogre install dir, but that didn't work. Then I built the vc12 dlls from the TBB source and copied those into the Ogre install dir. Then I could run the sample browser.

I decided to copy the vc12 binaries I built into bin/lib folders parallel to the vc11 binaries that were already included. I used these scripts that I wrote:

TBB_INSTALL.bat

Code: Select all

CALL TBB_COPY.bat ia32 Release release
CALL TBB_COPY.bat ia32 Release minsizerel
CALL TBB_COPY.bat ia32 Release relwithdebinfo
CALL TBB_COPY.bat ia32 Debug debug
pause
TBB_COPY.bat

Code: Select all

:: read parameters ARCH, CONFIGURATION, OGRE_CONFIGURATION
SET ARCH=%1
SET CONFIGURATION=%2
SET OGRE_CONFIGURATION=%3

SET VS_OUTPUT_DIR=%TBB_SRC_HOME%\build\vs2010\%ARCH%\%CONFIGURATION%
SET OGRE_INSTALL_DIR=%OGRE_HOME%\bin\%OGRE_CONFIGURATION%\
SET TBB_INSTALL_BIN=%TBB_HOME%\bin\%ARCH%\vc12\
SET TBB_INSTALL_LIB=%TBB_HOME%\lib\%ARCH%\vc12\

echo copying from %VS_OUTPUT_DIR%
echo   to ogre: %OGRE_INSTALL_DIR%
echo   to tbb/bin: %TBB_INSTALL_BIN%
echo   to tbb/bin: %TBB_INSTALL_LIB%

:: copy pdb and dll from VS output (build\vs2010\ARCH\CONFIGURATION)
::   to bin install dir (bin\ARCH\vc12)
XCOPY %VS_OUTPUT_DIR%\*.pdb %TBB_INSTALL_BIN% /D /Y /I
XCOPY %VS_OUTPUT_DIR%\*.dll %TBB_INSTALL_BIN% /D /Y /I
::   to Ogre install dir (%OGRE_HOME%)
XCOPY %VS_OUTPUT_DIR%\*.pdb %OGRE_INSTALL_DIR% /D /Y /I
XCOPY %VS_OUTPUT_DIR%\*.dll %OGRE_INSTALL_DIR% /D /Y /I

:: copy def, pdb, and lib from VS output (build\vs2010\ARCH\CONFIGURATION)
::   to lib install dir (lib\ARCH\vc12)
XCOPY %VS_OUTPUT_DIR%\*.def %TBB_INSTALL_LIB% /D /Y /I
XCOPY %VS_OUTPUT_DIR%\*.pdb %TBB_INSTALL_LIB% /D /Y /I
XCOPY %VS_OUTPUT_DIR%\*.lib %TBB_INSTALL_LIB% /D /Y /I
I also ran "tbbvars.bat ia32 vc2013" and set TBB_HOME and TBB_SRC_HOME so my env looks like this from 'set tbb':

Code: Select all

TBBROOT=c:\Source\vs2013\robandkynanmakeagame\tbb\bin\..
TBB_ARCH_PLATFORM=ia32\vc12
TBB_BIN_DIR=c:\Source\vs2013\robandkynanmakeagame\tbb\bin\
TBB_HOME=C:\Source\vs2013\robandkynanmakeagame\tbb
TBB_SRC_HOME=C:\Source\vs2013\robandkynanmakeagame\tbb-src
TBB_TARGET_ARCH=ia32
TBB_TARGET_VS=vc12
I tried "tbbvars.bat ia32 vc2012" and changed "vc12" back to "vc11" in this bit I added when I first got CMake to find TBB:

Code: Select all

  if (MSVC_VERSION EQUAL 1800)
    set(COMPILER_PREFIX "vc11")
  endif ()
but CMake isn't finding TBB any more.
asachkov
Gnoblar
Posts: 2
Joined: Sun Mar 02, 2014 3:42 am
Location: Vancouver, Canada

Re: [Solved] CMake can't find TBB / Building Ogre with TBB

Post by asachkov »

just recently ran into the same problem (TBB not found) while using the prebuilt tbb libraries for windows.
I made it work by adding a new CMake variable TBB_ROOT set to the tbb main directory path as per the OGRE build manual and by making the following changes to the FindTBB.cmake file located in SomeOgreRoot/CMake/Packages/ :

Original:

Code: Select all

if (WIN32 AND MSVC)
  set(COMPILER_PREFIX "vc7.1")
  if (MSVC_VERSION EQUAL 1400)
    set(COMPILER_PREFIX "vc8")
  endif ()
  if (MSVC_VERSION EQUAL 1500)
    set(COMPILER_PREFIX "vc9")
  endif ()
  if (MSVC_VERSION EQUAL 1600)
    set(COMPILER_PREFIX "vc10")
  endif ()
  
  # for each prefix path, add ia32/64\${COMPILER_PREFIX}\lib to the lib search path
  foreach (dir ${TBB_PREFIX_PATH})
    if (CMAKE_CL_64)
      list(APPEND TBB_LIB_SEARCH_PATH ${dir}/ia64/${COMPILER_PREFIX}[color=#FF0000]/lib[/color])
      list(APPEND TBB_LIB_SEARCH_PATH ${dir}/lib/ia64/${COMPILER_PREFIX})
      list(APPEND TBB_LIB_SEARCH_PATH ${dir}/intel64/${COMPILER_PREFIX}[color=#FF0000]/lib[/color])
      list(APPEND TBB_LIB_SEARCH_PATH ${dir}/lib/intel64/${COMPILER_PREFIX})
    else ()
      list(APPEND TBB_LIB_SEARCH_PATH ${dir}/ia32/${COMPILER_PREFIX}[color=#FF0000]/lib[/color])
      list(APPEND TBB_LIB_SEARCH_PATH ${dir}/lib/ia32/${COMPILER_PREFIX})
    endif ()
  endforeach ()
endif ()

Modified:

Code: Select all

if (WIN32 AND MSVC)
  set(COMPILER_PREFIX "vc7.1")
  if (MSVC_VERSION EQUAL 1400)
    set(COMPILER_PREFIX "vc8")
  endif ()
  if (MSVC_VERSION EQUAL 1500)
    set(COMPILER_PREFIX "vc9")
  endif ()
  if (MSVC_VERSION EQUAL 1600)
    set(COMPILER_PREFIX "vc10")
  endif ()
  [color=#00FF40]if (MSVC_VERSION EQUAL 1700)
    set(COMPILER_PREFIX "vc11")
  endif ()
  if (MSVC_VERSION EQUAL 1800)
    set(COMPILER_PREFIX "vc12")
  endif ()[/color]
  
  # for each prefix path, add ia32/64\${COMPILER_PREFIX}\lib to the lib search path
  foreach (dir ${TBB_PREFIX_PATH})
    if (CMAKE_CL_64)
      list(APPEND TBB_LIB_SEARCH_PATH ${dir}/ia64/${COMPILER_PREFIX})
      list(APPEND TBB_LIB_SEARCH_PATH ${dir}/lib/ia64/${COMPILER_PREFIX})
      list(APPEND TBB_LIB_SEARCH_PATH ${dir}/intel64/${COMPILER_PREFIX})
      list(APPEND TBB_LIB_SEARCH_PATH ${dir}/lib/intel64/${COMPILER_PREFIX})
    else ()
      list(APPEND TBB_LIB_SEARCH_PATH ${dir}/ia32/${COMPILER_PREFIX})
      list(APPEND TBB_LIB_SEARCH_PATH ${dir}/lib/ia32/${COMPILER_PREFIX})
    endif ()
  endforeach ()
endif ()
Hope this helps 8)
User avatar
Klaim
Old One
Posts: 2565
Joined: Sun Sep 11, 2005 1:04 am
Location: Paris, France
x 56
Contact:

Re: [Solved] CMake can't find TBB / Building Ogre with TBB

Post by Klaim »

Which version of TBB sources do you use for this to work with?
asachkov
Gnoblar
Posts: 2
Joined: Sun Mar 02, 2014 3:42 am
Location: Vancouver, Canada

Re: [Solved] CMake can't find TBB / Building Ogre with TBB

Post by asachkov »

I used the latest one 4.2 update 3 for windows
Post Reply