2007-03-05 21:27:55 +08:00
|
|
|
# INSTALL and SOURCE_GROUP commands for OSG/OT/Producer Modules
|
|
|
|
|
|
|
|
# Required Vars:
|
|
|
|
# ${LIB_NAME}
|
|
|
|
# ${LIB_PUBLIC_HEADERS}
|
|
|
|
|
|
|
|
SET(INSTALL_INCDIR include)
|
2007-03-09 22:54:41 +08:00
|
|
|
SET(INSTALL_BINDIR bin)
|
|
|
|
IF(WIN32)
|
2007-04-27 17:49:28 +08:00
|
|
|
SET(INSTALL_LIBDIR bin)
|
|
|
|
SET(INSTALL_ARCHIVEDIR lib)
|
2009-04-09 17:23:45 +08:00
|
|
|
ELSE()
|
2007-04-27 17:49:28 +08:00
|
|
|
SET(INSTALL_LIBDIR lib${LIB_POSTFIX})
|
|
|
|
SET(INSTALL_ARCHIVEDIR lib${LIB_POSTFIX})
|
2009-04-09 17:23:45 +08:00
|
|
|
ENDIF()
|
2007-03-05 21:27:55 +08:00
|
|
|
|
|
|
|
SET(HEADERS_GROUP "Header Files")
|
|
|
|
|
|
|
|
SOURCE_GROUP(
|
2007-04-27 17:49:28 +08:00
|
|
|
${HEADERS_GROUP}
|
|
|
|
FILES ${LIB_PUBLIC_HEADERS}
|
2007-03-05 21:27:55 +08:00
|
|
|
)
|
|
|
|
|
2007-08-30 18:41:15 +08:00
|
|
|
IF(MSVC AND OSG_MSVC_VERSIONED_DLL)
|
2008-12-12 19:01:09 +08:00
|
|
|
HANDLE_MSVC_DLL()
|
2009-04-09 17:23:45 +08:00
|
|
|
ENDIF()
|
2007-03-09 22:54:41 +08:00
|
|
|
|
2007-03-05 21:27:55 +08:00
|
|
|
INSTALL(
|
2007-04-27 17:49:28 +08:00
|
|
|
TARGETS ${LIB_NAME}
|
2008-12-12 22:54:22 +08:00
|
|
|
RUNTIME DESTINATION ${INSTALL_BINDIR} COMPONENT libopenscenegraph
|
|
|
|
LIBRARY DESTINATION ${INSTALL_LIBDIR} COMPONENT libopenscenegraph
|
2010-04-19 21:44:42 +08:00
|
|
|
ARCHIVE DESTINATION ${INSTALL_ARCHIVEDIR} COMPONENT libopenscenegraph-dev
|
|
|
|
FRAMEWORK DESTINATION /Library/Frameworks
|
2007-03-05 21:27:55 +08:00
|
|
|
)
|
2008-12-12 19:01:09 +08:00
|
|
|
|
2010-04-19 21:44:42 +08:00
|
|
|
IF(NOT OSG_COMPILE_FRAMEWORKS)
|
|
|
|
INSTALL (
|
|
|
|
FILES ${LIB_PUBLIC_HEADERS}
|
|
|
|
DESTINATION ${INSTALL_INCDIR}/${LIB_NAME}
|
|
|
|
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()
|