compiler-temp/LL1/CMakeLists.txt

15 lines
398 B
CMake

cmake_minimum_required(VERSION 3.10)
project(LL1)
# 收集所有的cpp源文件
file(GLOB SOURCES "src/*.cpp")
# 创建静态链接库
add_library(LL1 STATIC ${SOURCES})
# Test:添加可执行文件并链接目标库
add_executable(test_LL1 test/test_main.cpp)
target_link_libraries(test_LL1 LL1)
# 添加头文件目录
target_include_directories(LL PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/include)