Clion编译器中 建立多目录工程的 CMakeLists写法
2021-09-26 09:07 dreamboy2000 阅读(360) 评论(0) 编辑 收藏 举报1、头文件 和 库文件 分目录放置
cmake_minimum_required(VERSION 3.15)
project(CompanySystem)
# Add header file include directories
include_directories(./include)
# Add block directories
set(SRC src/workerManger.cpp src/employee.cpp src/manager.cpp src/boss.cpp)
# Target
add_executable(CompanySystem main.cpp ${SRC} )
cmake_minimum_required(VERSION 3.15)
project(untitled1)
# Add header file include directories
include_directories(./employee ./manager ./worker ./workerManager ./boss)
# Add block directories
set(BOSS_SRC boss/boss.cpp)
set(EMPLOYEE_SRC employee/employee.cpp)
set(MANAGER_SRC manager/manager.cpp)
set(WM_SRC workerManager/workerManager.cpp)
# Target
add_executable(untitled1 main.cpp ${BOSS_SRC} ${EMPLOYEE_SRC} ${MANAGER_SRC} ${WM_SRC})