1- cmake_minimum_required (VERSION 3.12) # Minimum CMake version required
1+ # Minimum CMake version required
2+ cmake_minimum_required (VERSION 3.12)
23
34# Project definition
45project (codefetch VERSION 0.12.3)
@@ -10,12 +11,9 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON)
1011# Define the project version as a preprocessor macro
1112add_definitions (-DPROJECT_VERSION="${PROJECT_VERSION} " )
1213
13- # Find required packages
14- find_package (Threads REQUIRED) # For multithreading support
14+ # Find required package (for multithreading support)
15+ find_package (Threads REQUIRED)
1516
16- # Find LibGit2 using pkg-config
17- find_package (PkgConfig REQUIRED)
18- pkg_check_modules(LIBGIT2 REQUIRED libgit2)
1917
2018# Define source files
2119set (SOURCES
@@ -41,19 +39,7 @@ target_include_directories(${PROJECT_NAME} PRIVATE
4139 ${CMAKE_CURRENT_SOURCE_DIR}
4240 ${CMAKE_CURRENT_SOURCE_DIR} /src
4341 ${CMAKE_CURRENT_SOURCE_DIR} /modules
44- ${LIBGIT2_INCLUDE_DIRS}
45- )
46-
47- # Link required libraries
48- target_link_libraries (${PROJECT_NAME} PRIVATE
49- Threads::Threads
50- ${LIBGIT2_LIBRARIES}
51- )
52-
53- # Link required directories
54- target_link_directories (${PROJECT_NAME} PRIVATE
55- ${LIBGIT2_LIBRARY_DIRS}
5642)
5743
5844# Installation setup
59- install (TARGETS ${PROJECT_NAME} DESTINATION bin)
45+ install (TARGETS ${PROJECT_NAME} DESTINATION bin)
0 commit comments