Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 4 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,10 @@ if(NOT CMAKE_CONFIGURATION_TYPES AND NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE "Debug" CACHE STRING "Choose the type of build, options are: Debug Release RelWithDebInfo MinSizeRel." FORCE)
endif()

if(NOT BUILD_SHARED_LIBS)
add_definitions(-DGIT_STATIC_BUILD=1)
endif()


# Modules

Expand Down
22 changes: 15 additions & 7 deletions include/git2/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,22 @@ typedef size_t size_t;
#endif

/** Declare a public function exported for application use. */
#if __GNUC__ >= 4
# define GIT_EXTERN(type) extern \
__attribute__((visibility("default"))) \
type
#elif defined(_MSC_VER)
# define GIT_EXTERN(type) __declspec(dllexport) type __cdecl
#if !defined(GIT_STATIC_BUILD)
# if __GNUC__ >= 4
# define GIT_DECL_EXTERN extern __attribute__((visibility("default")))
# elif defined(_MSC_VER)
# define GIT_DECL_EXTERN __declspec(dllexport)
# else
# define GIT_DECL_EXTERN extern
# endif
#else
# define GIT_DECL_EXTERN /* empty */
#endif

#if defined(_MSC_VER)
# define GIT_EXTERN(type) GIT_DECL_EXTERN type __cdecl
#else
# define GIT_EXTERN(type) extern type
# define GIT_EXTERN(type) GIT_DECL_EXTERN type
#endif

/** Declare a callback function for application use. */
Expand Down