Here is the corrected CMakeLists.txt file for the Windows XP
VisualStudio 8 SP1 version of 'Plug 3d pfb' Performer plugin.
INCLUDE_DIRECTORIES( ${PERFORMER_INCLUDE_DIR} )
SET(TARGET_SRC
ReaderWriterPFB.cpp
ConvertFromPerformer.cpp
)
SET(TARGET_H
ConvertFromPerformer.h
)
IF(MSVC)
SET(TARGET_EXTERNAL_LIBRARIES
libpfdu-util
)
ELSE(MSVC)
SET(TARGET_EXTERNAL_LIBRARIES
pfdu pfutil
)
ENDIF(MSVC)
SET(TARGET_LIBRARIES_VARS PERFORMER_LIBRARY )
#### end var setup ###
SETUP_PLUGIN(pfb)
B.t.w. These lines in the CMakeLists.txt file for the 'Plug other qt'
quicktime plugin doesn't do anything.
IF(WIN32)
SET(CMAKE_SHARED_LINKER_FLAGS_DEBUG
"${CMAKE_SHARED_LINKER_FLAGS_DEBUG} /NODEFAULTLIB:MSVCRT")
ENDIF(WIN32)
I.e. /NODEFAULTLIB:MSVCRT doesn't show up in the generated vcproj files.
Poking around a little shows me some lines in the 'Plug image gif'
CMakeLists.txt file like:
IF(MSVC)
SET_TARGET_PROPERTIES("${TARGET_DEFAULT_PREFIX}${TARGET_NAME}"
PROPERTIES LINK_FLAGS_DEBUG "/NODEFAULTLIB:MSVCRT")
ENDIF(MSVC)
Which do add the /NODEFAULTLIB:MSVCRT to the build settings but does it
in an obscure way by putting it in Additional options of the Command
Line page of the Property pages for that project
(http://www.cs.utexas.edu/~jss/OSG/bug1.jpg) instead of in the 'Ignore
Specific Library' line of the Input page of the Property pages for that
project (http://www.cs.utexas.edu/~jss/OSG/bug2.JPG). I don't know how
to tell CMake to put the NODEFAULTLIB in the 'Ignore Specific Library'
line. Does anyone?
If you modify this slightly ...
IF(MSVC)
SET_TARGET_PROPERTIES("${TARGET_DEFAULT_PREFIX}${TARGET_NAME}"
PROPERTIES LINK_FLAGS_DEBUG "/NODEFAULTLIB:LIBCMT")
ENDIF(MSVC)
... and replace the IF(WIN32) lines described above for the Quicktime
CMakelists.txt then 'Plug other qt' will link on windows without warning.
John.
_______________________________________________
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/