aboutsummaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2018-09-25 20:47:40 +0200
committerdec05eba <dec05eba@protonmail.com>2020-07-06 07:39:33 +0200
commitc4d1491af938a12a0167dae4fd3ea8f1810c752a (patch)
tree8ecd47ca15e3caaace085f1880129231d329472c /CMakeLists.txt
parent0bbb9be629ce35c11e4bf4a5180810ae2b16e5b4 (diff)
Fix build for windows
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt10
1 files changed, 8 insertions, 2 deletions
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()