Commit Graph

39 Commits

Author SHA1 Message Date
Robert Osfield
89f7726383 Copied libutil and libtess implementations in form Mesa 7.9/src/glu into the src/osg/glu,
changed extensions from .c to .cpp and got compiling as C files as part of the osg core library.

Updated and cleaned up the rest of the OSG to use the new internal GLU.
2010-10-06 14:44:52 +00:00
Robert Osfield
6b9bbc7ca9 From Wang Rui, "The OSG book I'm working on will focus on helping beginners build
latest OSG source code with Visual Studio 2010 express, without
setting too many options and without facing unexpected errors. But at
present, the compilation process will fail because the INSTALL project
'cannot find' generated DLLs while copying files. I have looked into
the build directory and found that the places of generated file
folders were just different from previous VS versions. In this case,
the old hack in OsgMacroUtils.cmake may become invalid:

MACRO(HANDLE_MSVC_DLL)
       #this is a hack... the build place is set to lib/<debug or
release> by LIBARARY_OUTPUT_PATH equal to OUTPUT_LIBDIR
       #the .lib will be crated in ../ so going straight in lib by
the IMPORT_PREFIX property
       #because we want dll placed in OUTPUT_BINDIR ie the bin folder
sibling of lib, we can use ../../bin to go there,
       ...
       ELSE(NOT MSVC_IDE)
           SET_TARGET_PROPERTIES(${LIB_NAME} PROPERTIES PREFIX
"../../bin/${LIB_PREFIX}${LIB_SOVERSION}-" IMPORT_PREFIX "../")
       ENDIF(NOT MSVC_IDE)
ENDMACRO(HANDLE_MSVC_DLL)

Here the prefix "../../bin" may need to be fixed. I just modified it to:

IF(MSVC_VERSION LESS 1600)
    SET_TARGET_PROPERTIES(${LIB_NAME} PROPERTIES PREFIX
"../../bin/${LIB_PREFIX}${LIB_SOVERSION}-" IMPORT_PREFIX "../")
ENDIF()

It should keep compatible with old MSVC versions. There are similar
fixes in the SETUP_PLUGIN and SETUP_EXE macros. I haven't tested them
on more platforms.
"
2010-04-20 16:27:54 +00:00
Robert Osfield
23c7fd2f61 From David Fries,"We are needing to compile Debug, Release, and MinSizeWithDebInfo, but
currently only Debug appends "d" so the Release and MinSizeWithDebInfo
(and MinSizeRel) all produce the same filenames.  This set of changes
lets each build type have a cmake defined string appended, defaulting
to Release none, Debug d, RelWithDebInfo rd, MinSizeRel s.  But a user
still can have Release, RelWithDebInfo, and MinSizeRel to produce the
same filenames.  It does so by setting the preprocessor define
OSG_LIBRARY_POSTFIX in src/osgDB/CMakeLists.txt to one of the
previously defined cmake variables CMAKE_DEBUG_POSTFIX
CMAKE_RELEASE_POSTFIX CMAKE_RELWITHDEBINFO_POSTFIX
CMAKE_MINSIZEREL_POSTFIX.  This method cuts down on the #ifdef _DEBUG
#else preprocessor directives in Registry.cpp as the extension is
always passed in OSG_LIBRARY_POSTFIX.  That and __MINGW32__ didn't
have the _DEBUG check which looks like a bug."
2010-03-10 17:19:35 +00:00
Robert Osfield
3cd0c50df3 From Mourad Boufarguine, "Some others modified CMake scripts :
- OsgMacroUtils.cmake, SETUP_LINK_LIBRARIES macro : allow linking with debug/release external libraries
- osgQt/CMakeLists.txt : fix the linking to Qt librairies + linking to debug Qt librairies if found
- examples/ qt examples :  linking to debug Qt librairies if found"
2010-03-05 12:43:03 +00:00
Robert Osfield
93d83010f8 Added EGL support into build system for GLES1 + GLES2.
Added EGL support into GraphicsWindowX11.
2009-10-30 15:17:38 +00:00
Robert Osfield
23d697e77e Added VisualStudio versioning info to plugins 2009-02-20 13:58:44 +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
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
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
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
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
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
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
4328bdacc2 From Luigi Calori, introduction of versioning of dll's and placement of dll and plugins into bin directory during build. 2007-08-30 10:41:15 +00:00
Robert Osfield
502f1a3330 Fixed the install path of plugins under Windows. 2007-08-20 13:09:10 +00:00
Robert Osfield
082ce2e8d4 Introduce OSG_BUILD_APPLICATION_BUNDLES option for OSX, defaulting to OFF. 2007-06-04 21:02:15 +00:00
Robert Osfield
32931f90a8 From Luigi Calori, build fixes for Win32 build osg WxWidgets example 2007-05-25 13:15:00 +00:00
Robert Osfield
97039e9ae3 Added automatic building of plugins as static when dynamic build is switch off. 2007-05-23 19:25:54 +00:00
Robert Osfield
e463844020 Introduced VERSION and SOVERSION'ing of libraries. 2007-05-20 17:38:11 +00:00
Robert Osfield
9497d75cc9 Added support for version of the osgPlugins directory, which now gets versioned
according to the OpenSceneGraph/CMakeLists.txt and the include/osg/Version settings.
These changes mean that the 1.9.5 release will have a libs/osgPlugins-1.9.5 directory.
2007-05-20 12:29:11 +00:00
Robert Osfield
3809d0dad0 Moved the OpenThreads link locally to each lib 2007-05-03 10:06:38 +00:00
Robert Osfield
2168eac1d4 From Eric Wing,
"
Here are more changes for the CMake scripts:

- I removed CMAKE_INSTALL_PREFIX in FindOpenThreads as a follow up to
the discussion thread.

- I introduced an experimental CMAKE_PREFIX_PATH to replace it.

- I added CMAKE_PREFIX_PATH, CMAKE_INCLUDE_PATH, and
CMAKE_LIBRARY_PATH to the CMake GUI so users can enter values there
instead of in the environment.

- I added OPENSCENEGRAPH_*_VERSION variables (MAJOR, MINOR, PATCH).
These should be kept up-to-date with the real version numbers. Mac
bundles like to have version information so users can find out the
version they are running through standard About panels and also
automated system reporters for troubleshooting/bug tracking. In
theory, this information could be used for library versioning.
We should do the same for OpenThreads, but I forgot about it.

- I added some Mac Info.plist stuff (which uses the version information).

"
2007-04-27 10:29:48 +00:00
Robert Osfield
c826452923 Fixed tabbing 2007-04-27 09:49:28 +00:00
Robert Osfield
7b2567b77c Fixed variable name dereference 2007-04-12 17:30:06 +00:00
Robert Osfield
ef84805d5a Added SETUP_COMMANDLINE_APPLICATION and SETUP_COMMANDLINE_EXAMPLE macros 2007-04-12 09:59:34 +00:00
Robert Osfield
2187b061fc From Eric Wing,
"Attached is a patch allows access access to the CMake MACOSX_BUNDLE
option. Now SETUP_APPLICATION and SETUP_EXAMPLE take an additional
optional parameter that specifies if the program is a command line
application or a GUI application (think: IS_COMMANDLINE_APP). Passing
1 means true (is_commandline_app). Passing 0 or omitting the parameter
means false.

I changed the scripts for osgversion and osgunittests to support this
option because I believe they are command line apps. Are there any
others?"
2007-04-12 09:33:24 +00:00
Robert Osfield
5c780aada0 From Luigi Calori, "here is a patch to use Mike 3rdParty dependencies
It should not be introusive to any other palatform apart MSVC, but in order to link to debug-specific libs
I had to change plugins CMakeLists to differentiate debug/release linkage, I have used the same macro used in core libs
Now the macro used for plugin and examples linking test for existance of TARGET_LIBRARIES_VARS
that holds the names of the variables that have to be used for linking"
2007-03-27 21:44:02 +00:00
Robert Osfield
b419fa93ef From Luigi Calori, "when we link against something that comes out from a Find... we ususally have a variable <LINK_VAR_NAME>available like OPENTHREADS_LIBRARY,
so I' ve set up a macro that uses the variable name expanded for linking, and  test if a variable ${LINK_VAR_NAME}_DEBUG
like OPENTHREADS_LIBRARY_DEBUG exists and in case uses it for linking in debug mode.
I' ve also set up FindOpenThreads to set up these variables.
I had to edit the core libraries CMakeLists to add the calls to the macros used.
I' ve tested under MSVC"
2007-03-26 13:02:38 +00:00
Robert Osfield
282f4ce0b9 Moved the TARGET_NAME setting into the OsgMacroUtils.cmake. 2007-03-19 17:24:19 +00:00
Robert Osfield
d9a94f7890 Moved the TARGET_NAME setting into the SETUP_APPLICATION/EXAMPLE macro 2007-03-19 17:18:59 +00:00
Robert Osfield
be3f61c49f From Luigi Calori, move to using local CMakeLists.txt files and explicit file lists.
From Robert Osfield, small ammendments of the above to seperate example and application installs, and fix the osgPlugins install directory.
2007-03-19 12:30:26 +00:00
Robert Osfield
54127cea20 Fixed install paths of wrappers and plugins 2007-03-12 12:46:36 +00:00
Robert Osfield
34067a3e02 From Luigi Calori, improvements to handling of install under Unix 2007-03-09 14:54:41 +00:00
Robert Osfield
1fd22b8722 Added application_ and example_ before application and example projects.
Converted the application CMakeLists.txt and macros to work with the ADD_OSG_APPLICATION macro.

Removed the GDAL checks in the examples/CMakeLists.txt
2007-03-09 13:47:37 +00:00
Robert Osfield
59e6b6c82e From Lugi Calori, tweaks to macros and addition of CMAKE_INSTALL_PREFIX to FindOpenThreads 2007-03-08 15:33:50 +00:00
Robert Osfield
71ec26ba62 From Luigi Calori, added marco support 2007-03-05 13:27:55 +00:00