simgear/CMakeModules/AddSimGearTest.cmake

31 lines
945 B
CMake
Raw Normal View History

function(add_simgear_test _name _sources)
add_executable(${_name} ${_sources})
2020-08-23 05:11:42 +08:00
target_link_libraries(${_name} SimGearCore Threads::Threads)
# for simgear_config.h
target_include_directories(${_name} PRIVATE ${PROJECT_BINARY_DIR}/simgear)
endfunction()
function(add_simgear_autotest _name _sources)
add_executable(${_name} ${_sources})
2020-08-23 05:11:42 +08:00
target_link_libraries(${_name} SimGearCore Threads::Threads)
# for simgear_config.h
target_include_directories(${_name} PRIVATE ${PROJECT_BINARY_DIR}/simgear)
add_test(${_name} ${EXECUTABLE_OUTPUT_PATH}/${_name})
endfunction()
function(add_simgear_scene_autotest _name _sources)
add_executable(${_name} ${_sources})
2020-08-23 05:11:42 +08:00
target_link_libraries(${_name} SimGearScene Threads::Threads)
# for simgear_config.h
target_include_directories(${_name} PRIVATE ${PROJECT_BINARY_DIR}/simgear)
add_test(${_name} ${EXECUTABLE_OUTPUT_PATH}/${_name})
endfunction()