cmake_minimum_required(VERSION 2.8 FATAL_ERROR)
project("demo")
set(DEMO_INCLUDE_DIRS "./include")
set(DEMO_LIB_DIRS "./lib")
message("${DEMO_INCLUDE_DIRS}")
message("${DEMO_LIB_DIRS}")
include_directories("${DEMO_INCLUDE_DIRS}")
link_directories("${DEMO_LIB_DIRS}")
set(DEMO_SOURCE ./main.cpp)
add_executable(demo ${DEMO_SOURCE})
target_link_libraries(demo -lhelloworld)
add libs to demo project using cmake
发布时间 2023-06-20 13:59:30作者: BruceWayne09