Commit Graph

102 Commits

Author SHA1 Message Date
Robert Osfield
17da548343 From Roger James and Robert Osfield, fixes and reorganization to better support Windows dyanmic library build 2009-02-10 19:25:50 +00:00
Robert Osfield
54ea755421 From Miguel Escriva,"OSG 2.8.0-rc4 don't found zlib in Windows.
Here you will find a patch. "
2009-02-10 13:25:40 +00:00
Robert Osfield
7de8527efd From Roland Smeenk and Robert Osfiled, tweaks to the Collada finding/linking to improve support for Collada DOM 2.1 + 2.2 across platforms. 2009-02-10 11:44:50 +00:00
Robert Osfield
f5ecacdf4e From Paul Melis & Robert Osfeild, improvements to find scripts to better handle diffrent installation combinations 2009-02-06 15:38:09 +00:00
Robert Osfield
c37d72957a Added /lib64 to search paths. 2009-02-02 17:16:02 +00:00
Robert Osfield
d277a85537 Updated FindOSG.cmake from the version used by Present3D as this is more up to date. 2009-01-29 15:37:52 +00:00
Robert Osfield
a3b91f9294 From Mattias Helsing, "got some feedback from J-S on the packaging so I have changed the
name of the top folder in each package to OpenSceneGraph-x.y.z

Noone else has had an opinion on whether compiler and it's version
should be part of the package filename on their platform/setup so I'll
leave it as is. That is - No action is taken for compilers other than
msvc but one can easily add this information to the cmake cache
regardless of platform.
"
2009-01-21 18:34:10 +00:00
Robert Osfield
12a484593c Further tweak to include paths 2009-01-12 16:37:38 +00:00
Robert Osfield
ded06dc421 Restructured the include paths 2009-01-12 16:10:40 +00:00
Robert Osfield
ef1d205a2e From Mattias Helsing, "'ve finally finished the rework of the packaging support. It is
streamlined for tgz and has most of the features that Robert, J-S and
Sukender requested in december. I have an idea of how to discover the
vc80 sp1 or not but haven't had time to implement. The script is
completely reworked and now doesn't include cmakes' bundled
CPack.cmake script at all. In summary:

* filenames are
<package>-<osgversion>-<platform>-<arch>[-compiler]-<configuration>.tar.gz,
ex. libopenscenegraph-2.7.9-Linux-i386-Release.tar.gz,
libopenthreads-dev-2.7.9-win32-x86-vc80sp1-Debug.tar.gz

* targets (projects in msvs) are generated for each specified
component, a target that packages everything that is installed
(openscenegraph-all) and there's a target for running all other
packaging targets (Package ALL on msvs, package_ALL in unix
makefiles).

* It is possible to set the compiler in ccmake (cmake-gui, whatever you use)

* the top folder in packages is the same for all packages (OpenSceneGraph-x.y)

* the packaging support is limited with cmake-2.6.0 and not as
dynamic. With cmake-2.6.1 and later building the gdal plugin (for
example) will create a package_libopenscenegraph-gdal target. With
cmake-2.6.0 only the ones that are always built (libopenscenegraph,
libopenscenegraph-dev, openscenegraph, libopenthreads,
libopenthreads-dev

* i found a better way to decide whether cpack is available to guard
the BUiLD_OSG_PACKAGES option"
2009-01-12 11:34:03 +00:00
Robert Osfield
c7b6dd9a18 From Mattias Helsing,"Added doc/Doxyfiles/openthreads.doxyfile.cmake
Updated all doxyfiles under doc/Doxyfiles. They are now all processed
by cmake but make targets are only generated for
OpenSceneGraphReferenceDocs and OpenThreadsReferenceDocs. The others
can be run with doxygen directly in <builddir>/doc.
Fixed a copy-paste in openthreads sproc and pthreads CMakeLists
Added the osg logo to the html footers
Added possibility to get generation of chm files.

CMakeLists (toplevel):
Added install of osg and ot reference docs. This also generates
packaging targets of openscenegraph-doc and openthreads-doc if you
have packaging enabled
Removed the unused USING_OP_OT_TRIPLE_SET since there was no way of
enabling it anyway
Removed BUILD_REF_DOCS. IMO it was redundant - BUILD_DOCUMENTATION
does the same thing and we get that anyway from including
Documentation.cmake.
OsgCPack.cmake:
Removed generation of PACKAGE_SRC for msvc
Added special handling for -doc packaging targets - they don't require
system, architecture or compiler"
2008-12-16 11:43:28 +00:00
Robert Osfield
4c32c577d5 From Mathias Helsing, "Cpack support submission with:
Better package naming. example
openscenegraph-core-2.7.7-Linux-i386.tar.gz on my ubuntu laptop and
openscenegraph-core.2.7.7-win32-x86-vc80.tar.gz on winxp.

CMakers will not get options for selecting compression format. TGZ
goes for all platforms (on win32 I use 7zip)

The wrappers is now given the COMPONENT name
libopenscenegraph-wrappers. Feel free to change the name.

On windows with visual studio the OsgCPack script make some efforts to
discover the compiler used but support is a bit poor so I've given
CMake acces to OSG_CPACK_COMPILER to provide some mean to name the
compiler.

stop

The platform part is taken from CMAKE_SYSTEM_NAME and for windows I
change this to win32 or win64 based on CMAKE_CL_64. This might not be
necessary if the arch part has that information. This information is
taken from CMAKE_SYSTEM_PROCESSOR. I only have 32bit here so if some
of you could uncomment line 15,16 in OsgCPack.cmake and report what
cmake report it would be nice. I'm especially interested anything but
win32 and linux32"
2008-12-15 14:07:29 +00:00
Robert Osfield
97cd954c01 Changed the libopenscenegraph-core to be part of libopenscenegraph, and
changed libopenscenegraph-examples to be part of openscenegraph-examples
2008-12-12 14:54:22 +00:00
Robert Osfield
55fe4967ad From Mattias Helsing, "I have developed the earlier cpack example a bit. Perhaps you could
consider these initial cpack support scripts. It is hidden behind a
BUILD_PACKAGES option so won't affect the normal user. The submission
1) set the COMPONENT attribute on all cmake install commands.
COMPONENT names are according to
http://www.openscenegraph.org/projects/osg/wiki/Community/Packaging

2) provide cmake script and a template for creating CPack
configuration files. It will generate target for creating packages
with everything that gets "installed" (make package on unx, project
PACKAGE in MSVC) plus targets for generating one package per COMPONENT
(i.e. libopenscenegraph-core etc.).

I have temporariliy uploaded some examples to
http://www.openscenegraph.org/projects/osg/wiki/Community/People/MattiasHelsing

If this submission makes it into svn we can develop it to generate
rpms, installers for windows and mac (I know at least J-S don't like
these but there may be others who do ;) and even DEBs (not sure if we
can make them "ubuntu-ready" but they eventually may - at least we
could put a deb on the website)"
2008-12-12 11:01:09 +00:00
Robert Osfield
9d92a26693 Revised the DYNAMIC vs STATIC library setup of COLLADA. 2008-12-02 10:42:58 +00:00
Robert Osfield
eba1072dfa From Ulrich Hertlien, "'m was getting a build failure from the OpenEXR reader on Mac OS X. It was complaining about undefined references to half::convert(int). I believe this is because the EXR plugin doesn't explicitly link against the Half library.
Attached is a modified FindOpenEXR.cmake module that locates IlmIlf and Half, as well as a modified exr/CMakeLists.txt that picks up this change.

Also attached are some typo fixes for CMakeModules.

Cheers,"
2008-11-30 16:33:11 +00:00
Robert Osfield
89ea6d596c Added searching for OpenEXR 2008-11-26 12:35:49 +00:00
Robert Osfield
e02ae68aa9 From Gino van den Bergen, "The FindGDAL.cmake seems to be broken in OSG 2.6.1 for locating gdal.h through enviroment variable GDAL_DIR.
Also, I've modified the FindCOLLADA.cmake to locate the current 2.1 versions of the COLLADA DOM in the build directories under VC8. I've also added a COLLADA_LIBRARY_DEBUG spec. Other flavors may be added depending on compiler version and DOM version."
2008-11-26 12:07:03 +00:00
Robert Osfield
aa28f1a3fd Added XUL_DIR searching 2008-11-19 17:04:02 +00:00
Robert Osfield
297dd32011 Changed osgbrowser example to use a local CMakeModules/FindXUL.cmake script,
and specialization of GTK dependencies to only non Windows/OSX platforms.
2008-11-18 23:38:18 +00:00
Robert Osfield
bad9854d71 Added very basic osgvnc example that uses the LibVNCServer client libries for implementing a vnc client
as an osg::Image with the vnc data stream going to it.
2008-10-31 12:03:44 +00:00
Robert Osfield
848b047708 From Blasius Czink, "changed the CHECK_CXX_SOURCE_RUNS macro slightly to avoid the compile problems due to bugged "intrin.h". In such a case the mutex fallback will be used (see attached file)." 2008-10-29 11:51:47 +00:00
Robert Osfield
d703c58936 From Blasius Czink, "Among other things I added support for atomic operations on BSD-like systems and additional methods (for "and", "or", "xor").
"

and a later post the same osg-submissions thread:

"it's been a while since I have made the changes but I think it was due to problems with static builds of OpenThreads on windows. I was using
OpenThreads in a communication/synchronisation library (without
OpenSceneGraph). It seems I forgot to post a small change in the CMakeLists file of OpenThreads. If a user turns DYNAMIC_OPENTHREADS to OFF (static build) OT_LIBRARY_STATIC will be defined in the Config.
Without these changes a windows user will always end up with a "__declspec(dllexport)" or "__declspec(dllimport)" which is a problem for static builds."

And another post from Blasius on this topic:

"I tested with VS2005 and VS2008. For 32 bit everything works as expected. For x64 and VS2008 I could successfully do the cmake-configure and then the compilation but I had occasional crashes of cmTryCompileExec.exe (during the cmake-configure phase) which seems to be a cmake bug. With VS2005 and 64bit cmake does not set _OPENTHREADS_ATOMIC_USE_WIN32_INTERLOCKED although the interlocked functionality should be there. If I place the source snippet from the CHECK_CXX_SOURCE_RUNS macro to a separate sourcefile I can compile and run the resulting executable successfully. Forcing OPENTHREADS_ATOMIC_USE_WIN32_INTERLOCKED (on VS2005/x64) reveals a bug in "intrin.h" which seems to be fixed in VS2008 but not in VS2005.

In case anyone is interested the lines:
__MACHINEI(unsigned char _interlockedbittestandset(long *a, long b))
__MACHINEI(unsigned char _interlockedbittestandreset(long *a, long b))
__MACHINEX64(unsigned char _interlockedbittestandset64(__int64 *a, __int64 b))
__MACHINEX64(unsigned char _interlockedbittestandreset64(__int64 *a, __int64 b))

should be changed to:
__MACHINEI(unsigned char _interlockedbittestandset(long volatile *a, long b))
__MACHINEI(unsigned char _interlockedbittestandreset(long volatile *a, long b))
__MACHINEX64(unsigned char _interlockedbittestandset64(__int64 volatile *a, __int64 b))
__MACHINEX64(unsigned char _interlockedbittestandreset64(__int64 volatile *a, __int64 b))

The worst thing that can happen is that interlocked funtionality is not detected during cmake-configure and the mutex fallback is used.
Which reminds me another small glitch in the Atomic header so I attached a corrected version.



    Why is the OT_LIBRARY_STATIC added to the config file? It is not needed anywhere.

OT_LIBRARY_STATIC is needed if you are doing static-builds on Windows. See my previous post on that.
"
2008-10-27 10:42:58 +00:00
Robert Osfield
71814fe266 From Mathieu Marache, "I came across a bug when building OpenSceneGraph with
MSVC_VERSIONED_DLL, NMake makefiles and CMake 2.6.2.
The compilation fails because it tries to copy ot11-OpenThreads.lib to
OpenThreads.lib which is valid for the 2.4.x era of CMake but not
anymore in 2.6.x era.
The provided file from the CMakeModules directory adds a tests on the
CMake version and corrects this. Works for me now."
2008-10-27 09:48:34 +00:00
Robert Osfield
cc079453da From Mattias Helsing,
CMakeLists.txt changes: "I installed latest Cmake(2.6.1) on a new machine and got a CMP008
warning from cmake. This fix set up osg to use the old behaviour which
have worked before. We might set this to NEW but I need to do more
testing first. I'l be able to test this on winxp with msvc80/90 and
ubuntu hardy with gcc-4.2.

quote from cmake cvs log
policy CMP0008 to decides how to treat full path libraries that do not
appear to be valid library file names.  Such libraries worked by
accident in the VS IDE and Xcode generators with CMake 2.4 and below."


OsgMarcroUtils.cmake changes: "On Philips suggestion truncated a redundant if/else construction in
OsgMacroUtils to avoid developer warnings in cmake-2.6.1 concerning
cmake policy CMP0008 which allows full paths to libraries only with
valid library names
"
2008-09-17 19:25:40 +00:00
Robert Osfield
97b37cb117 Added support for finding DCMTK-3.5.4 installed lib/include placement 2008-09-17 11:43:14 +00:00
Robert Osfield
d07f3d5662 Added optional usage of DCMTK in the dicom plugin 2008-09-15 19:59:12 +00:00
Robert Osfield
c6ba70e3ad From Mathias Froehlich, "It appears not to be sufficient to set a cmake variable to get a define in
such a config file. Instead set that variable to 1. Also included a small compile fix, that appears to be required  than ..."
2008-07-01 09:40:06 +00:00
Robert Osfield
214491dd94 From Mathias Froehlich, "Update to the configure check for msvc 7.1.
MemoryBarrier() is used in the implementation, so it should be checked.
This in effect disables the faster atomic ops on msvc 7.1 and older, even if
only the MemoryBarrier() call is missing. But it ensures for the fist cut
that it will build everywhere. If somebody cares for msvc 7.1 enough and has
one for testing installed, he might provide the apropriate defines to guard
that MemoryBarrier() call.

I tested that msvc8 32/64bit still passes the configure tests and compiles.
"
2008-06-27 16:47:43 +00:00
Robert Osfield
5a4ce5a387 From Mathias Froechlich, "Attached is a change to that atomic stuff to move the win32, msvc
implementation of the atomic increment and decrement into a implementation
file.
This way inlining and compiler optimization can no longer happen for these
implementations, but it fixes compilation on win32 msvc targets. I expect
that this is still faster than with with mutexes.

Also the i386 gcc target gets atomic operations with this patch. By using an
implementation file we can guarantee that we have the right compiler flags
available."
2008-06-26 10:27:16 +00:00
Robert Osfield
0b6e605795 From Mathias Froehlich, "fixed win32/win64 configure check and win32/win64
atomic related compile failures with msvs2005. Attached changes to make win32
really use the atomic stuff. There are pointer typecast problems and some
historic alignment restrictions that I just took from a previous similar
implementation of mine without looking deep enough. "
2008-06-23 14:51:34 +00:00
Robert Osfield
275811d02a From Eric Sokolowsky, "I have made a number of changes intended to get a few things working better on OSX. However, since I'm still pretty new at Mac development and cmake I'm not entirely certain that the changes I have made are benign on other platforms. I have tested these changes on Leopard with CMake 2.6 generating Xcode 3.0 projects, compiling on ppc and i386 for 10.5 and 10.4, and on Linux (CentOS) and everything still seems to work ok. Here are the changes I made (against OSG svn as of this afternoon):
- Added osgviewerCocoa example to APPLE builds
- Fixed corrupt Xcode project generation with CMake 2.6 dealing with ADD_DEFINITIONS and CMake Policy CMP0005 on Leopard
- Resolved CMP0006 warning for examples and programs by setting BUNDLE DESTINATION to same as RUNTIME DESTINATION with CMake 2.6
- Fixed freetype plugin on Leopard to avoid OpenGL linking problem
- Figured out how to use a custom Info.plist included in the project (see osgviewerCocoa application CMakeLists.txt)"
2008-06-23 09:57:45 +00:00
Robert Osfield
d7e9e5e495 From Mathias Froehlich, OpenThreads::Atomic support 2008-06-17 17:43:59 +00:00
Robert Osfield
712b6cb2d9 From Mathieu Marache,
first post:

"I had the problem that debug and release version of the plugins had the same name under linux. These minors modification to Registry and the CMake support files enable to have both Release and Debug version of the plugins to coexist and be found by there respective runtimes."

follow up post:

"I've gone ahead and added a preprocessor directive with the editable CMAKE_DEBUG_POSTFIX. I modified Registry.cpp to take this new preprocessor directive called OSG_DEBUG_POSTFIX while looking for libraries in Debug mode for the windows (msvc) and the linux platforms.

MinGW, cygwin and Apple are still left out this proposal."


Notes from Robert Osfield, completed the work in change d entries to use OSG_DEBUG_POSTFIX
2008-05-28 12:49:47 +00:00
Robert Osfield
476cb5373e From Philip Lowman, post 1:
"Here is a collection of changes which should fix issues building the OSG with CMake 2.6.0 (along with some other changes)

CMakeLists.txt:
* Set CMP0003 to supress warning about linking against -lpthread (which is a
  non-absolute library location).  (CMake 2.6.x fix)
* Modified the WIN32_USE_MP and a couple of other Visual Studio specific flags
  to be in an IF(MSVC) block  (minor tweak to reduce exposing this stuff on MinGW builds)
* Includes my second set of glu tesselator autodetection changes that you
seemed to want but haven't committed yet.

src/OpenThreads/pthreads/CMakeLists.txt:
* Eliminates warning when compiling on Linux about spaces in link line (CMake 2.6.x fix)

CMakeModules/OsgMacroUtils.cmake:
* Tweaks to make the macros behave properly under CMake 2.6.0 (doesn't change behavior under CMake 2.4.x)

CMakeModules/Find3rdPartyDependencies.cmake:
* Adds the NO_DEFAULT_PATH option to all of the search options so that things in C:\Program Files\OpenSceneGraph aren't accidently picked up during configure time and instead only things in the "3rdParty" folder are discovered. (general bugfix)
"

post 2:
"Ok, hold the presses.  I just discovered that for some odd reason the osgdb_* plugins under Linux aren't getting put under the osgPlugins-2.5.0 folder.  Not exactly sure why this broke, the folder was there, just empty.  I'll have to look into it this evening."

post 3:

"Fixed, was caused by the switch to CMAKE_LIBRARY_OUTPUT_DIRECTORY and some code in osgPlugins/CMakeLists.txt that effectively overrides LIBRARY_OUTPUT_PATH on non-MSVC compilers to dump the plugins in the plugins folder.  I tweaked it to override CMAKE_LIBRARY_OUTPUT_DIRECTORY as well.  Seems to work fine."
2008-05-26 22:36:58 +00:00
Robert Osfield
973f104704 From Garrett Potts and Robert Osfield, changes to build against Collada DOM 2.x 2008-05-08 12:36:07 +00:00
Robert Osfield
bcee43bf44 From Mattias Helsing, "I just made Find3rdPartyDependencies search for curllib if it can't
find libcurl. Mike's 3rdParty only has curllib.

I realize now that the in appended file I have earlier removed
searching for freetype219 since I have it but it will break the build
of osg."
2008-04-24 10:09:04 +00:00
Robert Osfield
c97ba8271b From Carlo Comporesi, adding support of finding libcurl in 3rd party dependencies 2008-03-26 20:01:45 +00:00
Robert Osfield
164f2160ff Added utilty script for cleaning up build files/directories. 2008-03-14 15:33:47 +00:00
Robert Osfield
3537d21ae3 From Jose Delport, added support for finding and using GDAL 1.5 2008-03-11 13:19:08 +00:00
Robert Osfield
e0e862e31a From Rene Molenaar, "Using commandline build system nmake on windows does not work.
This is caused by the OSG_MSVC_VERSIONED_DLL hack.
there are hard-coded paths to place the dll's in the bin /dir that normally would go
in the lib/config (release/debug) dirs. Nmake has different locations for the files (no config dir).
 
 fix: change the macro's in OsgMacroUtils.cmake for the IF(NOT MSVC_IDE) situation.
 Libs go in lib/, and DLLs and executables go in bin/
 To accopmplish this for MSVC_IDE the targets get a "../../bin" prefix,
 for nmake this should be "../bin" (because there are no config folders).

 This fix mimics the behaviour of the MSCV_IDE (visual studio) build system when building with nmake.
 
 Note:
 A change in the main CMakeLists.txt creates the needed plugin directory in the binary dir.
 
 see included files for the changes:
 r7885fix-v2/CMakeModules/OsgMacroUtils.cmake  
 r7885fix-v2/osgWrappers/CMakeLists.txt
 r7885fix-v2/CMakeLists.txt
 
 
The behaviour of visual studio projects (and other build systems) remain unchanged.  
Tested building and installing with nmake and visual studio 8 debug and release.
 "
2008-02-18 15:26:46 +00:00
Robert Osfield
f51bd3ce87 Fixed debug build of Inventor plugin 2008-01-21 17:04:33 +00:00
Robert Osfield
767bdf4d21 Added back in checks for various verions of gdal 2008-01-14 13:14:38 +00:00
Robert Osfield
11db24e6b3 From Colin McDonald, build fixes for Solaris. 2008-01-08 18:13:06 +00:00
Robert Osfield
f5ec89e049 From Eric Wing, "Attached are a few Find modules with updates. Among other things, they
contain better support for environmental variables to pre-empt the
autodection default search path order which is very helpful for people
who do automated builds. (I recommend that the remaining modules
consider adding the same system to make things consistent and easier
for those people that want to do the automated builds.)

The CMAKE_PREFIX_PATH has also been added to help people. I don't
recommend adding this to the other modules because it looks like CMake
agreed with my idea and will be adding the support in 2.6. So when
that ships, people will get it for free. (In the meantime, my modules
that do have it, it can be used.)

Finally, I've submitted all of these modules to official CMake plus
more so they will be in the next version of CMake. It looks like I may
need to sort some compatibility issues out with the KDE people who
seem to have conflicting modules, but this is unrelated to the updates
submitted here as OSG already has these conflicts. I figured I would
just sync OSG up with my current/best versions.

Also of note, I added the large batch of Findosg*.cmake modules to
CMake so people building against OpenSceneGraph can use these without
writing their own. I wasn't sure if I should submit them here or not
since they are for building against OSG and not for building OSG
itself. So they are not included.
"
2008-01-04 20:00:18 +00:00
Robert Osfield
c57d989fef From Jean-Sebastien Guay, added new version of feetype into search list 2007-12-21 17:56:41 +00:00
Robert Osfield
9a2bc98d3a From Paul Obermeier, "Please find enclosed the following 2 bug fixes:
File osgShadow/Version.cpp, Line 25:

const char* osgShaodowGetLibraryName()

should be:

const char* osgShadowGetLibraryName()


File CMakeModules/OsgMacroUtils.cmake, Line 224:

SET_TARGET_PROPERTIES(${TARGET_TARGETNAME} PROPERTIES DEBUG_POSTFIX ${CMAKE_DEBUG_POSTFIX})

should be:

SET_TARGET_PROPERTIES(${TARGET_TARGETNAME} PROPERTIES DEBUG_POSTFIX "${CMAKE_DEBUG_POSTFIX}")

Otherwise setting CMAKE_DEBUG_POSTFIX to an empty string instead of "d" in
the main CMakeLists.txt does not work under Linux.
"
2007-12-17 18:38:21 +00:00
Robert Osfield
5c007029ae From Jean-Sebastien Guay, "Attached you will find an expanded FindOpenVRML.cmake file, as well as a fixed CMakeLists.txt file for the VRML plugin ." 2007-09-26 14:44:22 +00:00
Robert Osfield
f6eaa58c56 From Andy Skinner, added support for ot-soversion-OpenThreads.dll dll naming under Windows 2007-09-14 11:06:12 +00:00
Robert Osfield
00e00f4e00 From Guillaume Millet, "Please find in attachment a small improvement to the pfb plugin
CmakeLists.txt and to the FindPerformer.cmake module.

Under Windows libs are: libpf.lib (we need to add the lib prefix) and
libpfdu-util.lib (libpfdu and libpfutil are compiled into one lib)
We need to add PFROOT to the search path for libs and includes (default
environment variable for Performer path)
And at last we need to put PFROOT/include and PFROOT/include/Performer
as include dir for compiling."
2007-09-07 10:15:39 +00:00