CMake: tell tests where their source-dir is
- Abuse BUILD_AS_TEST to pass in the value as a string
This commit is contained in:
parent
c850408555
commit
0aaf24c4a5
@ -50,7 +50,7 @@ function( calamares_add_test )
|
||||
Qt5::Test
|
||||
)
|
||||
calamares_automoc( ${TEST_NAME} )
|
||||
target_compile_definitions( ${TEST_NAME} PRIVATE -DBUILD_AS_TEST ${TEST_DEFINITIONS} )
|
||||
target_compile_definitions( ${TEST_NAME} PRIVATE -DBUILD_AS_TEST="${CMAKE_CURRENT_SOURCE_DIR}" ${TEST_DEFINITIONS} )
|
||||
if( TEST_GUI )
|
||||
target_link_libraries( ${TEST_NAME} calamaresui Qt5::Gui )
|
||||
endif()
|
||||
|
Loading…
Reference in New Issue
Block a user