ruijiege

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::

CMakeLists.txt

cmake_minimum_required(VERSION 3.15)
project(test)
# set(SRC add.cpp;div.cpp;mult.cpp;main.cpp;sub.cpp)
# ${PROJECT_SOURCE_DIR}指定的就是cmakelists所在的路径 aux_source_directory(搜索路径) 方式一
# aux_source_directory(${PROJECT_SOURCE_DIR}/src SRC)
# 方式二
file(GLOB SRC ${CMAKE_CURRENT_SOURCE_DIR}/src/*.cpp)
# 添加动态库
include_directories(${PROJECT_SOURCE_DIR}/include)
# set(EXECUTABLE_OUTPUT_PATH ../output)
set(CMAKE_CXX_STANDARD 11)
# 生成依赖库文件路径
set(LIBRARY_OUTPUT_PATH ../share)
# add_executable(app ${SRC})
add_library(calc SHARED ${SRC})

 

posted on 2023-08-25 11:06  哦哟这个怎么搞  阅读(107)  评论(0编辑  收藏  举报