I've only a basic understanding of CMake, but I have trouble using it for the latest SVN version.
I'm building scripts for VS2005, but when trying to compile, there is a failure for the D3D render systems.
Basically, d3d9.lib and d3d10.lib are added in the properties of the project, but not the directories in the "Additional Library Directories".
I found this earlier post of PolyVox :
PolyVox wrote:I tried it on Windows and it basically worked with a couple of problems.
Firstly the Direct3D9 RenderSystem didn't build because it couldn't find the .lib. This was a simple oversight, as the variable 'DirectX_LIBRARY_PATHS' had been defined by the FindDirectX.cmake script but wasn't being used. I fixed this by adding:
Code: Select all
link_directories(${DirectX_LIBRARY_PATHS})
to the Direct3D9 CmakeLists.txt
Secondly, it didn't find OIS or CEGUI and so was unable to build the samples. I didn't know how to fix this because I didn't know how it was trying to find them (I didn't see a FindOIS.cmake file). Any tips?
It didn't find Cg either, but I can investigate that a bit.
From what I've seen in CMake files, there is always "link_directories(${DirectX_LIBRARY_PATHS})" in the CMakeLists.txt in the directory of the D3D9 render system, but in the FIndDirectX.cmake in CMake/Packages on svn, between revision 8449 and 8520,
Code: Select all
set(DirectX_LIBRARY_PATHS)
if(CMAKE_CL_64)
set(DirectX_LIBRARY_PATHS
"${DirectX_ROOT_DIR}/Lib/x64")
else(CMAKE_CL_64)
set(DirectX_LIBRARY_PATHS
"${DirectX_ROOT_DIR}/Lib/x86" "${DirectX_ROOT_DIR}/Lib")
endif(CMAKE_CL_64)
has been changed to
Code: Select all
if(CMAKE_CL_64)
set(DirectX_LIBPATH_SUFFIX "x64")
else(CMAKE_CL_64)
set(DirectX_LIBPATH_SUFFIX "x86")
endif(CMAKE_CL_64)
And DirectX_LIBRARY_PATHS is nowhere else to be found in the Ogre directory.
Moreover I don't know why but Cmake doesn't seem to be able to assign a value to DirectX_ROOT_DIR. It is marked as "NOT_FOUND" in the cache, where DirectX_INCLUDE_DIR from which it seems to be derived is ok. So even with the above code DirectX_LIBRARY_PATHS woulnd't work.
Strangely, I can't manually change the value of DirectX_ROOT_DIR, clicking configure resets it's value to NOT_FOUND and generate is disabled when a change is made in a value...And why is DirectX_INCLUDE_DIR defined as PATH in CMakeCache and DirectX_ROOT_DIR as STRING ?
I'm gonna end adding the path to lib directories manually in VS2005, but what am I missin here ?