CMake on win32

Trying to build your own version of Vega Strike and having problems? Unix users, paste your config.log here (stderr output alone is not helpful).
Post Reply
pheonixstorm
Elite
Elite
Posts: 1567
Joined: Tue Jan 26, 2010 2:03 am

CMake on win32

Post by pheonixstorm »

Starting playing with cmake tonight and have been run over by errors. So far I ave had to manually input every include and library file outside of vegastrike, including add-in libs/includes such as libpng, zlib, etc. Unless we rebuild the vegastrike directory structure I don't think CMake will *make* it as a cross platform tool win side. I don't see a lot of win32 users wanting to use it as it stands to get a VC solution built using it.
Because of YOU Arbiter, MY kids? can't get enough gas. OR NIPPLE! How does that mkae you feeeel? ~ Halo
pheonixstorm
Elite
Elite
Posts: 1567
Joined: Tue Jan 26, 2010 2:03 am

Re: CMake on win32

Post by pheonixstorm »

safemode, does the CMake list in the vegastrike folder have all the currently used files for the vegastrike binary? I'm looking to use the SET(VEGASTRIKE_SOURCES to rebuild the VC solution w/o all the extra garbage files. To me it looks like there are a huge number of files still in the source tree that do nothing but take up space.
Because of YOU Arbiter, MY kids? can't get enough gas. OR NIPPLE! How does that mkae you feeeel? ~ Halo
pheonixstorm
Elite
Elite
Posts: 1567
Joined: Tue Jan 26, 2010 2:03 am

Re: CMake on win32

Post by pheonixstorm »

Got most of it to parse.. though its stopped on not being able to find gtk2 but I see no reference to gtk2 in the gui or in the cmakelists.txt file. Giving up for the night to go back to backing up my hd. Gotta reinstall xp and vista and find out if im going to need to rma my vid card.
Because of YOU Arbiter, MY kids? can't get enough gas. OR NIPPLE! How does that mkae you feeeel? ~ Halo
safemode
Developer
Developer
Posts: 2150
Joined: Mon Apr 23, 2007 1:17 am
Location: Pennsylvania
Contact:

Re: CMake on win32

Post by safemode »

gtk searching is a module *.cmake Cmake auto parses any modules in the current directory as things it needs to search for and detect. gtk is there.

95% of getting cmake to correctly work in windows land will be just adding win32 paths to the search path variable in these modules and any others that fail.
Ed Sweetman endorses this message.
pheonixstorm
Elite
Elite
Posts: 1567
Joined: Tue Jan 26, 2010 2:03 am

Re: CMake on win32

Post by pheonixstorm »

So in CMakelists should there be a section like this

Code: Select all

find_package(FFMPEG)
IF(FFMPEG_FOUND)
	SET(TST_INCLUDES ${TST_INCLUDES} ${FFMPEG_INCLUDE_DIRS})
	SET(TST_LIBS ${TST_LIBS} ${FFMPEG_LIBRARIES})
	add_definitions(${FFMPEG_DEFINITIONS})
	SET(HAVE_FFMPEG 1 )
	IF(swscale1_FOUND)
		SET(HAVE_FFMPEG_SWSCALE_H 1)
	ENDIF(swscale1_FOUND)
ELSE(FFMPEG_FOUND)
	message("What the hell, no FFMpeg")
ENDIF(FFMPEG_FOUND)
for GTK? The only other section I can't figure out is when it looks for

Code: Select all

#FIND_LIBRARY(DL_LIB dl)
#FIND_LIBRARY(UTIL_LIB util)
They both allow for paths but it doesn't say what either of those are. Anyway, here is the complete error set I am getting

Code: Select all

CMake Error at E:/CMake 2.8/share/cmake-2.8/Modules/FindBoost.cmake:511 (FILE):
  file Internal CMake error when trying to open file: E:/source
  directory/vegastrike2/vegastrike/boost/version.hpp for reading.
Call Stack (most recent call first):
  CMakeLists.txt:566 (find_package)


CMake Error at E:/CMake 2.8/share/cmake-2.8/Modules/FindBoost.cmake:524 (MATH):
  math cannot parse the expression: " / 100000": syntax error, unexpected
  exp_DIVIDE, expecting exp_OPENPARENT or exp_NUMBER (2)
Call Stack (most recent call first):
  CMakeLists.txt:566 (find_package)


CMake Error at E:/CMake 2.8/share/cmake-2.8/Modules/FindBoost.cmake:525 (MATH):
  math cannot parse the expression: " / 100 % 1000": syntax error, unexpected
  exp_DIVIDE, expecting exp_OPENPARENT or exp_NUMBER (2)
Call Stack (most recent call first):
  CMakeLists.txt:566 (find_package)


CMake Error at E:/CMake 2.8/share/cmake-2.8/Modules/FindBoost.cmake:526 (MATH):
  math cannot parse the expression: " % 100": syntax error, unexpected
  exp_MOD, expecting exp_OPENPARENT or exp_NUMBER (2)
Call Stack (most recent call first):
  CMakeLists.txt:566 (find_package)


Could NOT find Boost
-- Using Internal Boost !
-- OpenGL found : glu32;opengl32
-- GLUT found : E:/source directory/vegastrike2/vegastrike
-- Found OpenAL
-- SDL Found
Found Vorbis: E:/source directory/vegastrike2/vegastrike;E:/source directory/vegastrike2/vegastrike;E:/source directory/vegastrike2/vegastrike
checking for module 'libavcodec'
  package 'libavcodec' not found
CMake Error at E:/CMake 2.8/share/cmake-2.8/Modules/FindPkgConfig.cmake:259 (message):
  A required package was not found
Call Stack (most recent call first):
  E:/CMake 2.8/share/cmake-2.8/Modules/FindPkgConfig.cmake:311 (_pkg_check_modules_internal)
  FindFFMPEG.cmake:26 (pkg_check_modules)
  CMakeLists.txt:697 (find_package)


checking for module 'libswscale'
  package 'libswscale' not found
Found FFmpeg: E:/source directory/vegastrike2/vegastrike;E:/source directory/vegastrike2/vegastrike;E:/source directory/vegastrike2/vegastrike
Cant get GTK2 found
Building with CFLAGS:  /DWIN32 /D_WINDOWS /W3 /Zm1000 /EHsc /GR
Configuring incomplete, errors occurred!
Because of YOU Arbiter, MY kids? can't get enough gas. OR NIPPLE! How does that mkae you feeeel? ~ Halo
safemode
Developer
Developer
Posts: 2150
Joined: Mon Apr 23, 2007 1:17 am
Location: Pennsylvania
Contact:

Re: CMake on win32

Post by safemode »

No, what you see in cmakelist is inline module searches. Like instead of having a separate ffmpeg.cmake file, it's done in the cmakelist file. With cmake, you can do it both ways. For gtk, and other more complex dependencies, we just whip them up in their own files.

cmake will auto-load anything with .cmake extension in the current directory as the CMakelist file. gtk is one of those .cmake files, that's where you'll find the search paths.

The errors you posted are due to the version.hpp file not being readable . Either it doesn't exist at the path it displayed or it's corrupt or something. The second error is simply related to the first.
Ed Sweetman endorses this message.
Post Reply