-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
46 lines (38 loc) · 1.26 KB
/
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
cmake_minimum_required(VERSION 3.20)
project(wyagit)
set(Boost_USE_STATIC_LIBS OFF)
set(Boost_USE_MULTITHREADED ON)
set(Boost_USE_STATIC_RUNTIME OFF)
find_package(Boost REQUIRED iostreams)
include(FetchContent)
FetchContent_Declare(
fmt
GIT_REPOSITORY https://github.com/fmtlib/fmt.git
GIT_TAG a0b8a92
)
FetchContent_MakeAvailable(fmt)
FetchContent_Declare(
argparse
GIT_REPOSITORY https://github.com/p-ranav/argparse.git
GIT_TAG af442b4
)
FetchContent_MakeAvailable(argparse)
set(WYAGIT "WyagitCommon")
if(Boost_FOUND)
include_directories(Project PUBLIC ${Boost_INCLUDE_DIRS})
set(CMAKE_CXX_FLAGS "--std=c++2a")
add_library(${WYAGIT} STATIC
git_objects/GitObject.cpp
git_objects/GitRepository.cpp
git_objects/GitHash.cpp
git_objects/GitObjectsFactory.cpp
git_objects/GitIndex.cpp
utilities/Common.cpp
utilities/SHA1.cpp
utilities/Zlib.cpp)
target_link_libraries(${WYAGIT} ${Boost_LIBRARIES} fmt argparse)
add_executable(wyagit main.cpp)
target_link_libraries(wyagit ${WYAGIT})
endif()
enable_testing()
add_subdirectory(tests)