Re: [osg-users] osgQT - Windows 10 pthread.h - not found

2016-11-16 Thread Paul McIntosh
Here is a hacked solution, I am not sure if threads are even needed, there 
seems to be a few hangovers from the original osg CMakeLists...


Code:
# This should set CMAKE_USE_WIN32_THREADS_INIT = 1 if the CMAKE_SYSTEM = 
"Windows"...
#   FIND_PACKAGE(Threads)
# However it doesn't even though we are Windows...
message("CMAKE_SYSTEM_NAME: ${CMAKE_SYSTEM_NAME}")
# and tries to find pthread.h...
# So we will just do it ourselves...
IF(CMAKE_SYSTEM MATCHES "Windows")
  SET(CMAKE_USE_WIN32_THREADS_INIT 1)
ENDIF(CMAKE_SYSTEM MATCHES "Windows")
# and viola we have done what FIND_PACKAGE(Threads) failed to do...
message("CMAKE_USE_WIN32_THREADS_INIT: ${CMAKE_USE_WIN32_THREADS_INIT}")



Should FIND_PACKAGE(Threads) not be there at all?

I also get an error with Find3rdPartyDependencies but gather that is not needed 
either?


Code:

# 3rd Party Dependency Stuff
# paulmc IF(WIN32)
# paulmcINCLUDE(Find3rdPartyDependencies)
# paulmc ENDIF()




I am now at the point of building but getting...


Code:
C:\Users\internetscooter\xyaz\osgQt\build\PlatformSpecifics\Windows\OpenSceneGraphVersionInfo.rc(2):
 error RC2127: version WORDs separated by commas expected




Cheers,
Paul

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=69411#69411





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] osgQT - Windows 10 pthread.h - not found

2016-11-16 Thread Paul McIntosh
Hi All,

I am trying to get the new osgQT (https://github.com/openscenegraph/osgQt) 
building but I am having trouble with threading on Windows


Code:
Looking for pthread.h
Looking for pthread.h - not found
Found Threads: TRUE  
Found OpenGL: opengl32  
CMake Error at CMakeLists.txt:452 (INCLUDE):
  include could not find load file:

Find3rdPartyDependencies


Configuring incomplete, errors occurred!



I tried adding the CMAKE_USE_WIN32_THREADS_INIT directive that is used 
elsewhere in osg with no luck..


Code:
# Okay, here's the problem: On some platforms, linking against OpenThreads
# is not enough and explicit linking to the underlying thread library
# is also required (e.g. FreeBSD). But OpenThreads may be built with different
# backends (Pthreads, Sproc, Windows) so we don't know what the underlying
# thread library is because some platforms support multiple backends (e.g.
# IRIX supports Sproc and Pthreads). Linking all libraries won't work
# because the libraries may be incompatible.
# So the current solution is to attempt best guess linking and exempt certain
# cases. With IRIX, we're going to hope explicit linking to the underlying
# library is not necessary. We currently don't case for pthreads on Windows
# which might be an issue on things like Cygwin. This may need to be fixed.

# I added this
IF(CMAKE_SYSTEM MATCHES "Windows")
  SET(CMAKE_USE_WIN32_THREADS_INIT 1)
ENDIF(CMAKE_SYSTEM MATCHES "Windows")

FIND_PACKAGE(Threads)



Has anyone worked around this issue yet?

Cheers,
Paul

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=69410#69410





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org