project(Brendan-C-SFML)
cmake_minimum_required(VERSION 2.8)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "$ENV{SFML_ROOT}/cmake/Modules")
find_package(SFML REQUIRED COMPONENTS main system window graphics audio)
add_executable(Brendan-C-SFML brendan-c.cpp)
target_include_directories(Brendan-C-SFML PRIVATE ${SFML_INCLUDE_DIR})
target_link_libraries(Brendan-C-SFML ${SFML_LIBRARIES})
我有一个名为share
的文件夹,应该与Brendan-C-SFML.exe
在同一目录下,但是CLion是在源代码目录外构建的,因此无法访问share
。是否有一种方法可以设置CLion将share
复制到构建目录中?
${CMAKE_BINARY_DIR}
而不是${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
。 - Sheharyar