You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

23 lines
505 B

1 year ago
cmake_minimum_required(VERSION 3.25)
project(exeCPP)
set(CMAKE_CXX_STANDARD 11)
link_directories(lib)
include_directories(include)
add_executable(exeCPP main.cpp include/library.h)
target_link_libraries(exeCPP libstaticLib.a)
#cmake_minimum_required(VERSION 3.25)
#project(exeCPP)
# 指定lib目录
#link_directories(${PROJECT_SOURCE_DIR}/lib)
# 指定头文件搜索路径
#add_executable(${PROJECT_NAME} main.cpp)
# 将库链接到项目中
#target_link_libraries(${PROJECT_NAME} libstaticLib.a)