Fix invalid cmake export configuration

Modify the CMakeLists.txt file to properly generate config file.
The `/include` string part intended for BUILD_INTERFACE was added
after the generator expression itself, which resulted
in extra `/include` path INTERFACE_INCLUDE_DIRECTORIES property
of exported configuration.
This commit is contained in:
Bartlomiej Neumann 2019-05-25 12:40:40 +02:00
parent 7c5ee10205
commit 3b5d4725f6

View File

@ -10,7 +10,7 @@ add_library(argparse::argparse ALIAS argparse)
target_compile_features(argparse INTERFACE cxx_std_17) target_compile_features(argparse INTERFACE cxx_std_17)
target_include_directories(argparse INTERFACE target_include_directories(argparse INTERFACE
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}> $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}>/include) $<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/include>)
if(ARGPARSE_BUILD_TESTS) if(ARGPARSE_BUILD_TESTS)
add_subdirectory(test) add_subdirectory(test)