From Stephan Huber and Mathieu Marache, "attached you'll find framework support for os x via cmake. Please credit

Mathieu Marache, he added the last missing piece to this puzzle.

I think it is safe to commit these changes to trunk, as the traditional
way via dylibs should work as before.

Here's some more info how to get frameworks:

With these modifications it is possible to compile frameworks on OS X,
when you set the Cmake-option OSG_COMPILE_FRAMEWORKS to true. If you
want to embed the frameworks in your app-bundle make sure to set
OSG_COMPILE_FRAMEWORKS_INSTALL_NAME_DIR accordingly.

You'll have to build the install-target of the generated xcode-projects
as this sets the install_name_dirs of the frameworks and plugins."
This commit is contained in:
Robert Osfield 2010-04-19 13:44:42 +00:00
parent a8332528f4
commit c091b5c2d1
9 changed files with 289 additions and 177 deletions

View File

@ -144,6 +144,8 @@ FIND_PACKAGE(OpenGL)
IF(APPLE) IF(APPLE)
FIND_LIBRARY(CARBON_LIBRARY Carbon) FIND_LIBRARY(CARBON_LIBRARY Carbon)
FIND_LIBRARY(COCOA_LIBRARY Cocoa) FIND_LIBRARY(COCOA_LIBRARY Cocoa)
OPTION(OSG_COMPILE_FRAMEWORKS "compile frameworks instead of dylibs (experimental)" OFF)
SET(OSG_COMPILE_FRAMEWORKS_INSTALL_NAME_DIR "@executable_path/../Frameworks" CACHE STRING "install name dir for compiled frameworks")
ENDIF() ENDIF()
IF(UNIX) IF(UNIX)

View File

@ -30,11 +30,24 @@ INSTALL(
RUNTIME DESTINATION ${INSTALL_BINDIR} COMPONENT libopenscenegraph RUNTIME DESTINATION ${INSTALL_BINDIR} COMPONENT libopenscenegraph
LIBRARY DESTINATION ${INSTALL_LIBDIR} COMPONENT libopenscenegraph LIBRARY DESTINATION ${INSTALL_LIBDIR} COMPONENT libopenscenegraph
ARCHIVE DESTINATION ${INSTALL_ARCHIVEDIR} COMPONENT libopenscenegraph-dev ARCHIVE DESTINATION ${INSTALL_ARCHIVEDIR} COMPONENT libopenscenegraph-dev
FRAMEWORK DESTINATION /Library/Frameworks
) )
# FIXME: Do not run for OS X framework IF(NOT OSG_COMPILE_FRAMEWORKS)
INSTALL( INSTALL (
FILES ${LIB_PUBLIC_HEADERS} FILES ${LIB_PUBLIC_HEADERS}
DESTINATION ${INSTALL_INCDIR}/${LIB_NAME} DESTINATION ${INSTALL_INCDIR}/${LIB_NAME}
COMPONENT libopenscenegraph-dev COMPONENT libopenscenegraph-dev
) )
ELSE()
SET(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE)
SET(CMAKE_INSTALL_RPATH "${OSG_COMPILE_FRAMEWORKS_INSTALL_NAME_DIR}")
SET_TARGET_PROPERTIES(${LIB_NAME} PROPERTIES
FRAMEWORK TRUE
FRAMEWORK_VERSION ${OPENSCENEGRAPH_VERSION}
PUBLIC_HEADER "${LIB_PUBLIC_HEADERS}"
INSTALL_NAME_DIR "${OSG_COMPILE_FRAMEWORKS_INSTALL_NAME_DIR}"
)
# MESSAGE("${OSG_COMPILE_FRAMEWORKS_INSTALL_NAME_DIR}")
ENDIF()

View File

@ -127,10 +127,20 @@ INSTALL(
LIBRARY DESTINATION lib${LIB_POSTFIX} COMPONENT libopenthreads LIBRARY DESTINATION lib${LIB_POSTFIX} COMPONENT libopenthreads
RUNTIME DESTINATION bin COMPONENT libopenthreads RUNTIME DESTINATION bin COMPONENT libopenthreads
) )
INSTALL(
IF(!OSG_COMPILE_FRAMEWORKS)
INSTALL(
FILES ${OpenThreads_PUBLIC_HEADERS} FILES ${OpenThreads_PUBLIC_HEADERS}
DESTINATION include/OpenThreads DESTINATION include/OpenThreads
COMPONENT libopenthreads-dev COMPONENT libopenthreads-dev
) )
ELSE()
SET_TARGET_PROPERTIES(${LIB_NAME} PROPERTIES
FRAMEWORK TRUE
FRAMEWORK_VERSION ${OPENTHREADS_VERSION}
PUBLIC_HEADER "${OpenThreads_PUBLIC_HEADERS}"
INSTALL_NAME_DIR "${OSG_COMPILE_FRAMEWORKS_INSTALL_NAME_DIR}"
)
ENDIF()
#commented out# INCLUDE(ModuleInstall OPTIONAL) #commented out# INCLUDE(ModuleInstall OPTIONAL)

View File

@ -97,6 +97,9 @@ ReaderWriterDAE::writeNode( const osg::Node& node,
{ {
SERIALIZER(); SERIALIZER();
std::istringstream iss(options->getOptionString());
std::string opt;
bool bOwnDAE = false; bool bOwnDAE = false;
DAE* pDAE = NULL; DAE* pDAE = NULL;
@ -105,30 +108,48 @@ ReaderWriterDAE::writeNode( const osg::Node& node,
// Process options // Process options
bool usePolygon(false); // Use plugin option "polygon" to enable bool usePolygon(false); // Use plugin option "polygon" to enable
bool GoogleMode(false); // Use plugin option "GoogleMode" to enable bool googleMode(false); // Use plugin option "GoogleMode" to enable
bool writeExtras(true); // Use plugin option "NoExtras" to disable bool writeExtras(true); // Use plugin option "NoExtras" to disable
bool earthTex(false); // Use plugin option "DaeEarthTex" to enable
bool zUpAxis(false); // Use plugin option "ZUpAxis" to enable
bool forceTexture(false); // Use plugin option "ForceTexture" to enable
if( options ) if( options )
{ {
pDAE = (DAE*)options->getPluginData("DAE"); pDAE = (DAE*)options->getPluginData("DAE");
std::istringstream iss( options->getOptionString() ); // Sukender's note: I don't know why DAE seems to accept comma-sparated options instead of space-separated options as other ReaderWriters. However, to avoid breaking compatibility, here's a workaround:
std::string optString( options->getOptionString() );
for(std::string::iterator it=optString.begin(); it!=optString.end(); ++it) {
if (*it == ' ') *it = ',';
}
std::istringstream iss( optString );
std::string opt; std::string opt;
bool unrecognizedOption = false;
//while (iss >> opt)
while( std::getline( iss, opt, ',' ) ) while( std::getline( iss, opt, ',' ) )
{ {
if( opt == "polygon") usePolygon = true; if( opt == "polygon") usePolygon = true;
else if (opt == "GoogleMode") GoogleMode = true; else if (opt == "GoogleMode") googleMode = true;
else if (opt == "NoExtras") writeExtras = false; else if (opt == "NoExtras") writeExtras = false;
else if (opt == "DaeEarthTex") earthTex = true;
else if (opt == "ZUpAxis") zUpAxis = true;
else if (opt == "ForceTexture") forceTexture = true;
else else
{ {
osg::notify(osg::WARN) osg::notify(osg::NOTICE)
<< std::endl << "COLLADA dae plugin: unrecognized option \"" << opt << std::endl << std::endl << "COLLADA dae plugin: unrecognized option \"" << opt << std::endl;
unrecognizedOption = true;
}
}
if (unrecognizedOption) {
// TODO Remove this or make use of supportedOptions()
osg::notify(osg::NOTICE)
<< "comma-delimited options:" << std::endl << std::endl << "comma-delimited options:" << std::endl << std::endl
<< "\tpolygon = use polygons instead of polylists for element" << std::endl << "\tpolygon = use polygons instead of polylists for element" << std::endl
<< "\tGoogleMode = write files suitable for use by Google products" << std::endl << "\tGoogleMode = write files suitable for use by Google products" << std::endl
<< "example: osgviewer -O polygon bar.dae" << std::endl << std::endl; << "example: osgviewer -O polygon bar.dae" << std::endl << std::endl;
} }
} }
}
if (NULL == pDAE) if (NULL == pDAE)
{ {
@ -141,7 +162,7 @@ ReaderWriterDAE::writeNode( const osg::Node& node,
osg::NodeVisitor::TraversalMode traversalMode = writeExtras ? osg::NodeVisitor::TRAVERSE_ALL_CHILDREN : osg::NodeVisitor::TRAVERSE_ACTIVE_CHILDREN; osg::NodeVisitor::TraversalMode traversalMode = writeExtras ? osg::NodeVisitor::TRAVERSE_ALL_CHILDREN : osg::NodeVisitor::TRAVERSE_ACTIVE_CHILDREN;
osgDAE::daeWriter daeWriter(pDAE, fileURI, usePolygon, GoogleMode, traversalMode, writeExtras); osgDAE::daeWriter daeWriter(pDAE, fileURI, usePolygon, googleMode, traversalMode, writeExtras, earthTex, zUpAxis, forceTexture);
daeWriter.setRootNode( node ); daeWriter.setRootNode( node );
const_cast<osg::Node*>(&node)->accept( daeWriter ); const_cast<osg::Node*>(&node)->accept( daeWriter );

View File

@ -17,6 +17,15 @@ public:
supportsExtension("dae","COLLADA 1.4.x DAE format"); supportsExtension("dae","COLLADA 1.4.x DAE format");
// Collada zip archive (contains one or more dae files and a manifest.xml) // Collada zip archive (contains one or more dae files and a manifest.xml)
supportsExtension("zae","COLLADA 1.4.x ZAE format"); supportsExtension("zae","COLLADA 1.4.x ZAE format");
supportsOption("polygon", "Use polygons instead of polylists for element (Write option)");
supportsOption("GoogleMode", "Write files suitable for use by Google products");
supportsOption("NoExtras", "Write option (Undocumented)");
supportsOption("DaeEarthTex", "DAE settings for writing earth textures");
supportsOption("ZUpAxis", "indicates if the up axis is on Z axis");
supportsOption("ForceTexture", "force the use an image for a texture, even if the file is not found");
supportsOption("StrictTransparency", "Read option (Undocumented)");
} }
const char* className() const { return "COLLADA 1.4.x DAE reader/writer"; } const char* className() const { return "COLLADA 1.4.x DAE reader/writer"; }

View File

@ -100,13 +100,18 @@ void daeWriter::processMaterial( osg::StateSet *ss, domBind_material *pDomBindMa
domImage::domInit_from *imgif = daeSafeCast< domImage::domInit_from >( img->add( COLLADA_ELEMENT_INIT_FROM ) ); domImage::domInit_from *imgif = daeSafeCast< domImage::domInit_from >( img->add( COLLADA_ELEMENT_INIT_FROM ) );
std::string fileURI = ReaderWriterDAE::ConvertFilePathToColladaCompatibleURI(osgDB::findDataFile(osgimg->getFileName())); std::string fileURI = ReaderWriterDAE::ConvertFilePathToColladaCompatibleURI(osgDB::findDataFile(osgimg->getFileName()));
if (fileURI=="" && m_ForceTexture)
{
fileURI = osgimg->getFileName();
}
daeURI dd(*dae, fileURI); daeURI dd(*dae, fileURI);
imgif->setValue( dd ); imgif->setValue( dd );
// The document URI should contain the canonical path it was created with // The document URI should contain the canonical path it was created with
imgif->getValue().makeRelativeTo(doc->getDocumentURI()); imgif->getValue().makeRelativeTo(doc->getDocumentURI());
if (!m_EarthTex)
#ifndef EARTH_TEX {
domCommon_newparam_type *np = daeSafeCast< domCommon_newparam_type >( pc->add(COLLADA_ELEMENT_NEWPARAM) ); domCommon_newparam_type *np = daeSafeCast< domCommon_newparam_type >( pc->add(COLLADA_ELEMENT_NEWPARAM) );
std::string surfName = efName + "-surface"; std::string surfName = efName + "-surface";
np->setSid( surfName.c_str() ); np->setSid( surfName.c_str() );
@ -227,12 +232,15 @@ void daeWriter::processMaterial( osg::StateSet *ss, domBind_material *pDomBindMa
domCommon_color_or_texture_type_complexType::domTexture *dtex = daeSafeCast< domCommon_color_or_texture_type_complexType::domTexture >( cot->add( COLLADA_ELEMENT_TEXTURE ) ); domCommon_color_or_texture_type_complexType::domTexture *dtex = daeSafeCast< domCommon_color_or_texture_type_complexType::domTexture >( cot->add( COLLADA_ELEMENT_TEXTURE ) );
dtex->setTexture( sampName.c_str() ); dtex->setTexture( sampName.c_str() );
dtex->setTexcoord( "texcoord0" ); dtex->setTexcoord( "texcoord0" );
#else }
else
{
// Earth tex
domCommon_color_or_texture_type *cot = daeSafeCast< domCommon_color_or_texture_type >( phong->add( COLLADA_ELEMENT_DIFFUSE ) ); domCommon_color_or_texture_type *cot = daeSafeCast< domCommon_color_or_texture_type >( phong->add( COLLADA_ELEMENT_DIFFUSE ) );
domCommon_color_or_texture_type_complexType::domTexture *dtex = daeSafeCast< domCommon_color_or_texture_type_complexType::domTexture >( cot->add( COLLADA_ELEMENT_TEXTURE ) ); domCommon_color_or_texture_type_complexType::domTexture *dtex = daeSafeCast< domCommon_color_or_texture_type_complexType::domTexture >( cot->add( COLLADA_ELEMENT_TEXTURE ) );
dtex->setTexture( iName.c_str() ); dtex->setTexture( iName.c_str() );
dtex->setTexcoord( "texcoord0" ); dtex->setTexcoord( "texcoord0" );
#endif }
domInstance_material::domBind_vertex_input *bvi = daeSafeCast< domInstance_material::domBind_vertex_input >( pDomInstanceMaterial->add( COLLADA_ELEMENT_BIND_VERTEX_INPUT ) ); domInstance_material::domBind_vertex_input *bvi = daeSafeCast< domInstance_material::domBind_vertex_input >( pDomInstanceMaterial->add( COLLADA_ELEMENT_BIND_VERTEX_INPUT ) );
bvi->setSemantic( "texcoord0" ); bvi->setSemantic( "texcoord0" );
@ -370,13 +378,16 @@ void daeWriter::processMaterial( osg::StateSet *ss, domBind_material *pDomBindMa
ctt->setOpaque( FX_OPAQUE_ENUM_A_ONE ); ctt->setOpaque( FX_OPAQUE_ENUM_A_ONE );
domCommon_color_or_texture_type_complexType::domTexture * dtex = daeSafeCast< domCommon_color_or_texture_type_complexType::domTexture >( ctt->add(COLLADA_ELEMENT_TEXTURE) ); domCommon_color_or_texture_type_complexType::domTexture * dtex = daeSafeCast< domCommon_color_or_texture_type_complexType::domTexture >( ctt->add(COLLADA_ELEMENT_TEXTURE) );
#ifndef EARTH_TEX if (!m_EarthTex)
{
std::string sampName = efName + "-sampler"; std::string sampName = efName + "-sampler";
dtex->setTexture( sampName.c_str() ); dtex->setTexture( sampName.c_str() );
#else }
else
{
std::string iName = efName + "-image"; std::string iName = efName + "-image";
dtex->setTexture( iName.c_str() ); dtex->setTexture( iName.c_str() );
#endif }
dtex->setTexcoord( "texcoord0" ); dtex->setTexcoord( "texcoord0" );
} }
else else

View File

@ -23,14 +23,21 @@
namespace osgDAE { namespace osgDAE {
std::string toString(osg::Vec3 value) std::string toString(const osg::Vec3f& value)
{ {
std::stringstream str; std::stringstream str;
str << value.x() << " " << value.y() << " " << value.z(); str << value.x() << " " << value.y() << " " << value.z();
return str.str(); return str.str();
} }
std::string toString(osg::Matrix value) std::string toString(const osg::Vec3d& value)
{
std::stringstream str;
str << value.x() << " " << value.y() << " " << value.z();
return str.str();
}
std::string toString(const osg::Matrix& value)
{ {
std::stringstream str; std::stringstream str;
str << value(0,0) << " " << value(1,0) << " " << value(2,0) << " " << value(3,0) << " " str << value(0,0) << " " << value(1,0) << " " << value(2,0) << " " << value(3,0) << " "
@ -41,13 +48,17 @@ std::string toString(osg::Matrix value)
} }
daeWriter::daeWriter( DAE *dae_, const std::string &fileURI, bool _usePolygons, bool GoogleMode, TraversalMode tm, bool _writeExtras) : osg::NodeVisitor( tm ), daeWriter::daeWriter( DAE *dae_, const std::string &fileURI, bool _usePolygons, bool googleMode, TraversalMode tm, bool _writeExtras, bool earthTex, bool zUpAxis, bool forceTexture) : osg::NodeVisitor( tm ),
dae(dae_), dae(dae_),
_domLibraryAnimations(NULL), _domLibraryAnimations(NULL),
writeExtras(_writeExtras), writeExtras(_writeExtras),
rootName(*dae_), rootName(*dae_),
usePolygons (_usePolygons), usePolygons (_usePolygons),
m_GoogleMode(GoogleMode) m_GoogleMode(googleMode),
m_EarthTex(earthTex),
m_ZUpAxis(zUpAxis),
m_ForceTexture(forceTexture),
m_CurrentRenderingHint(osg::StateSet::DEFAULT_BIN)
{ {
success = true; success = true;
@ -68,7 +79,7 @@ daeWriter::daeWriter( DAE *dae_, const std::string &fileURI, bool _usePolygons,
currentNode->setId( "sceneRoot" ); currentNode->setId( "sceneRoot" );
//create Asset //create Asset
createAssetTag(); createAssetTag(m_ZUpAxis);
lib_cameras = NULL; lib_cameras = NULL;
lib_effects = NULL; lib_effects = NULL;
@ -149,7 +160,7 @@ std::string daeWriter::uniquify( const std::string &name )
return ""; return "";
} }
void daeWriter::createAssetTag() void daeWriter::createAssetTag( bool isZUpAxis )
{ {
domAsset *asset = daeSafeCast< domAsset >(dom->add( COLLADA_ELEMENT_ASSET ) ); domAsset *asset = daeSafeCast< domAsset >(dom->add( COLLADA_ELEMENT_ASSET ) );
domAsset::domCreated *c = daeSafeCast< domAsset::domCreated >(asset->add(COLLADA_ELEMENT_CREATED)); domAsset::domCreated *c = daeSafeCast< domAsset::domCreated >(asset->add(COLLADA_ELEMENT_CREATED));

View File

@ -135,7 +135,7 @@ class daeWriter : public osg::NodeVisitor
protected: protected:
class ArrayNIndices; class ArrayNIndices;
public: public:
daeWriter( DAE *dae_, const std::string &fileURI, bool usePolygons=false, bool GoogleMode = false,TraversalMode tm=TRAVERSE_ALL_CHILDREN, bool writeExtras = true); daeWriter( DAE *dae_, const std::string &fileURI, bool usePolygons=false, bool googleMode = false, TraversalMode tm=TRAVERSE_ALL_CHILDREN, bool writeExtras = true, bool earthTex = false, bool zUpAxis=false, bool forceTexture=false);
virtual ~daeWriter(); virtual ~daeWriter();
void setRootNode( const osg::Node &node ); void setRootNode( const osg::Node &node );
@ -190,7 +190,7 @@ protected: //methods
void processMaterial( osg::StateSet *ss, domBind_material *pDomBindMaterial, const std::string &geoName ); void processMaterial( osg::StateSet *ss, domBind_material *pDomBindMaterial, const std::string &geoName );
void createAssetTag(); void createAssetTag(bool isZUpAxis);
void pushStateSet(osg::StateSet* ss); void pushStateSet(osg::StateSet* ss);
@ -306,9 +306,18 @@ private: //members
/** provide an unique name */ /** provide an unique name */
std::string uniquify( const std::string &name ); std::string uniquify( const std::string &name );
/** work in Google compatibility mode */ /** work in Google compatibility mode. In daeWMaterials, change transparency color. And in daeWGeometry, replace tristrip and trifans by triangles*/
bool m_GoogleMode; bool m_GoogleMode;
/** work in Google compatibility mode for textures*/
bool m_EarthTex;
/** indicates if the up axis is on Z axis*/
bool m_ZUpAxis;
/** force the use an image for a texture, even if the file is not found*/
bool m_ForceTexture;
/** Current RenderingHint */ /** Current RenderingHint */
/** This are needed because the stateSet merge code currently does not handle it */ /** This are needed because the stateSet merge code currently does not handle it */
int m_CurrentRenderingHint; int m_CurrentRenderingHint;

View File

@ -1,4 +1,3 @@
# FIXME: For OS X, need flag for Framework or dylib # FIXME: For OS X, need flag for Framework or dylib
IF(DYNAMIC_OPENSCENEGRAPH) IF(DYNAMIC_OPENSCENEGRAPH)
ADD_DEFINITIONS(-DOSGVIEWER_LIBRARY) ADD_DEFINITIONS(-DOSGVIEWER_LIBRARY)
@ -71,11 +70,24 @@ ELSE()
IF(${OSG_WINDOWING_SYSTEM} STREQUAL "Cocoa") IF(${OSG_WINDOWING_SYSTEM} STREQUAL "Cocoa")
ADD_DEFINITIONS(-DUSE_DARWIN_COCOA_IMPLEMENTATION) ADD_DEFINITIONS(-DUSE_DARWIN_COCOA_IMPLEMENTATION)
IF(OSG_COMPILE_FRAMEWORKS)
SET(LIB_COMMON_FILES ${LIB_COMMON_FILES}
${HEADER_PATH}/api/Cocoa/GraphicsHandleCocoa
${HEADER_PATH}/api/Cocoa/GraphicsWindowCocoa
${HEADER_PATH}/api/Cocoa/PixelBufferCocoa
)
SET_PROPERTY(SOURCE ${HEADER_PATH}/api/Cocoa/GraphicsHandleCocoa PROPERTY MACOSX_PACKAGE_LOCATION Headers/api/Cocoa)
SET_PROPERTY(SOURCE ${HEADER_PATH}/api/Cocoa/GraphicsWindowCocoa PROPERTY MACOSX_PACKAGE_LOCATION Headers/api/Cocoa)
SET_PROPERTY(SOURCE ${HEADER_PATH}/api/Cocoa/PixelBufferCocoa PROPERTY MACOSX_PACKAGE_LOCATION Headers/api/Cocoa)
ELSE()
SET(LIB_PUBLIC_HEADERS ${LIB_PUBLIC_HEADERS} SET(LIB_PUBLIC_HEADERS ${LIB_PUBLIC_HEADERS}
${HEADER_PATH}/api/Cocoa/GraphicsHandleCocoa ${HEADER_PATH}/api/Cocoa/GraphicsHandleCocoa
${HEADER_PATH}/api/Cocoa/GraphicsWindowCocoa ${HEADER_PATH}/api/Cocoa/GraphicsWindowCocoa
${HEADER_PATH}/api/Cocoa/PixelBufferCocoa ${HEADER_PATH}/api/Cocoa/PixelBufferCocoa
) )
ENDIF()
SET(LIB_COMMON_FILES ${LIB_COMMON_FILES} SET(LIB_COMMON_FILES ${LIB_COMMON_FILES}
GraphicsWindowCocoa.mm GraphicsWindowCocoa.mm
DarwinUtils.h DarwinUtils.h
@ -85,17 +97,31 @@ ELSE()
SET(LIB_EXTRA_LIBS ${COCOA_LIBRARY} ${LIB_EXTRA_LIBS}) SET(LIB_EXTRA_LIBS ${COCOA_LIBRARY} ${LIB_EXTRA_LIBS})
ELSEIF(${OSG_WINDOWING_SYSTEM} STREQUAL "Carbon") ELSEIF(${OSG_WINDOWING_SYSTEM} STREQUAL "Carbon")
ADD_DEFINITIONS(-DUSE_DARWIN_CARBON_IMPLEMENTATION) ADD_DEFINITIONS(-DUSE_DARWIN_CARBON_IMPLEMENTATION)
IF(OSG_COMPILE_FRAMEWORKS)
SET(LIB_COMMON_FILES ${LIB_COMMON_FILES}
${HEADER_PATH}/api/Carbon/GraphicsHandleCarbon
${HEADER_PATH}/api/Carbon/GraphicsWindowCarbon
${HEADER_PATH}/api/Carbon/PixelBufferCarbon
)
SET_PROPERTY(SOURCE ${HEADER_PATH}/api/Carbon/GraphicsHandleCarbon PROPERTY MACOSX_PACKAGE_LOCATION Headers/api/Carbon)
SET_PROPERTY(SOURCE ${HEADER_PATH}/api/Carbon/GraphicsWindowCarbon PROPERTY MACOSX_PACKAGE_LOCATION Headers/api/Carbon)
SET_PROPERTY(SOURCE ${HEADER_PATH}/api/Carbon/PixelBufferCarbon PROPERTY MACOSX_PACKAGE_LOCATION Headers/api/Carbon)
ELSE()
SET(LIB_PUBLIC_HEADERS ${LIB_PUBLIC_HEADERS} SET(LIB_PUBLIC_HEADERS ${LIB_PUBLIC_HEADERS}
${HEADER_PATH}/api/Carbon/GraphicsHandleCarbon ${HEADER_PATH}/api/Carbon/GraphicsHandleCarbon
${HEADER_PATH}/api/Carbon/GraphicsWindowCarbon ${HEADER_PATH}/api/Carbon/GraphicsWindowCarbon
${HEADER_PATH}/api/Carbon/PixelBufferCarbon ${HEADER_PATH}/api/Carbon/PixelBufferCarbon
) )
ENDIF()
SET(LIB_COMMON_FILES ${LIB_COMMON_FILES} SET(LIB_COMMON_FILES ${LIB_COMMON_FILES}
GraphicsWindowCarbon.cpp GraphicsWindowCarbon.cpp
DarwinUtils.h DarwinUtils.h
DarwinUtils.mm DarwinUtils.mm
PixelBufferCarbon.cpp PixelBufferCarbon.cpp
) )
SET(LIB_EXTRA_LIBS ${COCOA_LIBRARY} ${LIB_EXTRA_LIBS}) SET(LIB_EXTRA_LIBS ${COCOA_LIBRARY} ${LIB_EXTRA_LIBS})
ELSE() ELSE()
# X11 for everybody else # X11 for everybody else