我目前正在使用CLion IDE。在CMakeLists.txt文件中,我添加了:
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/lib)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/lib)
#set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/bin)
set(CMAKE_HOME_DIRECTORY ${PROJECT_SOURCE_DIR}/build)
set(LIBRARY_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/lib)
set(EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/bin)
在设置中,我已将CMake Build文件的路径设置为build
文件夹。
但是Makefile
也在build
文件夹中,但是我希望它在源目录中生成(为了易于使用)。我已经用谷歌搜索了,但是找不到答案。
如何使Makefile在源目录中生成? 任何帮助将不胜感激。
谢谢