add:添加链接库后自动包含头文件

This commit is contained in:
taynpg 2025-01-09 16:49:40 +08:00
parent f29e15504e
commit bbd0d6a247

View File

@ -24,6 +24,7 @@ set(LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR}/lib/${CMAKE_BUILD_TYPE})
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/bin/${CMAKE_BUILD_TYPE}/) set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/bin/${CMAKE_BUILD_TYPE}/)
add_library(filecomplete STATIC filecomplete.h filecomplete.cpp) add_library(filecomplete STATIC filecomplete.h filecomplete.cpp)
target_include_directories(filecomplete PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
if(DEFINED GEN_EXAMPLE) if(DEFINED GEN_EXAMPLE)
message(STATUS "USE TEST") message(STATUS "USE TEST")