cmake: Add sdkconfig.h directory to include paths list not just compiler args

Also move into 'build/config/' subdir, remove creation of empty include/config dir.
This commit is contained in:
Angus Gratton
2018-05-08 15:33:21 +08:00
committed by Angus Gratton
parent 2f4079ebb2
commit cc104eb05b
4 changed files with 11 additions and 9 deletions

View File

@@ -65,8 +65,8 @@ else()
set(LD_DIR ${CMAKE_CURRENT_SOURCE_DIR}/ld)
add_custom_command(
OUTPUT esp32_out.ld
COMMAND "${CMAKE_C_COMPILER}" -C -P -x c -E -o esp32_out.ld -I ${CMAKE_BINARY_DIR} ${LD_DIR}/esp32.ld
MAIN_DEPENDENCY ${LD_DIR}/esp32.ld
COMMAND "${CMAKE_C_COMPILER}" -C -P -x c -E -o esp32_out.ld -I ${CONFIG_DIR} ${LD_DIR}/esp32.ld
MAIN_DEPENDENCY ${LD_DIR}/esp32.ld ${SDKCONFIG_H}
COMMENT "Generating linker script..."
VERBATIM)
add_custom_target(esp32_linker_script DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/esp32_out.ld)