My Cmake thread

Support for running, installing or compiling OpenMW
Locked
User avatar
lgromanowski
Site Admin
Posts: 1193
Joined: 05 Aug 2011, 22:21
Location: Wroclaw, Poland
Contact:

My Cmake thread

Post by lgromanowski »

Star-Demon wrote: Let's do this. This is today's thing for getting me set up.

Okay, after changing from VS2010 x64 (that's my platform...) I changed it to VS2010 and then hit configure...this is what came up.

Code: Select all

Check for working C compiler using: Visual Studio 10
Check for working C compiler using: Visual Studio 10 -- works
Detecting C compiler ABI info
Detecting C compiler ABI info - done
Check for working CXX compiler using: Visual Studio 10
Check for working CXX compiler using: Visual Studio 10 -- works
Detecting CXX compiler ABI info
Detecting CXX compiler ABI info - done
Looking for OGRE
Using OGRE SDK
  libraries : debug;OgreMain_d;optimized;OgreMain from H:/Development/Libraries/OGRE3D/lib
  includes  : H:/Development/Libraries/OGRE3D/include
CMake Error at C:/Program Files (x86)/CMake 2.8/share/cmake-2.8/Modules/FindBoost.cmake:910 (message):
  Unable to find the requested Boost libraries.

  Unable to find the Boost header files.  Please set BOOST_ROOT to the root
  directory containing Boost or BOOST_INCLUDEDIR to the directory containing
  Boost's headers.
Call Stack (most recent call first):
  CMakeLists.txt:173 (find_package)


Looking for OIS...
OIS_PREFIX_PATH changed.
Found OIS: optimized;H:/Development/Libraries/OGRE3D/lib/release/OIS.lib;debug;H:/Development/Libraries/OGRE3D/lib/debug/OIS_d.lib
CMake Error at C:/Program Files (x86)/CMake 2.8/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:70 (MESSAGE):
  Could NOT find OpenAL (missing: OPENAL_LIBRARY OPENAL_INCLUDE_DIR)
Call Stack (most recent call first):
  C:/Program Files (x86)/CMake 2.8/share/cmake-2.8/Modules/FindOpenAL.cmake:101 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
  CMakeLists.txt:175 (find_package)


Configuring incomplete, errors occurred!
Huh? I installed OIS the other day. OpenAL?

Okay...so I redownloaded and used the boostpro installer.

Let's run CMake again.

Code: Select all

Check for working C compiler using: Visual Studio 10
Check for working C compiler using: Visual Studio 10 -- works
Detecting C compiler ABI info
Detecting C compiler ABI info - done
Check for working CXX compiler using: Visual Studio 10
Check for working CXX compiler using: Visual Studio 10 -- works
Detecting CXX compiler ABI info
Detecting CXX compiler ABI info - done
Looking for OGRE
Using OGRE SDK
  libraries : debug;OgreMain_d;optimized;OgreMain from H:/Development/Libraries/OGRE3D/lib
  includes  : H:/Development/Libraries/OGRE3D/include
CMake Error at C:/Program Files (x86)/CMake 2.8/share/cmake-2.8/Modules/FindBoost.cmake:910 (message):
  Unable to find the requested Boost libraries.

  Unable to find the Boost header files.  Please set BOOST_ROOT to the root
  directory containing Boost or BOOST_INCLUDEDIR to the directory containing
  Boost's headers.
Call Stack (most recent call first):
  CMakeLists.txt:173 (find_package)


Looking for OIS...
OIS_PREFIX_PATH changed.
Found OIS: optimized;H:/Development/Libraries/OGRE3D/lib/release/OIS.lib;debug;H:/Development/Libraries/OGRE3D/lib/debug/OIS_d.lib
CMake Error at C:/Program Files (x86)/CMake 2.8/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:70 (MESSAGE):
  Could NOT find OpenAL (missing: OPENAL_LIBRARY OPENAL_INCLUDE_DIR)
Call Stack (most recent call first):
  C:/Program Files (x86)/CMake 2.8/share/cmake-2.8/Modules/FindOpenAL.cmake:101 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
  CMakeLists.txt:175 (find_package)


Configuring incomplete, errors occurred!
Hey it didn't do the thing I wanted it to do. Stupid installer not doing what i wanted it to do...okay....I gotta set this myself...

setx BOOST_ROOT tothepath

okay!

Code: Select all

Check for working C compiler using: Visual Studio 10
Check for working C compiler using: Visual Studio 10 -- works
Detecting C compiler ABI info
Detecting C compiler ABI info - done
Check for working CXX compiler using: Visual Studio 10
Check for working CXX compiler using: Visual Studio 10 -- works
Detecting CXX compiler ABI info
Detecting CXX compiler ABI info - done
Looking for OGRE
Using OGRE SDK
  libraries : debug;OgreMain_d;optimized;OgreMain from H:/Development/Libraries/OGRE3D/lib
  includes  : H:/Development/Libraries/OGRE3D/include
Boost version: 1.44.0
Found the following Boost libraries:
  system
  filesystem
  program_options
  thread
Looking for OIS...
OIS_PREFIX_PATH changed.
Found OIS: optimized;H:/Development/Libraries/OGRE3D/lib/release/OIS.lib;debug;H:/Development/Libraries/OGRE3D/lib/debug/OIS_d.lib
CMake Error at C:/Program Files (x86)/CMake 2.8/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:70 (MESSAGE):
  Could NOT find OpenAL (missing: OPENAL_LIBRARY OPENAL_INCLUDE_DIR)
Call Stack (most recent call first):
  C:/Program Files (x86)/CMake 2.8/share/cmake-2.8/Modules/FindOpenAL.cmake:101 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
  CMakeLists.txt:175 (find_package)


Configuring incomplete, errors occurred!
Heh. installer install worked better. BOOSTpro just installed a directory deeper than I wanted.

Hmmm...help on the OIS thing? I thought I installed it. Did I forget something?
Zini wrote: From what I see you don't have an OIS problem. You have an OpenAL problem. Either you did not install OpenAL or there is a path problem again. Windows is just so messy ... :(
Star-Demon wrote:
Zini wrote:From what I see you don't have an OIS problem. You have an OpenAL problem. Either you did not install OpenAL or there is a path problem again. Windows is just so messy ... :(
I followed the insturctions on the wiki :)

Let's get that in...OpenAL...have I heard that before...?

"OpenAL is a cross-platform 3D audio API appropriate for use with gaming applications and many other types of audio applications."

Yes, I have. I was thinking of using this when I saw the big fat fail of SDL's audio library. God, I hate SDL now. SDL is like my ex.

okay - lemme get on this, if there's any pitfalls I should know post up - but I think it's time I made a priority around rewriting the Setup wiki. It's missing a lot and it needs to be split up between different platforms. A platform per page - I'll volunteer to help write the windows one, because it looks like by the time I'm finally done, I'll probably know of every problem you could get, haha!
Zini wrote: You also need at least one of these:

1. Audiere

2. ffmpeg

3. mpg123 and libsndfile

I am not even sure if #3 exists for Windows.

Also, make sure you adjust your options in CMakeCache.txt. The options are USE_AUDIERE, USE_FFMPEG and USE_MPG123. Only one of these should be ON, the other two should be OFF.
Star-Demon wrote: The library version installs an install to an OPENAL directory, which looks exactly like itself. Whaaa?

So I installed the SDK, set the varibles OPENAL_LIBRARY to the win64 folder, and the OPENAL_INCLUDE_DIR to the include directory...

Same output for cmake...

Hmmm.

as for the three audio things - I did #2... I unzipped it...What next? Not sure if I have to set anything else.
Star-Demon wrote: Oh hey! The gui has a thing where you can pick where the library IS instead of setting the hard way! let's see if that works.

...nope. It hates me. Now I have four errors after reconfig.

Well, I'm making progress!
Star-Demon wrote: Here's what I got now:

Image
Star-Demon wrote: All that's left is this and I can use Cmake.

Image
Zini wrote: Looks like you are still missing OpenAL and FFMPEG. The error description you gave in the other thread might indicate, that this is not a cmake problem, but an OpenAL installation problem. What you describe certainly doesn't sound as if OpenAL has been installed correctly.
Star-Demon wrote: Well, seems their installer doesn't install, then. Wonder if there's another way?
Star-Demon wrote: I...think I did it.

Image

*hits generate*

...Oh my god, it worked.

Image

Am I done?
Zini wrote: Looks like you are still missing parts of FFmpeg. The compile phase probably will work, but I would expect the link phase to fail.
Star-Demon wrote: Hah!

Code: Select all

========== Build: 4 succeeded, 2 failed, 0 up-to-date, 1 skipped ==========
Okay, look at the errors:

Code: Select all

3>..\..\..\..\openmw\extern\mygui_3.0.1\MyGUIEngine\src\MyGUI_ResourceTrueTypeFont.cpp(29): fatal error C1083: Cannot open include file: 'ft2build.h': No such file or directory

6>..\..\..\openmw\libs\mangle\sound\outputs\openal_out.cpp(7): fatal error C1083: Cannot open include file: 'AL/al.h': No such file or directory
6>  ffmpeg_source.cpp

6>H:\Development\Libraries\ffmpeg-0.6\libavcodec\avcodec.h(30): fatal error C1083: Cannot open include file: 'libavutil/avutil.h': No such file or directory
6>  main.cpp

6>..\..\..\openmw\apps\openmw\mwscript\scriptmanager.cpp(50): warning C4101: 'error' : unreferenced local variable
The first 3 are interesting. The last one is ???. a std::Exception Error in a catch block. that exception is referenced in two AV files among a bunch of others, so maybe once find some actual libraries and try again they'll all go away.

FFMpeg has no libraries in its download, it's just source...Don't tell me that I have to set up and compile that, too.
Zini wrote: The warning is harmless. You can ignore it for now (but I just pushed a new commit, that will remove it). No idea about the errors. They are Windows setup specific.
Star-Demon wrote:
Zini wrote:The warning is harmless. You can ignore it for now (but I just pushed a new commit, that will remove it). No idea about the errors. They are Windows setup specific.
There were lots of warnings. Did I accidentally paste one in? Thought I copied only the errors...


Ohhh the last one. That's what I get for CTRL-Fing and just copying. Hah!
athile wrote: I'm pretty sure I mentioned it in another thread, but...

#include <AL/al.h>

...is unfortunately NOT cross-platform. The OpenAL distributable on Windows does not put al.h under an AL sub-directory (see FindOpenAL.cmake, it specifically points this out). The source needs to be modified to just be #include "al.h" and, maybe, the root CMakeLists.txt needs to be modified to explicitly add:

include_directories(OPENAL_INCLUDEDIRS)

I'm trying to get my own compile working at the moment to test this...but as I've mentioned I only have access to a netbook currently. Compiles take roughly forever plus 10 minutes on this thing.
nicolay wrote:
athile wrote:I'm pretty sure I mentioned it in another thread, but...

#include <AL/al.h>

...is unfortunately NOT cross-platform. The OpenAL distributable on Windows does not put al.h under an AL sub-directory (see FindOpenAL.cmake, it specifically points this out).
Thanks for figuring this out and fixing it. This is a pretty silly choice by Creative - all tutorials and documentation I can find says #include <AL/al.h>. And pkg-config --cflags openal on Linux doesn't even list anything, which means that including just <al.h> isn't even supposed to WORK on Linux using standard tools. *sigh*

As you point out though, CMake seems to be on top of things, so let's put our trust in that.
Locked