move include path specification to nf7_config target in CMake

This commit is contained in:
falsycat 2023-07-23 20:55:06 +09:00
parent 7cef288dcd
commit fde7d40e87
2 changed files with 5 additions and 2 deletions

View File

@ -8,6 +8,10 @@ option(SANITIZER "ADDRESS or THREAD" "THREAD")
# all targets should link to this to use common compile options
add_library(nf7_config INTERFACE EXCLUDE_FROM_ALL)
target_include_directories(nf7_config
INTERFACE
${PROJECT_SOURCE_DIR}
)
target_compile_options(nf7_config INTERFACE
$<$<CXX_COMPILER_ID:MSVC>:
/W4

View File

@ -1,7 +1,6 @@
add_library(nf7_iface)
target_include_directories(nf7_iface PUBLIC ${PROJECT_SOURCE_DIR})
target_link_libraries(nf7_iface
PRIVATE
PUBLIC
git_hash
nf7_config
)