From c4d1491af938a12a0167dae4fd3ea8f1810c752a Mon Sep 17 00:00:00 2001 From: dec05eba Date: Tue, 25 Sep 2018 20:47:40 +0200 Subject: Fix build for windows --- CMakeLists.txt | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index b18c605..a58a3cd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -27,5 +27,11 @@ find_package(LibArchive REQUIRED) add_executable(sibs ${SOURCE_FILES}) include_directories(${CURL_INCLUDE_DIR} ${LibArchive_INCLUDE_DIR} "depends/libninja/include") -target_link_libraries(sibs ${CURL_LIBRARIES} ${LibArchive_LIBRARIES} -lgit2) -target_compile_options(sibs PRIVATE -Wall -Wextra -Werror=return-type -fdiagnostics-show-option -fexceptions) + +if(WIN32) + target_link_libraries(sibs ${CURL_LIBRARIES} ${LibArchive_LIBRARIES} "${CMAKE_CURRENT_SOURCE_DIR}/msvc/git2.lib") + target_compile_options(sibs PRIVATE /Wall) +else() + target_link_libraries(sibs ${CURL_LIBRARIES} ${LibArchive_LIBRARIES} -lgit2) + target_compile_options(sibs PRIVATE -Wall -Wextra -Werror=return-type -fdiagnostics-show-option -fexceptions) +endif() -- cgit v1.2.3