Skip to content

Commit

Permalink
Merge pull request #45 from HackerFoo/fix-cmake-include
Browse files Browse the repository at this point in the history
Fix include file search in src/CMakeLists.txt
  • Loading branch information
HackerFoo authored Dec 22, 2020
2 parents 7124d4f + 292e16b commit bae2e6d
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,12 @@ if(ANTLR_RUNTIME_TYPE STREQUAL "static")
else()
# Look to see if the shared library is already available.
find_library(ANTLR4_RUNTIME NAMES antlr4-runtime REQUIRED)
find_path(ANTLR4_INCLUDE_DIRS antlr4-runtime.h
HINTS /usr/include/antlr4-runtime
$ENV{ANTLR4_RUNTIME_INCLUDE})

# If not, build it.
if(NOT ANTLR4_RUNTIME)
if(NOT ANTLR4_RUNTIME OR NOT ANTLR4_INCLUDE_DIRS)
include(ExternalAntlr4Cpp)
set(ANTLR4_RUNTIME antlr4_shared)
endif()
Expand Down Expand Up @@ -69,12 +72,6 @@ add_custom_target(tags.py ALL
VERBATIM
)

find_path(ANTLR_RUNTIME_INCLUDE antlr4-runtime.h
HINTS /usr/include/antlr4-runtime
$ENV{ANTLR4_RUNTIME_INCLUDE}
REQUIRED)
include_directories(${ANTLR_RUNTIME_INCLUDE})

# Include generated files in project environment
include_directories(${ANTLR_FasmLexer_OUTPUT_DIR})
include_directories(${ANTLR_FasmParser_OUTPUT_DIR})
Expand Down

0 comments on commit bae2e6d

Please sign in to comment.