Skip to content

Commit aa6fbdb

Browse files
committed
Remove awful useless cmake stuff
1 parent e484a63 commit aa6fbdb

File tree

1 file changed

+2
-11
lines changed

1 file changed

+2
-11
lines changed

redis/CMakeLists.txt

+2-11
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,20 @@
11
PROJECT(libgit2-redis C)
22
CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
33

4+
INCLUDE(../CMake/FindLibgit2.cmake)
45
INCLUDE(../CMake/FindHiredis.cmake)
56

67
# Build options
78
OPTION (BUILD_SHARED_LIBS "Build Shared Library (OFF for Static)" ON)
89
OPTION (BUILD_TESTS "Build Tests" ON)
9-
SET (PC_LIBGIT2_LIBRARY_DIRS "" CACHE STRING "libgit2 path")
10-
SET (PC_LIBGIT2_INCLUDE_DIRS "" CACHE STRING "libgit2 include directories")
11-
12-
# Allow overriding to local libgit2. I'm pretty sure I'm doing this wrong.
13-
IF (PC_LIBGIT2_INCLUDE_DIRS STREQUAL "")
14-
INCLUDE(../CMake/FindLibgit2.cmake)
15-
ELSE ()
16-
SET (LIBGIT2_LIBRARIES ${PC_LIBGIT2_LIBRARY_DIRS})
17-
SET (LIBGIT2_INCLUDE_DIRS ${PC_LIBGIT2_INCLUDE_DIRS})
18-
ENDIF ()
1910

2011
# Build Release by default
2112
IF (NOT CMAKE_BUILD_TYPE)
2213
SET(CMAKE_BUILD_TYPE "Release" CACHE STRING "Choose the type of build, options are: Debug Release RelWithDebInfo MinSizeRel." FORCE)
2314
ENDIF ()
2415

2516
# Compile and link libgit2
26-
INCLUDE_DIRECTORIES(${LIBGIT2_INCLUDE_DIRS} ${LIBHIREDIS_INCLUDE_DIRS})
17+
INCLUDE_DIRECTORIES(${LIBGIT2_INCLUDE_DIR} ${LIBHIREDIS_INCLUDE_DIR})
2718

2819
IF (BUILD_SHARED_LIBS)
2920
ADD_LIBRARY(git2-redis SHARED hiredis.c)

0 commit comments

Comments
 (0)