cmake: Further petting dependencies

eeschema cpp files consume generated header files that have targets in
the common directory, so no dependencies get created from eeschema.  We
add the dependencies in common to force the setting through libraries.

Fixes: lp:1831643
* https://bugs.launchpad.net/kicad/+bug/1831643
This commit is contained in:
Seth Hillbrand 2019-06-13 06:49:45 -07:00
parent 19de0ae55d
commit 8112a8ade1
2 changed files with 9 additions and 2 deletions

View File

@ -48,7 +48,7 @@ function( make_lexer outputTarget inputFile outHeaderFile outCppFile enum )
) )
add_custom_target( ${outputTarget} add_custom_target( ${outputTarget}
DEPENDS ${inputFile} DEPENDS ${outHeaderFile} ${outCppFile}
${CMAKE_MODULE_PATH}/TokenList2DsnLexer.cmake ${CMAKE_MODULE_PATH}/TokenList2DsnLexer.cmake
) )
@ -56,7 +56,7 @@ function( make_lexer outputTarget inputFile outHeaderFile outCppFile enum )
# are known to depend on the generated outHeader. # are known to depend on the generated outHeader.
foreach( extra_arg ${ARGN} ) foreach( extra_arg ${ARGN} )
set_source_files_properties( ${extra_arg} set_source_files_properties( ${extra_arg}
PROPERTIES OBJECT_DEPENDS ${outputTarget} PROPERTIES OBJECT_DEPENDS ${outHeaderFile}
) )
endforeach() endforeach()

View File

@ -549,6 +549,13 @@ make_lexer(
${PROJECT_SOURCE_DIR}/include/lib_table_lexer.h ${PROJECT_SOURCE_DIR}/include/lib_table_lexer.h
${CMAKE_CURRENT_SOURCE_DIR}/lib_table_keywords.cpp ${CMAKE_CURRENT_SOURCE_DIR}/lib_table_keywords.cpp
LIB_TABLE_T LIB_TABLE_T
# These files consume *_lexer.h
${CMAKE_CURRENT_SOURCE_DIR}/fp_lib_table.cpp
${CMAKE_CURRENT_SOURCE_DIR}/lib_table_base.cpp
${PROJECT_SOURCE_DIR}/pcbnew/dialogs/panel_fp_lib_table.cpp
${PROJECT_SOURCE_DIR}/eeschema/symbol_lib_table.cpp
${PROJECT_SOURCE_DIR}/eeschema/dialogs/panel_sym_lib_table.cpp
) )
add_dependencies( common lib_table_lexer_source_files ) add_dependencies( common lib_table_lexer_source_files )