OpenSceneGraph/CMakeModules/ModuleInstall.cmake

36 lines
717 B
CMake
Raw Normal View History

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)
SET(INSTALL_BINDIR bin)
IF(WIN32)
SET(INSTALL_LIBDIR bin)
SET(INSTALL_ARCHIVEDIR lib)
ELSE(WIN32)
SET(INSTALL_LIBDIR lib${LIB_POSTFIX})
SET(INSTALL_ARCHIVEDIR lib${LIB_POSTFIX})
ENDIF(WIN32)
2007-03-05 21:27:55 +08:00
SET(HEADERS_GROUP "Header Files")
SOURCE_GROUP(
${HEADERS_GROUP}
FILES ${LIB_PUBLIC_HEADERS}
)
2007-03-05 21:27:55 +08:00
INSTALL(
TARGETS ${LIB_NAME}
RUNTIME DESTINATION ${INSTALL_BINDIR}
LIBRARY DESTINATION ${INSTALL_LIBDIR}
ARCHIVE DESTINATION ${INSTALL_LIBDIR}
)
# FIXME: Do not run for OS X framework
INSTALL(
FILES ${LIB_PUBLIC_HEADERS}
DESTINATION ${INSTALL_INCDIR}/${LIB_NAME}
)