8000 cmake: remove now-useless LIBGIT2_LIBDIRS handling · libgit2/libgit2@d99d060 · GitHub
[go: up one dir, main page]

Skip to content

Commit d99d060

Browse files
committed
cmake: remove now-useless LIBGIT2_LIBDIRS handling
With the recent change of always resolving pkg-config libraries to their full path, we do not have to manage the LIBGIT2_LIBDIRS variable anymore. The only other remaining user of LIBGIT2_LIBDIRS is winhttp, which is a CMake-style library target and can thus be resolved by CMake automatically. Remove the variable to simplify our build system a bit.
1 parent 85a7b95 commit d99d060

File tree

3 files changed

+0
-8
lines changed

3 files changed

+0
-8
lines changed

examples/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
LINK_DIRECTORIES(${LIBGIT2_LIBDIRS})
21
INCLUDE_DIRECTORIES(${LIBGIT2_INCLUDES})
32

43
FILE(GLOB_RECURSE SRC_EXAMPLE_GIT2 network/*.c network/*.h common.?)

src/CMakeLists.txt

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ SET(LIBGIT2_INCLUDES
1717
"${libgit2_SOURCE_DIR}/src"
1818
"${libgit2_SOURCE_DIR}/include")
1919
SET(LIBGIT2_LIBS "")
20-
SET(LIBGIT2_LIBDIRS "")
2120

2221
# Installation paths
2322
#
@@ -109,7 +108,6 @@ IF (WIN32 AND WINHTTP)
109108
ADD_SUBDIRECTORY("${libgit2_SOURCE_DIR}/deps/winhttp" "${libgit2_BINARY_DIR}/deps/winhttp")
110109
LIST(APPEND LIBGIT2_LIBS winhttp)
111110
LIST(APPEND LIBGIT2_INCLUDES "${libgit2_SOURCE_DIR}/deps/winhttp")
112-
LIST(APPEND LIBGIT2_LIBDIRS ${LIBWINHTTP_PATH})
113111
ELSE()
114112
LIST(APPEND LIBGIT2_LIBS "winhttp")
115113
LIST(APPEND LIBGIT2_PC_LIBS "-lwinhttp")
@@ -124,7 +122,6 @@ ELSE ()
124122
IF (CURL_FOUND)
125123
SET(GIT_CURL 1)
126124
LIST(APPEND LIBGIT2_INCLUDES ${CURL_INCLUDE_DIRS})
127-
LIST(APPEND LIBGIT2_LIBDIRS ${CURL_LIBRARY_DIRS})
128125
LIST(APPEND LIBGIT2_LIBS ${CURL_LIBRARIES})
129126 8000
LIST(APPEND LIBGIT2_PC_LIBS ${CURL_LDFLAGS})
130127
ENDIF()
@@ -345,7 +342,6 @@ IF (LIBSSH2_FOUND)
345342
SET(GIT_SSH 1)
346343
LIST(APPEND LIBGIT2_INCLUDES ${LIBSSH2_INCLUDE_DIRS})
347344
LIST(APPEND LIBGIT2_LIBS ${LIBSSH2_LIBRARIES})
348-
LIST(APPEND LIBGIT2_LIBDIRS ${LIBSSH2_LIBRARY_DIRS})
349345
LIST(APPEND LIBGIT2_PC_LIBS ${LIBSSH2_LDFLAGS})
350346

351347
CHECK_LIBRARY_EXISTS("${LIBSSH2_LIBRARIES}" libssh2_userauth_publickey_frommemory "${LIBSSH2_LIBRARY_DIRS}" HAVE_LIBSSH2_MEMORY_CREDENTIALS)
@@ -460,7 +456,6 @@ ENDIF()
460456
SET(LIBGIT2_OBJECTS ${LIBGIT2_OBJECTS} PARENT_SCOPE)
461457
SET(LIBGIT2_INCLUDES ${LIBGIT2_INCLUDES} PARENT_SCOPE)
462458
SET(LIBGIT2_LIBS ${LIBGIT2_LIBS} PARENT_SCOPE)
463-
SET(LIBGIT2_LIBDIRS ${LIBGIT2_LIBDIRS} PARENT_SCOPE)
464459

465460
IF(XCODE_VERSION)
466461
# This is required for Xcode to actually link the libgit2 library
@@ -470,7 +465,6 @@ IF(XCODE_VERSION)
470465
ENDIF()
471466

472467
# Compile and link libgit2
473-
LINK_DIRECTORIES(${LIBGIT2_LIBDIRS})
474468
ADD_LIBRARY(git2 ${WIN_RC} ${LIBGIT2_OBJECTS})
475469
TARGET_LINK_LIBRARIES(git2 ${LIBGIT2_LIBS})
476470

tests/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ SET_SOURCE_FILES_PROPERTIES(
3131
${CLAR_PATH}/clar.c
3232
PROPERTIES OBJECT_DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/clar.suite)
3333

34-
LINK_DIRECTORIES(${LIBGIT2_LIBDIRS})
3534
INCLUDE_DIRECTORIES(${LIBGIT2_INCLUDES})
3635

3736
ADD_EXECUTABLE(libgit2_clar ${SRC_CLAR} ${SRC_TEST} ${LIBGIT2_OBJECTS})

0 commit comments

Comments
 (0)
0