From 205dc65af8163531a284d03ae53d025d7fe93d86 Mon Sep 17 00:00:00 2001 From: taynpg Date: Sun, 19 May 2024 14:27:15 +0800 Subject: [PATCH] =?UTF-8?q?=E8=BE=93=E5=87=BA=E7=9B=AE=E5=BD=95=E9=80=BB?= =?UTF-8?q?=E8=BE=91=E6=94=B9=E4=B8=BA=E5=B7=B2=E6=9C=89=E5=AE=9A=E4=B9=89?= =?UTF-8?q?=E6=97=B6=E4=B8=8D=E8=AE=BE=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CMakeLists.txt | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index bd8887c..fed36b5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -7,13 +7,18 @@ set(CMAKE_PREFIX_PATH "C:/dev/boost" ) -set(LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin) -set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/bin) - if (MSVC) add_compile_options(/source-charset:utf-8) endif() +if(NOT DEFINED LIBRARY_OUTPUT_PATH OR LIBRARY_OUTPUT_PATH STREQUAL "") + set(LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin) +endif() + +if(NOT DEFINED CMAKE_RUNTIME_OUTPUT_DIRECTORY OR CMAKE_RUNTIME_OUTPUT_DIRECTORY STREQUAL "") + set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/bin) +endif() + include_directories(libserial) add_subdirectory(libserial) add_executable(SerialOprTest main.cpp)