8000 Split up CMakeLists.txt build instructions by pks-t · Pull Request #4282 · libgit2/libgit2 · GitHub
[go: up one dir, main page]

Skip to content

Split up CMakeLists.txt build instructions #4282

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 21 commits into from
Aug 24, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
096a49c
cmake: try to detect threads library
pks-t Jul 3, 2017
f33911e
cmake: remove unused variable "CLAR_RESOURCES"
pks-t Jun 23, 2017
caab827
cmake: create object library target
pks-t Jun 23, 2017
3267115
cmake: create own precompiled headers for tests
pks-t Jun 28, 2017
35087f0
cmake: create separate CMakeLists.txt for tests
pks-t Jun 28, 2017
a390a84
cmake: move defines into "features.h" header
pks-t Jul 1, 2017
8341d6c
cmake: move regcomp and futimens checks to "features.h"
pks-t Jul 4, 2017
dd332e2
cmake: use absolute path to deps
pks-t Jun 23, 2017
8e31cc2
cmake: keep track of libraries and includes via lists
pks-t Jun 28, 2017
32a2e50
cmake: inline TARGET_OS_LIBRARIES function
pks-t Jul 1, 2017
c363513
cmake: move definition of Win32 flags together
pks-t Jun 28, 2017
8ee90c3
cmake: find dependencies after setting build flags
pks-t Jun 28, 2017
bed7ca3
cmake: define WIN_RC with other platform sources
pks-t Jun 30, 2017
4324850
cmake: move winhttp build instructions into subdirectory
pks-t Jun 28, 2017
9e449e5
cma 8000 ke: move regex build instructions into subdirectory
pks-t Jun 28, 2017
b751455
cmake: move http-parser build instructions into subdirectory
pks-t Jun 28, 2017
1f43a43
cmake: move zlib build instructions into subdirectory
pks-t Jun 28, 2017
72f27cb
cmake: fix up source and binary directory paths
pks-t Jun 30, 2017
e5c9723
cmake: move library build instructions into subdirectory
pks-t Jun 30, 2017
8a43161
cmake: always include our own headers first
pks-t Jul 5, 2017
a3a3547
cmake: fix output location of import libraries and DLLs
pks-t Aug 17, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
474 changes: 15 additions & 459 deletions CMakeLists.txt

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions deps/http-parser/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
FILE(GLOB SRC_HTTP "*.c" "*.h")

ADD_LIBRARY(http-parser STATIC ${SRC_HTTP})
2 changes: 2 additions & 0 deletions deps/regex/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
INCLUDE_DIRECTORIES(".")
ADD_LIBRARY(regex STATIC "regex.c" "regex.h")
26 changes: 26 additions & 0 deletions deps/winhttp/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
FIND_PROGRAM(DLLTOOL dlltool CMAKE_FIND_ROOT_PATH_BOTH)
IF (NOT DLLTOOL)
MESSAGE(FATAL_ERROR "Could not find dlltool command")
ENDIF ()

SET(LIBWINHTTP_PATH "${CMAKE_BINARY_DIR}/deps/winhttp")
SET(LIBWINHTTP_PATH ${LIBWINHTTP_PATH} PARENT_SCOPE)
FILE(MAKE_DIRECTORY ${LIBWINHTTP_PATH})

IF (CMAKE_SIZEOF_VOID_P EQUAL 8)
set(WINHTTP_DEF "winhttp64.def")
ELSE()
set(WINHTTP_DEF "winhttp.def")
ENDIF()

ADD_CUSTOM_COMMAND(
OUTPUT ${LIBWINHTTP_PATH}/libwinhttp.a
COMMAND ${DLLTOOL} -d ${WINHTTP_DEF} -k -D winhttp.dll -l libwinhttp.a
DEPENDS ${WINHTTP_DEF}
WORKING_DIRECTORY ${LIBWINHTTP_PATH}
)

SET_SOURCE_FILES_PROPERTIES(
${CMAKE_CURRENT_SOURCE_DIR}/src/transports/winhttp.c
PROPERTIES OBJECT_DEPENDS ${LIBWINHTTP_PATH}/libwinhttp.a
)
4 changes: 4 additions & 0 deletions deps/zlib/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
ADD_DEFINITIONS(-DNO_VIZ -DSTDC -DNO_GZIP)
FILE(GLOB SRC_ZLIB "*.c" "*.h")
INCLUDE_DIRECTORIES(".")
ADD_LIBRARY(zlib STATIC ${SRC_ZLIB})
3 changes: 3 additions & 0 deletions examples/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
LINK_DIRECTORIES(${LIBGIT2_LIBDIRS})
INCLUDE_DIRECTORIES(${LIBGIT2_INCLUDES})

FILE(GLOB_RECURSE SRC_EXAMPLE_GIT2 network/*.c network/*.h)
ADD_EXECUTABLE(cgit2 ${SRC_EXAMPLE_GIT2})
IF(WIN32 OR ANDROID)
Expand Down
Loading
0