Make sure 'config.h' doesn't stay in the public include DIR.

pull/330/head
Lance Wallis 1 week ago
parent fe2d99b779
commit 257e1fefff
No known key found for this signature in database
GPG Key ID: AE7847735CE374E4
  1. 11
      CMakeLists.txt

@ -43,7 +43,7 @@ endif()
# For now assume inline on.
option(inline "Enable inline function support." ON)
configure_file(cmakeconfig.h.in ${CMAKE_CURRENT_SOURCE_DIR}/config.h
configure_file(cmakeconfig.h.in config.h
@ONLY
)
@ -64,9 +64,11 @@ set(MXML_PRIVATE
set(MXML_PUBLIC
mxml.h
config.h # TODO: Cmake configure.
${CMAKE_CURRENT_BINARY_DIR}/config.h
)
message(STATUS ${CMAKE_CURRENT_BINARY_DIR})
set(MXML_COLLECTIVE
${MXML_PRIVATE}
${MXML_PUBLIC}
@ -76,7 +78,10 @@ add_library(${PROJECT_NAME}
${MXML_COLLECTIVE}
)
# Dfine the header(s) for this library and add to build path.
# For config.h
include_directories(${CMAKE_CURRENT_BINARY_DIR})
# Define the header(s) for this library and add to build path.
target_include_directories(${PROJECT_NAME} PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/>
)

Loading…
Cancel
Save