cmake / CMAKE _ * _ OUTPUT_DIRECTORY 说明
一、CMAKE_LIBRARY_OUTPUT_DIRECTORY
Where to put all the LIBRARY targets when built.
This variable is used to initialize the LIBRARY_OUTPUT_DIRECTORY property on all the targets. See that target property for additional information.
說人話就是指定動(dòng)態(tài)庫或者靜態(tài)庫的輸出目錄。
栗子
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/lib)二、CMAKE_ARCHIVE_OUTPUT_DIRECTORY
Where to put all the ARCHIVE targets when built.
This variable is used to initialize the ARCHIVE_OUTPUT_DIRECTORY property on all the targets. See that target property for additional information.
暫時(shí)沒用過。
三、CMAKE_RUNTIME_OUTPUT_DIRECTORY
Where to put all the RUNTIME targets when built.
This variable is used to initialize the RUNTIME_OUTPUT_DIRECTORY property on all the targets. See that target property for additional information.
說人話就是指定可執(zhí)行文件的輸出目錄。
栗子
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/Bin)三者一般都是在根 CMakeLists 中使用,如果子目錄中沒有指定輸出位置,則沿用父目錄指定的輸出位置。
(SAW:Game Over!)
總結(jié)
以上是生活随笔為你收集整理的cmake / CMAKE _ * _ OUTPUT_DIRECTORY 说明的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: CMake 中的 PUBLIC,PRIV
- 下一篇: cmake / cmake --buil