forked from Gtyp/FileWordFinder
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
32 lines (25 loc) · 912 Bytes
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
cmake_minimum_required(VERSION 3.25.1)
project(fileWordFinder VERSION 1.2.0 DESCRIPTION "help to find word in txt files from dir and object where word is stored")
set(CMAKE_CXX_STANDARD 20)
# compile the library
set(LIB_HDRS
lib_include/FileAbstract.hpp
lib_include/FileTxt.hpp
lib_include/FileXml.hpp
lib_include/getDirectoryFiles.hpp
lib_include/Log.hpp
lib_include/outResultBase.hpp
lib_include/outResultXml.hpp
)
set(LIB_SRC
lib_src/FileTxt.cpp
lib_src/FileXml.cpp
lib_src/Log.cpp
)
add_library(${PROJECT_NAME}_lib STATIC ${LIB_SRC} ${LIB_HDRS})
target_include_directories(${PROJECT_NAME}_lib PUBLIC ${PROJECT_SOURCE_DIR}/lib_include)
# compile the app
add_executable(${PROJECT_NAME} app/app.cpp)
target_include_directories(${PROJECT_NAME} PUBLIC ${PROJECT_SOURCE_DIR}/lib_include)
# link lib
target_link_libraries(${PROJECT_NAME} PRIVATE ${PROJECT_NAME}_lib)