Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2019-04-16 13:36:44 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-04-16 13:36:44 +0300
commit31c2e69d49315717b522bca5a1fb48c05b1b86fa (patch)
tree124ba04df00c35c34b9e434ad9738646c239a9ea /tests/gtests
parent616597e7eaff81feb59aeede8e01133b127d57e8 (diff)
CMake: remove BLENDER_SORTED_LIBS
Use CMake's target_link_libraries instead of manually maintaining library dependencies in a single list. In practice adding new libraries often ended up being guess-work, now each library lists the libraries it uses. This was used for the game player executable so libraries could optionally link to stubs. If we need this functionality it can be done using target-properties as described in T46725.
Diffstat (limited to 'tests/gtests')
-rw-r--r--tests/gtests/alembic/CMakeLists.txt7
-rw-r--r--tests/gtests/bmesh/CMakeLists.txt12
2 files changed, 12 insertions, 7 deletions
diff --git a/tests/gtests/alembic/CMakeLists.txt b/tests/gtests/alembic/CMakeLists.txt
index bf1577ff33a..d401f57eff8 100644
--- a/tests/gtests/alembic/CMakeLists.txt
+++ b/tests/gtests/alembic/CMakeLists.txt
@@ -32,6 +32,11 @@ set(INC
${OPENEXR_INCLUDE_DIRS}
)
+set(LIB
+ bf_blenloader # Should not be needed but gives linking error without it.
+ bf_alembic
+)
+
include_directories(${INC})
setup_libdirs()
@@ -44,7 +49,7 @@ else()
endif()
# For motivation on doubling BLENDER_SORTED_LIBS, see ../bmesh/CMakeLists.txt
-BLENDER_SRC_GTEST(alembic "abc_matrix_test.cc;abc_export_test.cc;${_buildinfo_src}" "${BLENDER_SORTED_LIBS};${BLENDER_SORTED_LIBS}")
+BLENDER_SRC_GTEST(alembic "abc_matrix_test.cc;abc_export_test.cc;${_buildinfo_src}" "${LIB}")
unset(_buildinfo_src)
diff --git a/tests/gtests/bmesh/CMakeLists.txt b/tests/gtests/bmesh/CMakeLists.txt
index 6bd2be1ad83..10484751ca3 100644
--- a/tests/gtests/bmesh/CMakeLists.txt
+++ b/tests/gtests/bmesh/CMakeLists.txt
@@ -27,21 +27,21 @@ set(INC
../../../intern/guardedalloc
)
+set(LIB
+ bf_blenloader # Should not be needed but gives linking error without it.
+ bf_bmesh
+)
+
include_directories(${INC})
setup_libdirs()
-get_property(BLENDER_SORTED_LIBS GLOBAL PROPERTY BLENDER_SORTED_LIBS_PROP)
-
-# Current BLENDER_SORTED_LIBS works with starting list of symbols in creator, but not
-# for this test. Doubling the list does let all the symbols be resolved, but link time is a bit painful.
-set(BLENDER_SORTED_LIBS ${BLENDER_SORTED_LIBS} ${BLENDER_SORTED_LIBS})
if(WITH_BUILDINFO)
set(_buildinfo_src "$<TARGET_OBJECTS:buildinfoobj>")
else()
set(_buildinfo_src "")
endif()
-BLENDER_SRC_GTEST(bmesh_core "bmesh_core_test.cc;${_buildinfo_src}" "${BLENDER_SORTED_LIBS}")
+BLENDER_SRC_GTEST(bmesh_core "bmesh_core_test.cc;${_buildinfo_src}" "${LIB}")
unset(_buildinfo_src)
setup_liblinks(bmesh_core_test)