Permalink
Browse files

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)"
  • Loading branch information...
1 parent 69939f8 commit 47759892801f19f1b80f2f6705c8b1a1385d9a81 @osg-training-guest osg-training-guest committed Mar 11, 2011
Showing with 11 additions and 11 deletions.
  1. +10 −0 CMakeModules/ModuleInstall.cmake
  2. +1 −1 CMakeModules/OsgMacroUtils.cmake
  3. +0 −10 src/osgViewer/CMakeLists.txt
@@ -25,6 +25,14 @@ IF(MSVC AND OSG_MSVC_VERSIONED_DLL)
HANDLE_MSVC_DLL()
ENDIF()
+IF(ANDROID)
+ INSTALL (
+ FILES ${TARGET_H}
+ DESTINATION ${INSTALL_INCDIR}/${LIB_NAME}
+ COMPONENT libopenscenegraph-dev
+ )
+ELSE(ANDROID)
+
INSTALL(
TARGETS ${LIB_NAME}
RUNTIME DESTINATION ${INSTALL_BINDIR} COMPONENT libopenscenegraph
@@ -50,3 +58,5 @@ ELSE()
)
# MESSAGE("${OSG_COMPILE_FRAMEWORKS_INSTALL_NAME_DIR}")
ENDIF()
+
+ENDIF(ANDROID)
@@ -237,8 +237,8 @@ MACRO(SETUP_LIBRARY LIB_NAME)
ENDIF(TARGET_LIBRARIES_VARS)
LINK_CORELIB_DEFAULT(${LIB_NAME})
- INCLUDE(ModuleInstall OPTIONAL)
ENDIF()
+ INCLUDE(ModuleInstall OPTIONAL)
ENDMACRO(SETUP_LIBRARY LIB_NAME)
MACRO(SETUP_PLUGIN PLUGIN_NAME)
@@ -249,13 +249,3 @@ IF(MINGW OR CYGWIN)
ENDIF()
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()

0 comments on commit 4775989

Please sign in to comment.