Skip to content

Commit

Permalink
Generate the config header in the build directory.
Browse files Browse the repository at this point in the history
  - Generating it in the source/include directory is conflicting with
    the autoconf build. They keep overwriting the same file.

    It should have been in the build folder from the begining anyway.
    It belongs there. Should not pollute the source dir as much as possible.
  • Loading branch information
mahge committed Oct 20, 2021
1 parent b136909 commit cd4e5c6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion antlr/3.2/libantlr3c-3.2/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,13 @@ include(CheckTypeSize)
check_type_size(intptr_t INTPTR_T)

# Generate a configure header
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/antlr3config.h.in.cmake ${CMAKE_CURRENT_SOURCE_DIR}/include/antlr3config.h)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/antlr3config.h.in.cmake ${CMAKE_CURRENT_BINARY_DIR}/include/antlr3config.h)



add_library(omantlr3 STATIC)

target_sources(omantlr3 PRIVATE ${ANTLR_SOURCES})
target_include_directories(omantlr3 PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/include)
# The config header is generated in the build dir.
target_include_directories(omantlr3 PUBLIC ${CMAKE_CURRENT_BINARY_DIR}/include)

0 comments on commit cd4e5c6

Please sign in to comment.