QA: Only build kicad2step tests if the lib exists

If neither OCC or OCE is available, the kicad2step_lib
target is not created, so the unit tests also cannot
be built. Detect missing libs and abort the test
target creation in that case.

Reverts (and fixes): 3a8ffd66c
This commit is contained in:
John Beard 2019-04-18 10:09:04 +01:00
parent 7030c7d948
commit 4214437d18
2 changed files with 6 additions and 1 deletions

View File

@ -46,7 +46,7 @@ add_subdirectory( pcbnew )
add_subdirectory( eeschema )
add_subdirectory( libs )
# add_subdirectory( utils/kicad2step )
add_subdirectory( utils/kicad2step )
# Utility/debugging/profiling programs
add_subdirectory( common_tools )

View File

@ -21,6 +21,11 @@
# kicad2step s-expr handling routines
if( NOT TARGET kicad2step_lib )
# Can't build this test without the underlying library
return()
endif()
set( K2S_TEST_SRCS
test_module.cpp