Permalink
Browse files

fixed: lib order, process core libs first

git-svn-id: https://external.lite3d.com/opensg/svn_repo/trunk@2274 4683daeb-ad0f-0410-a623-93161e962ae5
  • Loading branch information...
1 parent 97ee4f5 commit 3f9f72dbc7b548b609b23ff2a8e3406650ea1f3b vossg committed Jan 25, 2010
Showing with 16 additions and 5 deletions.
  1. +16 −5 CMakeLists.txt
View
@@ -758,15 +758,26 @@ FILE(GLOB_RECURSE OSG_LIBRARY_CONFIG_FILE_BASE RELATIVE "${CMAKE_SOURCE_DIR}"
FILE(GLOB_RECURSE OSG_LIBRARY_CONFIG_FILE_SYSTEM RELATIVE "${CMAKE_SOURCE_DIR}"
"Source/CMakeLists.Lib.OSGSystem.txt")
-FILE(GLOB_RECURSE OSG_LIBRARY_CONFIG_FILES RELATIVE "${CMAKE_SOURCE_DIR}"
+FILE(GLOB_RECURSE _OSG_LIBRARY_CONFIG_FILES RELATIVE "${CMAKE_SOURCE_DIR}"
"Source/*CMakeLists.Lib.*.txt")
-LIST(REMOVE_ITEM OSG_LIBRARY_CONFIG_FILES ${OSG_LIBRARY_CONFIG_FILE_BASE})
-LIST(REMOVE_ITEM OSG_LIBRARY_CONFIG_FILES ${OSG_LIBRARY_CONFIG_FILE_SYSTEM})
+LIST(REMOVE_ITEM _OSG_LIBRARY_CONFIG_FILES ${OSG_LIBRARY_CONFIG_FILE_BASE})
+LIST(REMOVE_ITEM _OSG_LIBRARY_CONFIG_FILES ${OSG_LIBRARY_CONFIG_FILE_SYSTEM})
-LIST(INSERT OSG_LIBRARY_CONFIG_FILES 0 ${OSG_LIBRARY_CONFIG_FILE_SYSTEM})
-LIST(INSERT OSG_LIBRARY_CONFIG_FILES 0 ${OSG_LIBRARY_CONFIG_FILE_BASE})
+LIST(APPEND OSG_LIBRARY_CONFIG_FILES ${OSG_LIBRARY_CONFIG_FILE_BASE})
+LIST(APPEND OSG_LIBRARY_CONFIG_FILES ${OSG_LIBRARY_CONFIG_FILE_SYSTEM})
+FOREACH(_OSG_LIBRARY_CONFIG ${_OSG_LIBRARY_CONFIG_FILES})
+ STRING(REGEX MATCH Source/Contrib _OSG_FOUND_CONTRIB_CONFIG ${_OSG_LIBRARY_CONFIG})
+
+ IF(_OSG_FOUND_CONTRIB_CONFIG)
+ LIST(APPEND _OSG_CONTRIB_LIBRARY_CONFIG_FILES ${_OSG_LIBRARY_CONFIG})
+ ELSE()
+ LIST(APPEND OSG_LIBRARY_CONFIG_FILES ${_OSG_LIBRARY_CONFIG})
+ ENDIF(_OSG_FOUND_CONTRIB_CONFIG)
+ENDFOREACH(_OSG_LIBRARY_CONFIG ${_OSG_LIBRARY_CONFIG_FILES})
+
+LIST(APPEND OSG_LIBRARY_CONFIG_FILES ${_OSG_CONTRIB_LIBRARY_CONFIG_FILES})
FOREACH(_OSG_LIBRARY_CONFIG ${OSG_LIBRARY_CONFIG_FILES})

0 comments on commit 3f9f72d

Please sign in to comment.