【问题标题】:Setting location for Debug and Release output file in CMake(Visual Studio)在 CMake(Visual Studio) 中设置调试和发布输出文件的位置
【发布时间】:2011-06-16 08:26:37
【问题描述】:

我正在使用其他库的源代码,它使用 CMake 创建项目。 因此,我使用 CMake 生成 Visual Studio 项目。 我想更改项目文件夹本身中的默认发布和调试输出文件的位置。

我该如何改变呢?我必须将什么命令附加到 CMake 文件?

【问题讨论】:

    标签: c++ visual-studio cmake


    【解决方案1】:

    您可以使用EXECUTABLE_OUTPUT_PATH 变量设置二进制文件输出的位置。默认值为CMAKE_CURRENT_BINARY_DIR

    EXECUTABLE_OUTPUT_PATH 
        set this variable to specify a common place where CMake should put all executable files (instead of CMAKE_CURRENT_BINARY_DIR)
        SET(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin)
    

    【讨论】:

      猜你喜欢
      • 2012-01-10
      • 2016-12-14
      • 2017-01-09
      • 2023-03-12
      • 1970-01-01
      • 2015-02-14
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多