Skip to content

Commit cd4e5c6

Browse files
committed
Generate the config header in the build directory.
- 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.
1 parent b136909 commit cd4e5c6

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

antlr/3.2/libantlr3c-3.2/CMakeLists.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,13 @@ include(CheckTypeSize)
2727
check_type_size(intptr_t INTPTR_T)
2828

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

3232

3333

3434
add_library(omantlr3 STATIC)
3535

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

0 commit comments

Comments
 (0)