diff --git a/source/blenderplayer/CMakeLists.txt b/source/blenderplayer/CMakeLists.txt index 53397070be8..eecb67e8882 100644 --- a/source/blenderplayer/CMakeLists.txt +++ b/source/blenderplayer/CMakeLists.txt @@ -144,8 +144,10 @@ if(UNIX) list(REMOVE_ITEM BLENDER_SORTED_LIBS ${REMLIB}) endif() endforeach() - list(SORT REM_MSG) - message(STATUS "Player Skipping: (${REM_MSG})") + if(REM_MSG) + list(SORT REM_MSG) + message(STATUS "Player Skipping: (${REM_MSG})") + endif() target_link_libraries(blenderplayer ${BLENDER_SORTED_LIBS}) else() target_link_libraries(blenderplayer ${BLENDER_LINK_LIBS}) diff --git a/source/creator/CMakeLists.txt b/source/creator/CMakeLists.txt index c3a0b003917..3328a8a1707 100644 --- a/source/creator/CMakeLists.txt +++ b/source/creator/CMakeLists.txt @@ -586,7 +586,6 @@ endif() list(APPEND BLENDER_SORTED_LIBS bf_quicktime) endif() - foreach(SORTLIB ${BLENDER_SORTED_LIBS}) set(REMLIB ${SORTLIB}) foreach(SEARCHLIB ${BLENDER_LINK_LIBS}) @@ -600,8 +599,10 @@ endif() list(REMOVE_ITEM BLENDER_SORTED_LIBS ${REMLIB}) endif() endforeach() - list(SORT REM_MSG) - message(STATUS "Blender Skipping: (${REM_MSG})") + if(REM_MSG) + list(SORT REM_MSG) + message(STATUS "Blender Skipping: (${REM_MSG})") + endif() target_link_libraries(blender ${BLENDER_SORTED_LIBS}) #else() # target_link_libraries(blender ${BLENDER_LINK_LIBS})