diff options
author | Alexandru Croitor <alexandru.croitor@qt.io> | 2021-09-27 18:32:37 +0200 |
---|---|---|
committer | Alexandru Croitor <alexandru.croitor@qt.io> | 2021-10-27 16:22:34 +0200 |
commit | 923814d989bae1575fed80339cecb11de10946c9 (patch) | |
tree | 550ec94f8cb958a8761f43c8614a86d561cc054d /sources/shiboken6 | |
parent | 764f41d4f838ee8e49534d4bd94211ee2a225ed4 (diff) |
CMake: Use namespaced shiboken6 target in custom commands
To ensure the tests can be built against an imported shiboken6 target
(one found via find_package), and not only using a target which is
built as part of the current project.
Pick-to: 6.2
Change-Id: I20aa7b9e461370ea489a43b118330fe023e4b631
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Diffstat (limited to 'sources/shiboken6')
4 files changed, 8 insertions, 8 deletions
diff --git a/sources/shiboken6/tests/minimalbinding/CMakeLists.txt b/sources/shiboken6/tests/minimalbinding/CMakeLists.txt index 63ad8a577..1b6b37e31 100644 --- a/sources/shiboken6/tests/minimalbinding/CMakeLists.txt +++ b/sources/shiboken6/tests/minimalbinding/CMakeLists.txt @@ -18,8 +18,8 @@ configure_file("${CMAKE_CURRENT_SOURCE_DIR}/minimal-binding.txt.in" add_custom_command( OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/mjb_rejected_classes.log" BYPRODUCTS ${minimal_SRC} -COMMAND shiboken6 --project-file=${CMAKE_CURRENT_BINARY_DIR}/minimal-binding.txt ${GENERATOR_EXTRA_FLAGS} -DEPENDS ${minimal_TYPESYSTEM} ${CMAKE_CURRENT_SOURCE_DIR}/global.h shiboken6 +COMMAND Shiboken6::shiboken6 --project-file=${CMAKE_CURRENT_BINARY_DIR}/minimal-binding.txt ${GENERATOR_EXTRA_FLAGS} +DEPENDS ${minimal_TYPESYSTEM} ${CMAKE_CURRENT_SOURCE_DIR}/global.h Shiboken6::shiboken6 WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} COMMENT "Running generator for 'minimal' test binding..." ) diff --git a/sources/shiboken6/tests/otherbinding/CMakeLists.txt b/sources/shiboken6/tests/otherbinding/CMakeLists.txt index 7c8562abc..e516371b9 100644 --- a/sources/shiboken6/tests/otherbinding/CMakeLists.txt +++ b/sources/shiboken6/tests/otherbinding/CMakeLists.txt @@ -25,8 +25,8 @@ configure_file("${CMAKE_CURRENT_SOURCE_DIR}/other-binding.txt.in" add_custom_command( OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/mjb_rejected_classes.log" BYPRODUCTS ${other_SRC} -COMMAND shiboken6 --project-file=${CMAKE_CURRENT_BINARY_DIR}/other-binding.txt ${GENERATOR_EXTRA_FLAGS} -DEPENDS ${other_TYPESYSTEM} ${CMAKE_CURRENT_SOURCE_DIR}/global.h shiboken6 +COMMAND Shiboken6::shiboken6 --project-file=${CMAKE_CURRENT_BINARY_DIR}/other-binding.txt ${GENERATOR_EXTRA_FLAGS} +DEPENDS ${other_TYPESYSTEM} ${CMAKE_CURRENT_SOURCE_DIR}/global.h Shiboken6::shiboken6 WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} COMMENT "Running generator for 'other' test binding..." ) diff --git a/sources/shiboken6/tests/samplebinding/CMakeLists.txt b/sources/shiboken6/tests/samplebinding/CMakeLists.txt index 558140279..65a790627 100644 --- a/sources/shiboken6/tests/samplebinding/CMakeLists.txt +++ b/sources/shiboken6/tests/samplebinding/CMakeLists.txt @@ -144,8 +144,8 @@ configure_file("${CMAKE_CURRENT_SOURCE_DIR}/sample-binding.txt.in" add_custom_command( OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/mjb_rejected_classes.log" BYPRODUCTS ${sample_SRC} -COMMAND shiboken6 --project-file=${CMAKE_CURRENT_BINARY_DIR}/sample-binding.txt ${GENERATOR_EXTRA_FLAGS} -DEPENDS ${sample_TYPESYSTEM} ${CMAKE_CURRENT_SOURCE_DIR}/global.h shiboken6 +COMMAND Shiboken6::shiboken6 --project-file=${CMAKE_CURRENT_BINARY_DIR}/sample-binding.txt ${GENERATOR_EXTRA_FLAGS} +DEPENDS ${sample_TYPESYSTEM} ${CMAKE_CURRENT_SOURCE_DIR}/global.h Shiboken6::shiboken6 WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} COMMENT "Running generator for 'sample' test binding..." ) diff --git a/sources/shiboken6/tests/smartbinding/CMakeLists.txt b/sources/shiboken6/tests/smartbinding/CMakeLists.txt index 637420651..0059305c2 100644 --- a/sources/shiboken6/tests/smartbinding/CMakeLists.txt +++ b/sources/shiboken6/tests/smartbinding/CMakeLists.txt @@ -21,8 +21,8 @@ configure_file("${CMAKE_CURRENT_SOURCE_DIR}/smart-binding.txt.in" add_custom_command( OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/mjb_rejected_classes.log" BYPRODUCTS ${smart_SRC} -COMMAND shiboken6 --project-file=${CMAKE_CURRENT_BINARY_DIR}/smart-binding.txt ${GENERATOR_EXTRA_FLAGS} -DEPENDS ${smart_TYPESYSTEM} ${CMAKE_CURRENT_SOURCE_DIR}/global.h shiboken6 +COMMAND Shiboken6::shiboken6 --project-file=${CMAKE_CURRENT_BINARY_DIR}/smart-binding.txt ${GENERATOR_EXTRA_FLAGS} +DEPENDS ${smart_TYPESYSTEM} ${CMAKE_CURRENT_SOURCE_DIR}/global.h Shiboken6::shiboken6 WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} COMMENT "Running generator for 'smart' test binding..." ) |