calamares/src/modules/partition/tests/CMakeLists.txt
Adriaan de Groot 7515386cf8 CMake: clean up test setup
- Remove redundant searches for ECM and Qt::Test, move
   them to top-level.
2018-10-05 09:41:37 -04:00

36 lines
1.1 KiB
CMake

find_package( Qt5 COMPONENTS Gui REQUIRED )
set( PartitionModule_SOURCE_DIR .. )
set( partitionjobtests_SRCS
${PartitionModule_SOURCE_DIR}/core/KPMHelpers.cpp
${PartitionModule_SOURCE_DIR}/core/PartitionInfo.cpp
${PartitionModule_SOURCE_DIR}/core/PartitionIterator.cpp
${PartitionModule_SOURCE_DIR}/jobs/CreatePartitionJob.cpp
${PartitionModule_SOURCE_DIR}/jobs/CreatePartitionTableJob.cpp
${PartitionModule_SOURCE_DIR}/jobs/DeletePartitionJob.cpp
${PartitionModule_SOURCE_DIR}/jobs/PartitionJob.cpp
${PartitionModule_SOURCE_DIR}/jobs/ResizePartitionJob.cpp
PartitionJobTests.cpp
)
include_directories(
${Qt5Gui_INCLUDE_DIRS}
${PartitionModule_SOURCE_DIR}
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_BINARY_DIR}
)
if( ECM_FOUND AND BUILD_TESTING )
ecm_add_test( ${partitionjobtests_SRCS}
TEST_NAME partitionjobtests
LINK_LIBRARIES
${CALAMARES_LIBRARIES}
kpmcore
Qt5::Core
Qt5::Test
)
set_target_properties( partitionjobtests PROPERTIES AUTOMOC TRUE )
endif()