From aa0be42c6f613281e6a98f239c93574ecbf14e4c Mon Sep 17 00:00:00 2001 From: Rock Jie Date: Sun, 14 Jul 2024 03:16:03 +0800 Subject: [PATCH] fix: windows Ninja same target name --- CMakeLists.txt | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 9507651bf..c5c283db0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -20,9 +20,8 @@ if(ARGPARSE_SHARED) set_target_properties(argparse_shared PROPERTIES OUTPUT_NAME argparse) endif() if(ARGPARSE_STATIC) - add_library(argparse STATIC ${sources}) - target_include_directories(argparse PUBLIC .) -endif() -if(NOT (ARGPARSE_STATIC OR ARGPARSE_SHARED)) - add_library(argparse OBJECT ${sources}) + add_library(argparse_static STATIC ${sources}) + target_include_directories(argparse_static PUBLIC .) + set_target_properties(argparse_static PROPERTIES OUTPUT_NAME argparse_static) endif() +