 |
|
24-05-2010, 18:45
|
#1
|
Marine Service Provider
Join Date: Mar 2008
Posts: 7,712
|
CMake and Other Cross-Platform Issues
Hello....
We are going to try to move away from the gnu automake/conf tools and over to cmake as our primary build configurator.
I have committed to CVS a working version of CMakeLists.txt and supporting files. Thanks so much to sethdart for his pioneering work here.
Have a look at this thread/post for more info on the operation of cmake.
http://www.cruisersforum.com/forums/...tml#post437054
My experiences:
linux: cmake 2.8.1 was fiddly to install, best approach was to use the "bootstrap" method. Running cmake and resulting build on Ubuntu was flawless.
Windows: installing cmake 2.8.1 is trivial; download the Windows installer .exe and it just works fine. Running cmake and building in VS2005 was a little fussy. The wxWidgets libraries need to have been built with the same runtime library model as is specified in the opencpn VS project built by cmake. I setup the cmake source to use /MD(release) or /MDd(debug) for the runtime library. YMMV.
Comments from cmake mavens encouraged. This is my first major project experience with it. I'm sure the script will need tweaking....
Comments Welcome
Dave
|
|
|
24-05-2010, 20:14
|
#2
|
Registered User
Join Date: Nov 2006
Location: San Francisco Bay
Boat: Fantasia 35
Posts: 1,257
|
Dave,
Can not find VERSION.cmake it seems to be missing.
CMake Error at CMakeLists.txt:30 (INCLUDE): include could not find load file:
C:/devmnt/opencpn/VERSION.cmake
Paul
|
|
|
24-05-2010, 20:28
|
#3
|
Marine Service Provider
Join Date: Mar 2008
Posts: 7,712
|
Viking Sailor....
Fixed in CVS
Thanks
Dave
|
|
|
24-05-2010, 22:09
|
#4
|
Registered User
Join Date: Nov 2006
Location: San Francisco Bay
Boat: Fantasia 35
Posts: 1,257
|
Dave,
Cmake seems to work. It completed successfully. Did a build in VC and that also worked. How can I be sure that Cmake is working correctly,
Paul
|
|
|
25-05-2010, 08:31
|
#5
|
Registered User
Join Date: Mar 2010
Location: Svanesund, Orust, Sweden
Boat: Forgus 31
Posts: 96
|
Quote:
Originally Posted by bdbcat
linux: cmake 2.8.1 was fiddly to install, best approach was to use the "bootstrap" method. Running cmake and resulting build on Ubuntu was flawless.
|
I use the Ubuntu package with great success, just sudo apt-get install cmake
Started to get working, cdash site for OpenCPN.
CDash - OpenCPN
Every five minutes the cvs is checked and if a file is changed a build will be done on my Ubuntu 10.04-x86 machine. I wil set up the 64 bit version soonish and a instruktiv how to run your own build server.
|
|
|
25-05-2010, 09:18
|
#6
|
Marine Service Provider
Join Date: Mar 2008
Posts: 7,712
|
Balp....
Thanks for the input.
I run Ubuntu 8.04. If I do apt-get on cmake, I get Version 2.4.something.
README for 2.8.1 says that 2.4 cmake should configure and make 2.8.1 in-situ. Didn't work for me, due to confusion over /usr and /usr/local.
So, I killed all of 2.4, and did the bootstrap. Worked fine.
Dave
|
|
|
25-05-2010, 12:48
|
#7
|
Registered User
Join Date: Mar 2010
Location: Svanesund, Orust, Sweden
Boat: Forgus 31
Posts: 96
|
Quote:
Originally Posted by bdbcat
README for 2.8.1 says that 2.4 cmake should configure and make 2.8.1 in-situ. Didn't work for me, due to confusion over /usr and /usr/local.
|
I think the cmake files are 2.6 safe, i think that came in 9.04 to ubuntu. I have not yet tested on 2.6 cmake thou.
|
|
|
26-05-2010, 11:03
|
#8
|
Registered User
Join Date: Nov 2006
Location: San Francisco Bay
Boat: Fantasia 35
Posts: 1,257
|
Dave,
Trying to get Cmake working on XP. Please help with this:
1>------ Build started: Project: i18n, Configuration: Debug Win32 ------
1>i18n [opencpn_sv_SE]: Created mo file.
1> 'GETTEXT_MSGFMT_EXECUTABLE-NOTFOUND' is not recognized as an internal or external command,
1> operable program or batch file.
1>Project : error PRJ0019: A tool returned an error code from "i18n [opencpn_sv_SE]: Created mo file."
1>Build log was saved at "file://c:\devmnt\opencpn\buildwin\i18n.dir\Debug\BuildLog .htm"
1>i18n - 1 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 7 up-to-date, 0 skipped ==========
Thanks,
Paul
|
|
|
26-05-2010, 11:46
|
#9
|
Registered User
Join Date: Mar 2010
Location: Svanesund, Orust, Sweden
Boat: Forgus 31
Posts: 96
|
Quote:
Originally Posted by Viking Sailor
Dave,
Trying to get Cmake working on XP. Please help with this:
1>------ Build started: Project: i18n, Configuration: Debug Win32 ------
1>i18n [opencpn_sv_SE]: Created mo file.
1>'GETTEXT_MSGFMT_EXECUTABLE-NOTFOUND' is not recognized as an internal or external command,
1>operable program or batch file.
|
Looks like gettext is missing, I was sure that was supposed to be optional.
GetText for Windows
Holds a windows port, The path may have to be specified. Not all familiar with the currect version of the cmake files.
|
|
|
26-05-2010, 11:47
|
#10
|
Registered User
Join Date: Dec 2005
Location: Helsingborg
Boat: Dufour 35
Posts: 3,891
|
Viking
Read this post http://www.cruisersforum.com/forums/...tml#post437991
A bit down you'll find links to "gettext" for windows.
Your error messages indicates that you probably don't have gettext installed.
Thomas
PS It wasn't me putting the smiley in the upper left corner......this is serious business!  (can't get rid of the thing).
|
|
|
26-05-2010, 12:40
|
#11
|
Registered User
Join Date: Nov 2006
Location: San Francisco Bay
Boat: Fantasia 35
Posts: 1,257
|
Guy's,
Thanks for the help. I think that "GETTEXT_MSGFMT_EXECUTABLE-NOTFOUND" is a script. Don't see it in CVS. Will wait for Dave's input on how he wants to resolve this.
Thanks again,
Paul

|
|
|
26-05-2010, 18:29
|
#12
|
Marine Service Provider
Join Date: Mar 2008
Posts: 7,712
|
Viking Sailor....
OK, got this sorted out. The cmake script did not gracefully handle the case where gettext package is not available. Fixed in CVS.
Please note that if you have no gettext in Windows, then of course the application messages will all be in English. But it should run sensibly.
Also a note on cmake: Don't forget to "delete the cmake cache" when you add dependent packages like gettext. cmake does not automatically scan for changes in this kind system utility with each run.
Thanks, and good luck
Dave
|
|
|
26-05-2010, 22:00
|
#13
|
Registered User
Join Date: Nov 2006
Location: San Francisco Bay
Boat: Fantasia 35
Posts: 1,257
|
Dave,
I added gettext after the first time I did a build. Didn't rerun Cmake after adding gettext. The build now works. A small point -- VC asked for the location of opencpn.exe when starting debugging the first time. It would nice for the new tester if Cmake could tell VC where the executable is located.
Thanks,
Paul
|
|
|
27-05-2010, 08:24
|
#15
|
Registered User
Join Date: Oct 2009
Location: Lelystad, The Netherlands
Boat: vd Stadt 44, Ben the Boat
Posts: 239
|
Quote:
Built the debug version of 526a using VC. Have started testing using
the VC debugger.
|
Paul,
Are you able to compile for release? I'm able to do the exact same thing, running VS 2010 in debug. I'm not able to compile in release yet. A VSProject file like in the build\msw directory compiles in debug as well in release
Bart
|
|
|
 |
|
Thread Tools |
Search this Thread |
|
|
Display Modes |
Rate This Thread |
Linear Mode
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
Advertise Here
Recent Discussions |
|
|
|
|
|
|
|
|
|
|
|
|
Vendor Spotlight |
|
|