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 <sean.robinson@scottsdalecc.edu>
This commit is contained in:
Sean Robinson 2022-10-06 09:19:02 -07:00
parent f1d75bbb32
commit 7af2342d94

View File

@ -25,7 +25,6 @@ endif()
function(add_sample NAME) function(add_sample NAME)
ADD_EXECUTABLE(ARGPARSE_SAMPLE_${NAME} ${NAME}.cpp) ADD_EXECUTABLE(ARGPARSE_SAMPLE_${NAME} ${NAME}.cpp)
INCLUDE_DIRECTORIES("../include" ".") INCLUDE_DIRECTORIES("../include" ".")
TARGET_LINK_LIBRARIES(ARGPARSE_SAMPLE_${NAME} PRIVATE argparse::argparse)
set_target_properties(ARGPARSE_SAMPLE_${NAME} PROPERTIES OUTPUT_NAME ${NAME}) set_target_properties(ARGPARSE_SAMPLE_${NAME} PROPERTIES OUTPUT_NAME ${NAME})
endfunction() endfunction()