Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
git2
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
git2
Commits
d335e73a
Commit
d335e73a
authored
Jan 08, 2013
by
Edward Thomson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
keep comments at < 80 chars
parent
368a2b4e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
12 deletions
+13
-12
CMakeLists.txt
+13
-12
No files found.
CMakeLists.txt
View file @
d335e73a
...
@@ -23,14 +23,14 @@ OPTION( BUILD_EXAMPLES "Build library usage example apps" OFF )
...
@@ -23,14 +23,14 @@ OPTION( BUILD_EXAMPLES "Build library usage example apps" OFF )
OPTION
(
TAGS
"Generate tags"
OFF
)
OPTION
(
TAGS
"Generate tags"
OFF
)
OPTION
(
PROFILE
"Generate profiling information"
OFF
)
OPTION
(
PROFILE
"Generate profiling information"
OFF
)
IF
(
MSVC
)
IF
(
MSVC
)
# This option is only availalbe when building with MSVC. By default,
libgit2 is
# This option is only availalbe when building with MSVC. By default,
#
build using the stdcall calling convention, as that's what the CLR expects by
#
libgit2 is build using the stdcall calling convention, as that's what
# default and how the Windows API is built.
#
the CLR expects by
default and how the Windows API is built.
#
#
# If you are writing a C or C++ program and want to link to libgit2, you
have to
# If you are writing a C or C++ program and want to link to libgit2, you
# either:
#
have to
either:
# - Add /Gz to the compiler options of _your_ program / library.
# - Add /Gz to the compiler options of _your_ program / library.
# - Turn this o
ption o
ff by invoking CMake with the "-DSTDCALL=Off" argument.
# - Turn this off by invoking CMake with the "-DSTDCALL=Off" argument.
#
#
OPTION
(
STDCALL
"Build libgit2 with the __stdcall convention"
ON
)
OPTION
(
STDCALL
"Build libgit2 with the __stdcall convention"
ON
)
ENDIF
()
ENDIF
()
...
@@ -52,11 +52,11 @@ FUNCTION(TARGET_OS_LIBRARIES target)
...
@@ -52,11 +52,11 @@ FUNCTION(TARGET_OS_LIBRARIES target)
ENDIF
()
ENDIF
()
ENDFUNCTION
()
ENDFUNCTION
()
# For the MSVC IDE, this function splits up the source files like windows
explorer does.
# For the MSVC IDE, this function splits up the source files like windows
#
This is esp. useful with the libgit2_clar project, were usually 2 or more files sha
re
#
explorer does. This is esp. useful with the libgit2_clar project, we
re
#
the same name.
#
usually 2 or more files share the same name. Sadly, this file grouping
#
Sadly, this file grouping is a per-directory option in cmake and not per-target, resulting
#
is a per-directory option in cmake and not per-target, resulting in
#
in
empty virtual folders "tests-clar" for the git2.dll
# empty virtual folders "tests-clar" for the git2.dll
FUNCTION
(
MSVC_SPLIT_SOURCES target
)
FUNCTION
(
MSVC_SPLIT_SOURCES target
)
IF
(
MSVC_IDE
)
IF
(
MSVC_IDE
)
GET_TARGET_PROPERTY
(
sources
${
target
}
SOURCES
)
GET_TARGET_PROPERTY
(
sources
${
target
}
SOURCES
)
...
@@ -119,7 +119,8 @@ ENDIF()
...
@@ -119,7 +119,8 @@ ENDIF()
# Optional external dependency: zlib
# Optional external dependency: zlib
IF
(
NOT ZLIB_LIBRARY
)
IF
(
NOT ZLIB_LIBRARY
)
# It's optional, but FIND_PACKAGE gives a warning that looks more like an error.
# It's optional, but FIND_PACKAGE gives a warning that looks more like an
# error.
FIND_PACKAGE
(
ZLIB QUIET
)
FIND_PACKAGE
(
ZLIB QUIET
)
ENDIF
()
ENDIF
()
IF
(
ZLIB_FOUND
)
IF
(
ZLIB_FOUND
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment