diff --git a/CMakeModules/Functions.cmake b/CMakeModules/Functions.cmake index 056f0bc4a6..53c4c21e75 100644 --- a/CMakeModules/Functions.cmake +++ b/CMakeModules/Functions.cmake @@ -48,7 +48,7 @@ function( make_lexer outputTarget inputFile outHeaderFile outCppFile enum ) ) add_custom_target( ${outputTarget} - DEPENDS ${inputFile} + DEPENDS ${outHeaderFile} ${outCppFile} ${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. foreach( extra_arg ${ARGN} ) set_source_files_properties( ${extra_arg} - PROPERTIES OBJECT_DEPENDS ${outputTarget} + PROPERTIES OBJECT_DEPENDS ${outHeaderFile} ) endforeach() diff --git a/common/CMakeLists.txt b/common/CMakeLists.txt index 23cff68235..7c4bead754 100644 --- a/common/CMakeLists.txt +++ b/common/CMakeLists.txt @@ -549,6 +549,13 @@ make_lexer( ${PROJECT_SOURCE_DIR}/include/lib_table_lexer.h ${CMAKE_CURRENT_SOURCE_DIR}/lib_table_keywords.cpp 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 )