【发布时间】:2021-02-12 20:55:34
【问题描述】:
我有一个如下图所示的代码库。我正在尝试添加一个新的独立可执行文件。 main.cpp 和 CMakeLists.txt 文件位于 folder4 和 main.cpp 需要来自 folder3 的代码。
目前我正在使用:
cmake_minimum_required(VERSION 3.10)
# set the project name
project(Standalone)
# add the executable
add_executable(StandaloneExe main.cpp)
我现在应该使用file( GLOB SRCS *.cpp *.h ) 从folder3 检索头文件和源文件吗?
我只想要生成这个可执行文件的最简单方法。
【问题讨论】:
标签: cmake