From 7af2342d9497cb1d6f5a8c815282cd2fe10c8e70 Mon Sep 17 00:00:00 2001 From: Sean Robinson Date: Thu, 6 Oct 2022 09:19:02 -0700 Subject: [PATCH] Remove link library from add_sample function Resolves the following build error: CMake Error at CMakeLists.txt:26 (ADD_EXECUTABLE): Target "ARGPARSE_SAMPLE_custom_assignment_characters" links to target "argparse::argparse" but the target was not found. Perhaps a find_package() call is missing for an IMPORTED target, or an ALIAS target is missing? Signed-off-by: Sean Robinson --- samples/CMakeLists.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/samples/CMakeLists.txt b/samples/CMakeLists.txt index b146b2d..94ba3b5 100644 --- a/samples/CMakeLists.txt +++ b/samples/CMakeLists.txt @@ -25,7 +25,6 @@ endif() function(add_sample NAME) ADD_EXECUTABLE(ARGPARSE_SAMPLE_${NAME} ${NAME}.cpp) INCLUDE_DIRECTORIES("../include" ".") - TARGET_LINK_LIBRARIES(ARGPARSE_SAMPLE_${NAME} PRIVATE argparse::argparse) set_target_properties(ARGPARSE_SAMPLE_${NAME} PROPERTIES OUTPUT_NAME ${NAME}) endfunction()