From 1c8a4b4a691bf7668ed6d6880de8ad33eaaafcb2 Mon Sep 17 00:00:00 2001 From: chunleili Date: Mon, 15 Jul 2024 22:51:02 +0800 Subject: [PATCH] Create output_to_lib_dir --- docs/cmake/output_to_lib_dir | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 docs/cmake/output_to_lib_dir diff --git a/docs/cmake/output_to_lib_dir b/docs/cmake/output_to_lib_dir new file mode 100644 index 00000000..d335b0e7 --- /dev/null +++ b/docs/cmake/output_to_lib_dir @@ -0,0 +1,13 @@ +环境:Windows + +如果想把编译输出的文件统一放到lib文件夹下面 + +在project之前增加如下语句 + +# compile to mgcg_cuda/lib +SET( CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG "${CMAKE_CURRENT_LIST_DIR}/lib") +SET( CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE "${CMAKE_CURRENT_LIST_DIR}/lib") +SET( CMAKE_LIBRARY_OUTPUT_DIRECTORY_DEBUG "${CMAKE_CURRENT_LIST_DIR}/lib") +SET( CMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE "${CMAKE_CURRENT_LIST_DIR}/lib") +SET( CMAKE_ARCHIVE_OUTPUT_DIRECTORY_DEBUG "${CMAKE_CURRENT_LIST_DIR}/lib") +SET( CMAKE_ARCHIVE_OUTPUT_DIRECTORY_RELEASE "${CMAKE_CURRENT_LIST_DIR}/lib")