CMake: use a global list to store libraries built rather then cmake_blender_libs...
authorCampbell Barton <ideasman42@gmail.com>
Mon, 6 Dec 2010 10:56:37 +0000 (10:56 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Mon, 6 Dec 2010 10:56:37 +0000 (10:56 +0000)
CMakeLists.txt
build_files/cmake/macros.cmake
source/blenderplayer/CMakeLists.txt
source/creator/CMakeLists.txt

index acfcd820cc957fd09c082627b4ff229efb13bac2..1540e54f694d42cb9095e3c05493fc8335adebd7 100644 (file)
@@ -992,7 +992,7 @@ ENDIF(WITH_CXX_GUARDEDALLOC)
 
 #-----------------------------------------------------------------------------
 # Libraries
-FILE(WRITE ${CMAKE_BINARY_DIR}/cmake_blender_libs.txt "")
+
 ADD_SUBDIRECTORY(source)
 ADD_SUBDIRECTORY(intern)
 ADD_SUBDIRECTORY(extern)
index 2cac2658104a5cf175fcf0440b5651f1c81e3601..cb201c53a22f02303dc678db0aa6c6ff0a47609d 100644 (file)
@@ -41,8 +41,8 @@ MACRO(BLENDERLIB
 
        BLENDERLIB_NOLIST(${name} "${sources}" "${includes}")
 
-       # Add to blender's list of libraries
-       FILE(APPEND ${CMAKE_BINARY_DIR}/cmake_blender_libs.txt "${name};")
+       SET_PROPERTY(GLOBAL APPEND PROPERTY BLENDER_LINK_LIBS ${name})
+
 ENDMACRO(BLENDERLIB)
 
 MACRO(SETUP_LIBDIRS)
index f2b7b72ac9a2f372a8b9742ba72503d9f78099a1..fa6521e7f8dca1245b9078157c44128aaf3d65f9 100644 (file)
@@ -51,12 +51,16 @@ ENDIF(WIN32 AND NOT UNIX)
 
 ADD_DEPENDENCIES(blenderplayer makesdna)
 
-FILE(READ ${CMAKE_BINARY_DIR}/cmake_blender_libs.txt BLENDER_LINK_LIBS)
+GET_PROPERTY(BLENDER_LINK_LIBS GLOBAL PROPERTY BLENDER_LINK_LIBS)
 
-SET(BLENDER_LINK_LIBS ${BLENDER_LINK_LIBS} ge_player_common ge_player_ghost blenkernel_blc)
+LIST(APPEND BLENDER_LINK_LIBS
+       ge_player_common
+       ge_player_ghost
+       blenkernel_blc
+)
 
 IF(CMAKE_SYSTEM_NAME MATCHES "Linux")
-       SET(BLENDER_LINK_LIBS ${BLENDER_LINK_LIBS} extern_binreloc)
+       LIST(APPEND BLENDER_LINK_LIBS extern_binreloc)
 ENDIF(CMAKE_SYSTEM_NAME MATCHES "Linux")
 
 IF(UNIX)
@@ -120,11 +124,11 @@ IF(UNIX)
        )
   
        IF(WITH_CODEC_QUICKTIME)
-               SET(BLENDER_SORTED_LIBS ${BLENDER_SORTED_LIBS} bf_quicktime)
+               LIST(APPEND BLENDER_SORTED_LIBS bf_quicktime)
        ENDIF(WITH_CODEC_QUICKTIME)
 
        IF(WITH_CXX_GUARDEDALLOC)
-               SET(BLENDER_SORTED_LIBS ${BLENDER_SORTED_LIBS} bf_intern_guardedalloc_cpp)
+               LIST(APPEND BLENDER_SORTED_LIBS bf_intern_guardedalloc_cpp)
        ENDIF(WITH_CXX_GUARDEDALLOC)
 
        FOREACH(SORTLIB ${BLENDER_SORTED_LIBS})
index 9a94b49c5c2a82c32cdb209b65fadfd44dde95c1..7b9d8421aa566e2a32681b7681b3d6a478884d92 100644 (file)
@@ -457,7 +457,7 @@ ENDIF(WITH_INSTALL)
 
 ADD_DEPENDENCIES(blender makesdna)
 
-FILE(READ ${CMAKE_BINARY_DIR}/cmake_blender_libs.txt BLENDER_LINK_LIBS)
+GET_PROPERTY(BLENDER_LINK_LIBS GLOBAL PROPERTY BLENDER_LINK_LIBS)
 
 SET(BLENDER_LINK_LIBS bf_nodes ${BLENDER_LINK_LIBS} bf_windowmanager bf_render)