Skip to content

Commit

Permalink
fix(cmake): use current source dir for EXISTS check
Browse files Browse the repository at this point in the history
  • Loading branch information
amaanq committed Nov 10, 2024
1 parent ac4595e commit d73b66c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cli/src/templates/cmakelists.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ add_custom_command(OUTPUT "${CMAKE_CURRENT_SOURCE_DIR}/src/parser.c"
COMMENT "Generating parser.c")

add_library(tree-sitter-PARSER_NAME src/parser.c)
if(EXISTS src/scanner.c)
if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/src/scanner.c)
target_sources(tree-sitter-PARSER_NAME PRIVATE src/scanner.c)
endif()
target_include_directories(tree-sitter-PARSER_NAME PRIVATE src)
Expand Down

0 comments on commit d73b66c

Please sign in to comment.