simgear/CMakeModules/AddSimGearTest.cmake
James Turner 456c63935c Cmake refresh
Use target objects everywhere, and simplify handling of system vs
local dependencies.
2020-08-18 11:40:27 +01:00

31 lines
894 B
CMake

function(add_simgear_test _name _sources)
add_executable(${_name} ${_sources})
target_link_libraries(${_name} SimGearCore)
# for simgear_config.h
target_include_directories(${_name} PRIVATE ${PROJECT_BINARY_DIR}/simgear)
endfunction()
function(add_simgear_autotest _name _sources)
add_executable(${_name} ${_sources})
target_link_libraries(${_name} SimGearCore)
# 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})
target_link_libraries(${_name} SimGearScene)
# for simgear_config.h
target_include_directories(${_name} PRIVATE ${PROJECT_BINARY_DIR}/simgear)
add_test(${_name} ${EXECUTABLE_OUTPUT_PATH}/${_name})
endfunction()