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

@@ -127,10 +127,20 @@ INSTALL(
LIBRARY DESTINATION lib${LIB_POSTFIX} COMPONENT libopenthreads
RUNTIME DESTINATION bin COMPONENT libopenthreads
)
INSTALL(
FILES ${OpenThreads_PUBLIC_HEADERS}
DESTINATION include/OpenThreads
COMPONENT libopenthreads-dev
IF(!OSG_COMPILE_FRAMEWORKS)
INSTALL(
FILES ${OpenThreads_PUBLIC_HEADERS}
DESTINATION include/OpenThreads
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)