summaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
Diffstat (limited to 'cmake')
-rw-r--r--cmake/IdeSplitSources.cmake2
-rw-r--r--cmake/SelectHTTPParser.cmake4
-rw-r--r--cmake/SelectRegex.cmake4
-rw-r--r--cmake/SelectWinHTTP.cmake4
-rw-r--r--cmake/SelectZlib.cmake8
5 files changed, 11 insertions, 11 deletions
diff --git a/cmake/IdeSplitSources.cmake b/cmake/IdeSplitSources.cmake
index 9e16cbc5f..4f928ac08 100644
--- a/cmake/IdeSplitSources.cmake
+++ b/cmake/IdeSplitSources.cmake
@@ -8,7 +8,7 @@ function(IDE_SPLIT_SOURCES target)
get_target_property(sources ${target} SOURCES)
foreach(source ${sources})
if(source MATCHES ".*/")
- string(REPLACE ${CMAKE_SOURCE_DIR}/ "" rel ${source})
+ string(REPLACE ${PROJECT_SOURCE_DIR}/ "" rel ${source})
if(rel)
string(REGEX REPLACE "/([^/]*)$" "" rel ${rel})
if(rel)
diff --git a/cmake/SelectHTTPParser.cmake b/cmake/SelectHTTPParser.cmake
index ffc897fbc..bb6ef5517 100644
--- a/cmake/SelectHTTPParser.cmake
+++ b/cmake/SelectHTTPParser.cmake
@@ -12,8 +12,8 @@ if(USE_HTTP_PARSER STREQUAL "system")
endif()
else()
message(STATUS "http-parser version 2 was not found or disabled; using bundled 3rd-party sources.")
- add_subdirectory("${CMAKE_SOURCE_DIR}/deps/http-parser" "${CMAKE_BINARY_DIR}/deps/http-parser")
- list(APPEND LIBGIT2_DEPENDENCY_INCLUDES "${CMAKE_SOURCE_DIR}/deps/http-parser")
+ add_subdirectory("${PROJECT_SOURCE_DIR}/deps/http-parser" "${PROJECT_BINARY_DIR}/deps/http-parser")
+ list(APPEND LIBGIT2_DEPENDENCY_INCLUDES "${PROJECT_SOURCE_DIR}/deps/http-parser")
list(APPEND LIBGIT2_DEPENDENCY_OBJECTS "$<TARGET_OBJECTS:http-parser>")
add_feature_info(http-parser ON "http-parser support (bundled)")
endif()
diff --git a/cmake/SelectRegex.cmake b/cmake/SelectRegex.cmake
index 88aa156b7..2a3a91b8c 100644
--- a/cmake/SelectRegex.cmake
+++ b/cmake/SelectRegex.cmake
@@ -43,8 +43,8 @@ elseif(REGEX_BACKEND STREQUAL "builtin")
add_feature_info(regex ON "using bundled PCRE")
set(GIT_REGEX_BUILTIN 1)
- add_subdirectory("${CMAKE_SOURCE_DIR}/deps/pcre" "${CMAKE_BINARY_DIR}/deps/pcre")
- list(APPEND LIBGIT2_DEPENDENCY_INCLUDES "${CMAKE_SOURCE_DIR}/deps/pcre")
+ add_subdirectory("${PROJECT_SOURCE_DIR}/deps/pcre" "${PROJECT_BINARY_DIR}/deps/pcre")
+ list(APPEND LIBGIT2_DEPENDENCY_INCLUDES "${PROJECT_SOURCE_DIR}/deps/pcre")
list(APPEND LIBGIT2_DEPENDENCY_OBJECTS $<TARGET_OBJECTS:pcre>)
else()
message(FATAL_ERROR "The REGEX_BACKEND option provided is not supported")
diff --git a/cmake/SelectWinHTTP.cmake b/cmake/SelectWinHTTP.cmake
index 38642e136..96e0bdbae 100644
--- a/cmake/SelectWinHTTP.cmake
+++ b/cmake/SelectWinHTTP.cmake
@@ -4,9 +4,9 @@ if(WIN32 AND USE_WINHTTP)
# Since MinGW does not come with headers or an import library for winhttp,
# we have to include a private header and generate our own import library
if(MINGW)
- add_subdirectory("${CMAKE_SOURCE_DIR}/deps/winhttp" "${CMAKE_BINARY_DIR}/deps/winhttp")
+ add_subdirectory("${PROJECT_SOURCE_DIR}/deps/winhttp" "${PROJECT_BINARY_DIR}/deps/winhttp")
list(APPEND LIBGIT2_SYSTEM_LIBS winhttp)
- list(APPEND LIBGIT2_DEPENDENCY_INCLUDES "${CMAKE_SOURCE_DIR}/deps/winhttp")
+ list(APPEND LIBGIT2_DEPENDENCY_INCLUDES "${PROJECT_SOURCE_DIR}/deps/winhttp")
else()
list(APPEND LIBGIT2_SYSTEM_LIBS "winhttp")
list(APPEND LIBGIT2_PC_LIBS "-lwinhttp")
diff --git a/cmake/SelectZlib.cmake b/cmake/SelectZlib.cmake
index 0de1d4a98..fb4361abc 100644
--- a/cmake/SelectZlib.cmake
+++ b/cmake/SelectZlib.cmake
@@ -22,13 +22,13 @@ if(USE_BUNDLED_ZLIB STREQUAL "OFF")
endif()
endif()
if(USE_BUNDLED_ZLIB STREQUAL "Chromium")
- add_subdirectory("${CMAKE_SOURCE_DIR}/deps/chromium-zlib" "${CMAKE_BINARY_DIR}/deps/chromium-zlib")
- list(APPEND LIBGIT2_DEPENDENCY_INCLUDES "${CMAKE_SOURCE_DIR}/deps/chromium-zlib")
+ add_subdirectory("${PROJECT_SOURCE_DIR}/deps/chromium-zlib" "${PROJECT_BINARY_DIR}/deps/chromium-zlib")
+ list(APPEND LIBGIT2_DEPENDENCY_INCLUDES "${PROJECT_SOURCE_DIR}/deps/chromium-zlib")
list(APPEND LIBGIT2_DEPENDENCY_OBJECTS $<TARGET_OBJECTS:chromium_zlib>)
add_feature_info(zlib ON "using (Chromium) bundled zlib")
elseif(USE_BUNDLED_ZLIB OR NOT ZLIB_FOUND)
- add_subdirectory("${CMAKE_SOURCE_DIR}/deps/zlib" "${CMAKE_BINARY_DIR}/deps/zlib")
- list(APPEND LIBGIT2_DEPENDENCY_INCLUDES "${CMAKE_SOURCE_DIR}/deps/zlib")
+ add_subdirectory("${PROJECT_SOURCE_DIR}/deps/zlib" "${PROJECT_BINARY_DIR}/deps/zlib")
+ list(APPEND LIBGIT2_DEPENDENCY_INCLUDES "${PROJECT_SOURCE_DIR}/deps/zlib")
list(APPEND LIBGIT2_DEPENDENCY_OBJECTS $<TARGET_OBJECTS:zlib>)
add_feature_info(zlib ON "using bundled zlib")
endif()