From Mourad Boufarguine,

"There is a redundant cmake code at the end of osgViewer cmake script. The install command is issued in SETUP_LIBRARY macro."
"I spotted this when i tried a make install on the android port :) I saw some weird copy commands of osgViewer headers.
I managed to get all osg headers copied to cmake_install_prefix/include upon make install, but i can't (yet) get the libraries to be copied to cmake_install_prefix/lib (see attached files)"
This commit is contained in:
Robert Osfield 2011-03-11 10:24:12 +00:00
parent d33d8c5626
commit 339fe794b0
3 changed files with 11 additions and 11 deletions

View File

@ -25,6 +25,14 @@ IF(MSVC AND OSG_MSVC_VERSIONED_DLL)
HANDLE_MSVC_DLL() HANDLE_MSVC_DLL()
ENDIF() ENDIF()
IF(ANDROID)
INSTALL (
FILES ${TARGET_H}
DESTINATION ${INSTALL_INCDIR}/${LIB_NAME}
COMPONENT libopenscenegraph-dev
)
ELSE(ANDROID)
INSTALL( INSTALL(
TARGETS ${LIB_NAME} TARGETS ${LIB_NAME}
RUNTIME DESTINATION ${INSTALL_BINDIR} COMPONENT libopenscenegraph RUNTIME DESTINATION ${INSTALL_BINDIR} COMPONENT libopenscenegraph
@ -50,3 +58,5 @@ ELSE()
) )
# MESSAGE("${OSG_COMPILE_FRAMEWORKS_INSTALL_NAME_DIR}") # MESSAGE("${OSG_COMPILE_FRAMEWORKS_INSTALL_NAME_DIR}")
ENDIF() ENDIF()
ENDIF(ANDROID)

View File

@ -237,8 +237,8 @@ MACRO(SETUP_LIBRARY LIB_NAME)
ENDIF(TARGET_LIBRARIES_VARS) ENDIF(TARGET_LIBRARIES_VARS)
LINK_CORELIB_DEFAULT(${LIB_NAME}) LINK_CORELIB_DEFAULT(${LIB_NAME})
INCLUDE(ModuleInstall OPTIONAL)
ENDIF() ENDIF()
INCLUDE(ModuleInstall OPTIONAL)
ENDMACRO(SETUP_LIBRARY LIB_NAME) ENDMACRO(SETUP_LIBRARY LIB_NAME)
MACRO(SETUP_PLUGIN PLUGIN_NAME) MACRO(SETUP_PLUGIN PLUGIN_NAME)

View File

@ -249,13 +249,3 @@ IF(MINGW OR CYGWIN)
ENDIF() ENDIF()
SETUP_LIBRARY(${LIB_NAME}) SETUP_LIBRARY(${LIB_NAME})
FOREACH(INCLUDEFILE ${TARGET_H} )
FILE(RELATIVE_PATH REL_INCLUDEFILE ${HEADER_PATH} ${INCLUDEFILE})
GET_FILENAME_COMPONENT(REL_INCLUDE_PATH ${REL_INCLUDEFILE} PATH)
INSTALL(
FILES ${INCLUDEFILE}
DESTINATION ${INSTALL_INCDIR}/${LIB_NAME}/${REL_INCLUDE_PATH}
COMPONENT libopenscenegraph-dev
)
ENDFOREACH()