From 934ecfd4d9b3f0c58a848dea8657ce181e79ff91 Mon Sep 17 00:00:00 2001 From: xukeawsl Date: Sat, 27 Jul 2024 14:19:54 +0800 Subject: [PATCH] modify CMakeLists.txt --- CMakeLists.txt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index a6e4e86e..47ebdf7f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -45,10 +45,13 @@ endif() # Establish the project options option(CXXOPTS_BUILD_EXAMPLES "Set to ON to build examples" ${CXXOPTS_STANDALONE_PROJECT}) option(CXXOPTS_BUILD_TESTS "Set to ON to build tests" ${CXXOPTS_STANDALONE_PROJECT}) -option(CXXOPTS_ENABLE_INSTALL "Generate the install target" ${CXXOPTS_STANDALONE_PROJECT}) option(CXXOPTS_ENABLE_WARNINGS "Add warnings to CMAKE_CXX_FLAGS" ${CXXOPTS_STANDALONE_PROJECT}) option(CXXOPTS_USE_UNICODE_HELP "Use ICU Unicode library" OFF) +if (NOT CXXOPTS_ENABLE_INSTALL) + option(CXXOPTS_ENABLE_INSTALL "Generate the install target" ${CXXOPTS_STANDALONE_PROJECT}) +endif() + if (CXXOPTS_STANDALONE_PROJECT) cxxopts_set_cxx_standard() endif()