Only build tests if Qt5Test is found
This commit is contained in:
		
					parent
					
						
							
								86fb685877
							
						
					
				
			
			
				commit
				
					
						eef79c96a8
					
				
			
		
					 2 changed files with 8 additions and 1 deletions
				
			
		| 
						 | 
					@ -22,6 +22,8 @@ find_package(Qt5 ${REQUIRED_QT_VERSION} NO_MODULE REQUIRED
 | 
				
			||||||
             QuickWidgets
 | 
					             QuickWidgets
 | 
				
			||||||
             Qml)
 | 
					             Qml)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					find_package(Qt5Test ${REQUIRED_QT_VERSION})
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# KF5 dependencies
 | 
					# KF5 dependencies
 | 
				
			||||||
 | 
					
 | 
				
			||||||
find_package(KF5 ${KF5_VERSION} REQUIRED
 | 
					find_package(KF5 ${KF5_VERSION} REQUIRED
 | 
				
			||||||
| 
						 | 
					@ -51,7 +53,8 @@ include(FeatureSummary)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")
 | 
					set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")
 | 
				
			||||||
set(CMAKE_INCLUDE_CURRENT_DIR ON)
 | 
					set(CMAKE_INCLUDE_CURRENT_DIR ON)
 | 
				
			||||||
set_package_properties(FileMetaData PROPERTIES TYPE OPTIONAL PURPOSE "Required for file tagging")
 | 
					set_package_properties(KF5FileMetaData PROPERTIES TYPE OPTIONAL PURPOSE "Required for file tagging")
 | 
				
			||||||
 | 
					set_package_properties(Qt5Test PROPERTIES TYPE OPTIONAL PURPOSE "Required to build tests")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# add_subdirectory( doc )
 | 
					# add_subdirectory( doc )
 | 
				
			||||||
add_subdirectory( src )
 | 
					add_subdirectory( src )
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -30,3 +30,7 @@ target_link_libraries(danbooru PUBLIC
 | 
				
			||||||
install(TARGETS danbooru ${INSTALL_TARGETS_DEFAULT_ARGS})
 | 
					install(TARGETS danbooru ${INSTALL_TARGETS_DEFAULT_ARGS})
 | 
				
			||||||
 | 
					
 | 
				
			||||||
add_subdirectory(tests)
 | 
					add_subdirectory(tests)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					if (Qt5Test_FOUND)
 | 
				
			||||||
 | 
					    add_subdirectory(autotests)
 | 
				
			||||||
 | 
					endif()
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue