mirror of
https://git.proxmox.com/git/libgit2
synced 2025-05-09 22:39:38 +00:00
Precompile headers for MSVC.
This commit is contained in:
parent
53774eb818
commit
73aaf67439
@ -133,6 +133,12 @@ SET_TARGET_PROPERTIES(git2 PROPERTIES VERSION ${LIBGIT2_VERSION_STRING})
|
|||||||
SET_TARGET_PROPERTIES(git2 PROPERTIES SOVERSION ${LIBGIT2_VERSION_MAJOR})
|
SET_TARGET_PROPERTIES(git2 PROPERTIES SOVERSION ${LIBGIT2_VERSION_MAJOR})
|
||||||
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/libgit2.pc.in ${CMAKE_CURRENT_BINARY_DIR}/libgit2.pc @ONLY)
|
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/libgit2.pc.in ${CMAKE_CURRENT_BINARY_DIR}/libgit2.pc @ONLY)
|
||||||
|
|
||||||
|
IF (MSVC)
|
||||||
|
# Precompiled headers
|
||||||
|
SET_TARGET_PROPERTIES(git2 PROPERTIES COMPILE_FLAGS "/Yuprecompiled.h /FIprecompiled.h")
|
||||||
|
SET_SOURCE_FILES_PROPERTIES(src/win32/precompiled.c COMPILE_FLAGS "/Ycprecompiled.h")
|
||||||
|
ENDIF ()
|
||||||
|
|
||||||
# Install
|
# Install
|
||||||
INSTALL(TARGETS git2
|
INSTALL(TARGETS git2
|
||||||
RUNTIME DESTINATION ${INSTALL_BIN}
|
RUNTIME DESTINATION ${INSTALL_BIN}
|
||||||
@ -165,6 +171,12 @@ IF (BUILD_CLAR)
|
|||||||
)
|
)
|
||||||
ADD_EXECUTABLE(libgit2_clar ${SRC} ${CLAR_PATH}/clar_main.c ${SRC_TEST} ${SRC_ZLIB} ${SRC_HTTP} ${SRC_REGEX})
|
ADD_EXECUTABLE(libgit2_clar ${SRC} ${CLAR_PATH}/clar_main.c ${SRC_TEST} ${SRC_ZLIB} ${SRC_HTTP} ${SRC_REGEX})
|
||||||
TARGET_LINK_LIBRARIES(libgit2_clar ${CMAKE_THREAD_LIBS_INIT} ${SSL_LIBRARIES})
|
TARGET_LINK_LIBRARIES(libgit2_clar ${CMAKE_THREAD_LIBS_INIT} ${SSL_LIBRARIES})
|
||||||
|
|
||||||
|
IF (MSVC)
|
||||||
|
# Precompiled headers
|
||||||
|
SET_TARGET_PROPERTIES(libgit2_clar PROPERTIES COMPILE_FLAGS "/Yuprecompiled.h /FIprecompiled.h")
|
||||||
|
ENDIF ()
|
||||||
|
|
||||||
IF (WIN32)
|
IF (WIN32)
|
||||||
TARGET_LINK_LIBRARIES(libgit2_clar ws2_32)
|
TARGET_LINK_LIBRARIES(libgit2_clar ws2_32)
|
||||||
ELSEIF (CMAKE_SYSTEM_NAME MATCHES "(Solaris|SunOS)")
|
ELSEIF (CMAKE_SYSTEM_NAME MATCHES "(Solaris|SunOS)")
|
||||||
|
1
src/win32/precompiled.c
Normal file
1
src/win32/precompiled.c
Normal file
@ -0,0 +1 @@
|
|||||||
|
#include "precompiled.h"
|
19
src/win32/precompiled.h
Normal file
19
src/win32/precompiled.h
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
#include "git2.h"
|
||||||
|
|
||||||
|
#include <assert.h>
|
||||||
|
#include <errno.h>
|
||||||
|
#include <limits.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <string.h>
|
||||||
|
|
||||||
|
#include <sys/types.h>
|
||||||
|
#include <sys/stat.h>
|
||||||
|
|
||||||
|
#include <regex.h>
|
||||||
|
|
||||||
|
#include <io.h>
|
||||||
|
#include <direct.h>
|
||||||
|
#ifdef GIT_THREADS
|
||||||
|
#include "win32/pthread.h"
|
||||||
|
#endif
|
Loading…
Reference in New Issue
Block a user