diff options
author | zmiao <miao.zhao@mapbox.com> | 2019-10-15 19:16:32 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-10-15 19:16:32 +0300 |
commit | e829d1ae6f01ff3c336cd429dacd98aeb3b7162a (patch) | |
tree | bad1b0bb1f46a820213cbe08cb40b56fd91d9389 /cmake | |
parent | 0f9666ebf3614dcc50e6a60c3c84bb578986bcf7 (diff) | |
download | qtlocation-mapboxgl-e829d1ae6f01ff3c336cd429dacd98aeb3b7162a.tar.gz |
[test-runner] make render-test a shared lib (#15816)
* [test-runner] make render-test a shared lib
[test-runner] nit
[test-runner] nit again
* [test-runner] Remove redundant linked file in cmake
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/render-test.cmake | 58 |
1 files changed, 43 insertions, 15 deletions
diff --git a/cmake/render-test.cmake b/cmake/render-test.cmake index 65240b54f3..8726fb4650 100644 --- a/cmake/render-test.cmake +++ b/cmake/render-test.cmake @@ -1,32 +1,60 @@ -add_executable(mbgl-render-test +add_executable( + mbgl-render-test + expression-test/test_runner_common.cpp + expression-test/test_runner_common.hpp + platform/default/src/mbgl/render-test/main.cpp render-test/allocation_index.cpp - render-test/main.cpp + render-test/allocation_index.hpp + render-test/filesystem.hpp + render-test/filesystem.hpp + render-test/include/mbgl/render_test.hpp + render-test/metadata.hpp render-test/parser.cpp + render-test/parser.hpp + render-test/render_test.cpp render-test/runner.cpp - expression-test/test_runner_common.cpp - expression-test/test_runner_common.hpp + render-test/runner.hpp ) if(APPLE) - target_link_libraries(mbgl-render-test PRIVATE mbgl-loop-darwin) + target_link_libraries( + mbgl-render-test + PRIVATE mbgl-loop-darwin + ) else() - target_link_libraries(mbgl-render-test PRIVATE mbgl-loop-uv) + target_link_libraries( + mbgl-render-test + PRIVATE mbgl-loop-uv + ) endif() -target_include_directories(mbgl-render-test +target_include_directories( + mbgl-render-test PRIVATE src PRIVATE platform/default/include PRIVATE render-test ) -target_link_libraries(mbgl-render-test PRIVATE - mbgl-core - mbgl-filesource - Mapbox::Base::Extras::args - mbgl-vendor-expected - Mapbox::Base::Extras::filesystem - Mapbox::Base::pixelmatch-cpp - Mapbox::Base::Extras::rapidjson +target_include_directories( + mbgl-render-test + PUBLIC render-test/include + PUBLIC include ) +target_link_libraries( + mbgl-render-test + PRIVATE + mbgl-core + mbgl-filesource + Mapbox::Base::Extras::args + mbgl-vendor-expected + Mapbox::Base::Extras::filesystem + Mapbox::Base::pixelmatch-cpp + Mapbox::Base::Extras::rapidjson +) + +create_source_groups(mbgl-render-test) + +set_target_properties(mbgl-render-test PROPERTIES FOLDER "Executables") + add_definitions(-DTEST_RUNNER_ROOT_PATH="${CMAKE_SOURCE_DIR}") |