Hi John,

As a quick test I deleted the line

FRAMEWORK DESTINATION /Library/Frameworks

in CMakeModules/ModuleInstall.cmake, and everything builds and installs
just fine.

Yes, that's great news.

I tried this:

INSTALL(
TARGETS ${LIB_NAME}
RUNTIME DESTINATION ${INSTALL_BINDIR} COMPONENT libopenscenegraph
LIBRARY DESTINATION ${INSTALL_LIBDIR} COMPONENT libopenscenegraph
ARCHIVE DESTINATION ${INSTALL_ARCHIVEDIR} COMPONENT libopenscenegraph-dev
IF(APPLE)
FRAMEWORK DESTINATION /Library/Frameworks
ENDIF
)

That won't work, the IF construct is not a preprocessor directive like #if would be in C, it's like if() in C. Consider this code:

sprintf("my string is %s",
if (0)
  "string"
else
  "otherstring"
);

Would that work in C? No because your if is within a function call. Same thing here, you need to have your if outside the INSTALL() function call, and copy it in both the IF and ELSE and just have FRAMEWORK in the IF(APPLE) branch.

But if what Stephan says is true, then it means that even if guarded by an IF(APPLE) the parser will choke on the FRAMEWORK keyword so it won't work...

Perhaps we could have that function in a separate file which would only be loaded IF(APPLE)? Would that work?

J-S
--
______________________________________________________
Jean-Sebastien Guay    jean-sebastien.g...@cm-labs.com
                               http://www.cm-labs.com/
                        http://whitestar02.webhop.org/
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to