mirror of
https://github.com/encounter/linuxdeploy-plugin-qt.git
synced 2026-07-10 12:18:45 -07:00
Make it possible to opt out of building tests
This commit is contained in:
+6
-1
@@ -1,9 +1,14 @@
|
||||
cmake_minimum_required(VERSION 3.6)
|
||||
project(linuxdeploy-plugin-qt)
|
||||
|
||||
include(CTest)
|
||||
|
||||
set(CMAKE_CXX_STANDARD 11)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
|
||||
add_subdirectory(lib)
|
||||
add_subdirectory(src)
|
||||
add_subdirectory(tests)
|
||||
|
||||
if (BUILD_TESTING)
|
||||
add_subdirectory(tests)
|
||||
endif()
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
add_subdirectory(linuxdeploy EXCLUDE_FROM_ALL)
|
||||
if(NOT TARGET gtest)
|
||||
if(NOT TARGET gtest AND BUILD_TESTING)
|
||||
add_subdirectory(googletest EXCLUDE_FROM_ALL)
|
||||
endif()
|
||||
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
enable_testing()
|
||||
|
||||
add_executable(linuxdeploy-plugin-qt-tests test_main.cpp test_deploy_qml.cpp ../src/qml.cpp)
|
||||
target_link_libraries(linuxdeploy-plugin-qt-tests linuxdeploy_core args json gtest)
|
||||
target_compile_definitions(linuxdeploy-plugin-qt-tests PRIVATE TESTS_DATA_DIR="${CMAKE_CURRENT_SOURCE_DIR}/data")
|
||||
|
||||
Reference in New Issue
Block a user